/* ============================================================
   FONTS
   ============================================================ */
@font-face {
  font-family: 'Kindergarten';
  src: url('../scripts/kindergarten.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #000000;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================================
   SHARED HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid #ebebeb;
}

.header-left {
  width: 140px;
  display: flex;
  align-items: center;
}

.header-logo-link img {
  height: 26px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.nav-filter {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  color: #000;
  opacity: 0.35;
  padding: 6px 16px;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.nav-filter:hover,
.nav-filter.active {
  opacity: 1;
}

.header-right {
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  -webkit-tap-highlight-color: transparent;
}

.cart-btn svg {
  display: block;
  stroke: currentColor;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #000;
  color: #fff;
  font-size: 9px;
  font-weight: 500;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.cart-count.hidden {
  display: none;
}

/* ============================================================
   BACK LINK
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000000;
  text-decoration: none;
  padding: 16px 28px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.back-link:hover {
  opacity: 1;
}

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #ebebeb;
  flex-shrink: 0;
}

.cart-drawer-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #000;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.cart-close:hover {
  opacity: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
  padding: 60px 0;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #f5f5f5;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.cart-item-name {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cart-item-size,
.cart-item-price {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.04em;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  align-self: flex-start;
  flex-shrink: 0;
  transition: color 0.15s;
}

.cart-item-remove:hover {
  color: #000;
}

.cart-continue {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  opacity: 0.4;
  padding: 16px 0 4px;
  text-align: center;
  transition: opacity 0.15s;
}
.cart-continue:hover { opacity: 1; }

.cart-footer {
  padding: 16px 24px;
  border-top: 1px solid #ebebeb;
  flex-shrink: 0;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cart-subtotal span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkout-btn {
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  padding: 15px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.checkout-btn:hover {
  background: #222;
}

/* ============================================================
   HOME PAGE
   ============================================================ */
.page-home {
  background: #ffffff;
  color: #000;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 52px;
  position: relative;
  padding: 60px 40px;
}

.hero-logo {
  max-width: 380px;
  width: 100%;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-cta {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 14px 52px;
  transition: all 0.2s ease;
}

.hero-cta:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.hero-tagline {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.25);
  animation: fadeUpDown 2s ease-in-out infinite;
}

@keyframes fadeUpDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.25; }
  50% { transform: translateX(-50%) translateY(-6px); opacity: 0.5; }
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.page-shop {
  background: #fff;
}

.page-product {
  background: #fff;
}

.header-collection-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  color: #000;
}

/* GRID */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 18px 18px;
  background: #fff;
}

.product-card-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 12px;
  width: 100%;
}

.product-card-image img {
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.06);
}

.product-card-info {
  padding-top: 14px;
  text-align: center;
}

.product-card-name {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: #000;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 50% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.3s ease;
}

.product-card:hover .product-card-name {
  background-size: 100% 1px;
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 80px;
}

/* GALLERY COLUMN */
.product-gallery {
  width: 100%;
  max-width: 480px;
  height: 320px;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
  margin: 0 auto;
}

/* CAROUSEL */
.carousel {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.36s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
  will-change: transform;
  user-select: none;
}

.carousel-track.grabbing {
  cursor: grabbing;
  transition: none;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.carousel-slide img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

.carousel-slide.placeholder {
  background: #e3e3e1;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #b0b0b0;
}

.placeholder-inner svg {
  stroke: #b8b8b8;
}

.placeholder-inner span {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8b8b8;
}

/* Arrow buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s, opacity 0.2s;
  color: #000;
  -webkit-tap-highlight-color: transparent;
}

.carousel-btn svg {
  stroke: currentColor;
}

.carousel-btn:hover {
  background: #fff;
}

.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

/* Dot indicators */
.carousel-dots {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  flex-shrink: 0;
  background: transparent;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: #000;
  transform: scale(1.4);
}

/* INFO COLUMN */
.product-info {
  width: 100%;
  max-width: 480px;
  padding: 14px 24px 0;
  text-align: center;
}

.product-info-header {
  margin-bottom: 24px;
}

.product-info-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}

.product-info-price {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #555;
  margin-top: 10px;
}

.size-section {
  margin-bottom: 24px;
}

.size-label {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.size-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: #aaa;
  font-family: inherit;
  transition: color 0.15s;
}

.size-btn:hover {
  color: #000;
}

.size-btn.selected {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.add-to-cart-btn {
  display: block;
  margin: 0 auto 14px;
  width: auto;
  min-width: 220px;
  background: #000;
  color: #fff;
  border: none;
  padding: 16px 48px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.add-to-cart-btn:hover {
  background: #1a1a1a;
}

.add-to-cart-btn.added {
  background: #2a2a2a;
}

.product-divider {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 24px 0;
}

.product-description-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 10px;
  display: block;
  text-align: center;
}

.product-description-text {
  font-size: 12px;
  line-height: 1.9;
  color: #666;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Shake animation for size selector */
.size-section.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .shop-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .product-gallery {
    height: 56vw;
    min-height: 220px;
    max-width: 100%;
  }

  .product-info {
    max-width: 100%;
  }

  .add-to-cart-btn {
    min-width: 180px;
    padding: 15px 36px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0 16px;
  }

  .header-left {
    width: 100px;
  }

  .header-right {
    width: 60px;
  }

  .header-nav {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-filter {
    padding: 6px 10px;
    font-size: 10px;
  }

  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-card {
    padding: 16px 10px 12px;
  }

  .product-card-image {
    min-height: 160px;
  }

  .product-card-image img {
    max-height: 180px;
  }

  .product-info {
    padding: 32px 20px 48px;
  }

  .hero-logo {
    max-width: 280px;
  }

  .hero-cta {
    padding: 13px 40px;
  }
}

@media (max-width: 480px) {
  .header-logo-link img {
    height: 22px;
  }

  .product-gallery {
    height: 88vw;
    min-height: 300px;
  }
}
