@import url('https://fonts.googleapis.com/css?family=Orbitron');

* {
  cursor: url('../images/cursors/arrow.cur'), auto;
}

a, button, .clickable, [draggable="true"], .drop-zone {
  cursor: url('../images/cursors/pointer.cur'), pointer;
}

@supports not (cursor: url('../images/cursors/arrow.cur'), auto) {
  * { cursor: default; }
  a, button, .clickable, [draggable="true"], .drop-zone { cursor: pointer; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Orbitron';
  background: #fff;
  color: #333; 
  min-height: 100vh;
}

#splash-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
  transition: opacity 0.7s ease;
}

#splash-screen img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.site-header {
  background: #fff;
  padding: 24px 24px 0;
}

.site-title {
  text-align: left;
  font-size: 28px;
  color: #8b008b;
  margin: 0 0 12px;
  font-weight: bold;
}

.site-nav {
  background: linear-gradient(180deg, #ffb6c1 0%, #ffc0cb 50%, #ffb6c1 100%);
  border: 2px solid #ff69b4;
  border-style: outset;
  padding: 12px 24px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.15);
}

.site-nav a {
  padding: 8px 16px;
  background: linear-gradient(180deg, #fff 0%, #ffe4e9 50%, #ffb6c1 100%);
  border: 2px solid #ff69b4;
  border-style: outset;
  color: #8b008b;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
}

.site-nav a:hover {
  background: linear-gradient(180deg, #ffe4e9 0%, #ffb6c1 100%);
  border-style: inset;
}

.site-nav a.active {
  border-style: inset;
  background: linear-gradient(180deg, #ffb6c1 0%, #ff69b4 100%);
  color: #fff;
}

body.page-home {
  padding: 0;
  max-width: none;
  margin: 0;
}

.page-home {
  background: #fff;
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.win-box {
  border: 3px solid #ff69b4;
  border-style: outset;
  background: #fff;
  padding: 20px;
  margin: 24px 0;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.win-box h2 {
  margin-top: 0;
  font-size: 18px;
  color: #8b008b;
  border-bottom: 2px solid #ffc0cb;
  padding-bottom: 8px;
}

.btn-y2k {
  padding: 10px 20px;
  background: linear-gradient(180deg, #fff 0%, #ffe4e9 50%, #ffb6c1 100%);
  border: 2px solid #ff69b4;
  border-style: outset;
  color: #8b008b;
  font-family: 'Orbitron';
  font-weight: bold;
  font-size: 14px;
}

.btn-y2k:hover {
  border-style: inset;
  background: linear-gradient(180deg, #ffe4e9 0%, #ffb6c1 100%);
}

.btn-y2k:active {
  border-style: inset;
}

.gallery-header {
  text-align: center;
  font-size: 24px;
  color: #8b008b;
  margin: 32px 0 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
  align-items: start;
}

.gallery-masonry {
  columns: 3 200px;
  column-gap: 20px;
  margin: 24px 0;
}

.gallery-masonry .gallery-item {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
}

.gallery-item {
  border: 3px solid #ff69b4;
  border-style: outset;
  background: #fff;
  padding: 8px;
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item .caption {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

.painting-title {
  font-size: 15px;
  font-weight: bold;
  color: #8b008b;
  margin: 10px 0 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.painting-meta {
  font-size: 10px;
  color: #b06090;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.artist-statement {
  line-height: 1.6;
  font-size: 15px;
}

.page-about-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 24px;
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 200px;
}

.about-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: 'Orbitron';
}

.about-btn.active {
  border-style: inset;
  background: linear-gradient(180deg, #ffb6c1 0%, #ff69b4 100%);
  color: #fff;
}

.about-right {
  flex: 1;
}

.artist-photo-placeholder {
  border: 3px solid #ff69b4;
  border-style: outset;
  background: #ffe4e9;
}

.artist-photo {
  width: 100%;
  height: auto;
  display: block;
}

body.page-subpage,
body.page-contact {
  padding: 0;
  max-width: none;
  margin: 0;
}

.page-subpage {
  background: #fff;
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.page-contact {
  background: #fff;
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  padding: 12px 0;
  border-bottom: 1px solid #ffc0cb;
}

.contact-list a {
  color: #8b008b;
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.page-dress-up {
  background: #ffb6c1;
  min-height: 100vh;
}

.page-dress-up .site-header,
.page-products .site-header {
  background: #ffb6c1;
}

.dress-up-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.character-area {
  position: relative;
  flex-shrink: 0;
}

.character-area .base-character {
  display: block;
  max-width: 400px;
  height: auto;
  position: relative;
  z-index: 0;
}

.drop-zones {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 400px;
  pointer-events: none;
  z-index: 1;
}

.drop-zones .drop-zone {
  position: absolute;
  pointer-events: auto;
  border: 2px solid transparent;
  background: transparent;
  z-index: 2;
  min-height: 60px;
  transition: background 0.2s, border-color 0.2s;
  touch-action: none;
}

.drop-zones .drop-zone.drag-over {
  background: rgba(255, 182, 193, 0.25);
  border-color: rgba(255, 105, 180, 0.5);
}

.drop-zones .drop-zone.zone-drag-top {
  z-index: 10;
}

.drop-zones .drop-zone .placed-item {
  position: absolute;
  pointer-events: auto;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: url('../images/cursors/pointer.cur'), pointer;
  transition: opacity 0.2s;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.drop-zones .drop-zone .placed-item.dragging {
  opacity: 0.5;
}

.clothing-bar {
  background: #F78FAE;
  border: 3px solid #ff69b4;
  border-style: outset;
  padding: 16px;
  min-width: 180px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
}

.clothing-bar h3 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #8b008b;
  text-align: center;
}

.clothing-category {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Thank you google, very cool. CSS columns are wack. */
  gap: 10px;                             /* Item spacing */
  margin-bottom: 20px;
}

.clothing-category .cat-label {
  grid-column: span 4; /* Spanny spanny */
  font-size: 12px;
  font-weight: bold;
  color: #8b008b;
  margin-bottom: 8px;
  display: block;
  text-align: center;
}

.clothing-item {
  width: 80px;
  height: 80px;
  margin: 6px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #ff69b4;
  border-style: outset;
  cursor: url('../images/cursors/pointer.cur'), pointer;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.clothing-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.clothing-item:hover {
  border-style: inset;
}

.clothing-item.dragging {
  opacity: 0.6;
}

.drop-zone .placed-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.download-area {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid rgba(139, 0, 139, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clear-outfit-btn,
.download-outfit-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: bold;
  color: #8b008b;
  background: linear-gradient(180deg, #fff 0%, #ffe4e9 100%);
  border: 2px solid #ff69b4;
  border-style: outset;
  cursor: url('../images/cursors/pointer.cur'), pointer;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.1);
}

.clear-outfit-btn:hover,
.download-outfit-btn:hover {
  border-style: inset;
  background: #ffe4e9;
}

.touch-drag-ghost {
  position: fixed;
  width: 80px;
  height: 80px;
  margin-left: -40px;
  margin-top: -40px;
  pointer-events: none;
  z-index: 99999;
  background: #fff;
  border: 2px solid #ff69b4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.touch-drag-ghost img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .dress-up-layout {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .character-area {
    width: 100%;
    max-width: 280px;
  }

  .character-area .base-character {
    max-width: 100%;
    width: 100%;
  }

  .drop-zones {
    max-width: 100%;
  }

  .clothing-bar {
    width: 100%;
    max-width: 350px;
    min-width: unset;
  }

  .clothing-item {
    width: 60px;
    height: 60px;
    touch-action: auto;
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
  }

  .clothing-item.mobile-selected {
    border-color: #8b008b;
    border-style: inset;
    background: #ffe4e9;
  }

  .drop-zones .drop-zone {
    touch-action: auto;
  }

  .drop-zones .drop-zone .placed-item {
    touch-action: auto;
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
  }
}

.page-products {
  background: #ffb6c1;
  min-height: 100vh;
}

.page-products-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.products-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.products-header-row .gallery-header {
  margin: 0;
}

.products-section-heading {
  font-size: 18px;
  color: #8b008b;
  margin: 32px 0 8px;
  border-bottom: 2px solid #ffc0cb;
  padding-bottom: 6px;
}

.products-grid {
  margin-top: 16px;
}

.product-card {
  padding: 12px;
}

.product-price {
  margin: 10px 0 10px;
  font-size: 14px;
  color: #8b008b;
  font-weight: bold;
}

.add-to-cart-btn {
  width: 100%;
}

.cart-toggle-btn {
  min-width: 74px;
  padding: 8px 12px;
  border: 2px solid #ff69b4;
  border-style: outset;
  background: linear-gradient(180deg, #fff 0%, #ffe4e9 100%);
  color: #8b008b;
  font-family: 'Orbitron';
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-toggle-btn:hover {
  border-style: inset;
}

.cart-count {
  background: #8b008b;
  color: #fff;
  border-radius: 999px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0 8px;
}

.cart-panel[aria-hidden="true"] {
  display: none;
}

.cart-panel[aria-hidden="false"] {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
}

.cart-panel-inner {
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border: 3px solid #ff69b4;
  border-style: outset;
  margin: 56px auto;
  padding: 16px;
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ffc0cb;
  padding-bottom: 8px;
}

.cart-panel-header h3 {
  margin: 0;
  color: #8b008b;
}

.cart-close-btn {
  width: 32px;
  height: 32px;
  border: 2px solid #ff69b4;
  border-style: outset;
  background: linear-gradient(180deg, #fff 0%, #ffe4e9 100%);
  color: #8b008b;
  font-weight: bold;
  font-size: 18px;
  line-height: 1;
}

.cart-items {
  padding: 12px 0;
}

.cart-empty {
  margin: 0;
  color: #666;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ffd3dd;
}

.cart-item-main {
  min-width: 0;
}

.cart-item-name {
  margin: 0 0 4px;
  color: #8b008b;
  font-weight: bold;
  font-size: 14px;
}

.cart-item-price {
  margin: 0;
  font-size: 12px;
  color: #555;
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 2px solid #ff69b4;
  border-style: outset;
  background: #fff;
  color: #8b008b;
  font-family: 'Orbitron';
  font-weight: bold;
}

.qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 13px;
}

.cart-footer {
  border-top: 2px solid #ffc0cb;
  padding-top: 12px;
}

.cart-total-line {
  margin: 0 0 12px;
  color: #8b008b;
}

.cart-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .products-header-row {
    align-items: center;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .cart-panel-inner {
    margin: 24px auto;
    width: min(520px, 96vw);
  }
}
