/* DSLD — Artisanal Heritage */

:root {
  --gold: #c9a227;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Header scroll state */
#main-header {
  background: transparent;
  border-color: transparent;
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

#main-header.is-scrolled {
  background: rgba(252, 249, 244, 0.92);
  backdrop-filter: blur(12px);
  border-color: #dac2b6;
  box-shadow: 0 8px 24px rgba(108, 47, 0, 0.04);
}

#main-header.solid {
  background: #fcf9f4;
  border-bottom: 1px solid #dac2b6;
}

#main-header.over-hero {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}
#main-header.over-hero:not(.is-scrolled) .header-link,
#main-header.over-hero:not(.is-scrolled) .header-brand,
#main-header.over-hero:not(.is-scrolled) .header-icon,
#main-header.over-hero:not(.is-scrolled) .lang-switch {
  color: #fcf9f4;
}

#main-header.over-hero:not(.is-scrolled) .header-tagline {
  color: rgba(252, 249, 244, 0.72);
}

#main-header.over-hero:not(.is-scrolled) .header-link:hover,
#main-header.over-hero:not(.is-scrolled) .header-brand:hover,
#main-header.over-hero:not(.is-scrolled) .header-icon:hover {
  color: #f2c97e;
}

#main-header.over-hero:not(.is-scrolled) .cart-count {
  background: #fd8a3e;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  background: #6c2f00;
  color: #f2c97e;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
}
.lang-switch a {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.lang-switch a:hover,
.lang-switch a.is-active {
  opacity: 1;
}
.lang-switch a.is-active {
  pointer-events: none;
}
.lang-switch--mobile {
  color: #6c2f00;
  font-size: 13px;
}

/* Geometric motif divider */
.motif-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
}

.motif-divider::before,
.motif-divider::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: #dac2b6;
}

.motif-divider-icon {
  width: 28px;
  height: 10px;
  background: #6c2f00;
  clip-path: polygon(0 50%, 25% 0, 50% 50%, 75% 0, 100% 50%, 75% 100%, 50% 50%, 25% 100%);
  opacity: 0.85;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #6c2f00;
  color: #f2c97e;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), transform 0.2s var(--ease-out);
}

.btn-primary:hover {
  background: #8b4513;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #9a4600;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 27px;
  border-radius: 8px;
  border: 1px solid #9a4600;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.btn-secondary:hover {
  background: rgba(154, 70, 0, 0.06);
}

/* Inputs — bottom border only */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #54433a;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #877369;
  border-radius: 0;
  padding: 12px 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 16px;
  color: #1c1c19;
  outline: none;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-bottom: none;
  border: 1px solid #705313;
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 0 0 3px rgba(112, 83, 19, 0.08);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Product tile */
.product-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-tile__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0ede8;
  border-radius: 4px;
}

.product-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.product-tile:hover .product-tile__media img {
  transform: scale(1.04);
}

.product-tile__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #705313;
  color: #f2c97e;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 4px;
}

.product-tile__meta {
  margin-top: 16px;
}

.chip {
  display: inline-block;
  background: rgba(86, 60, 0, 0.1);
  color: #563c00;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 4px;
}

.chip.active,
.filter-chip.active {
  background: #6c2f00;
  color: #f2c97e;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  background: #f0ede8;
  color: #54433a;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.filter-chip:hover {
  border-color: #dac2b6;
}

/* Cart badge */
.cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #9a4600;
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

.cart-count--nav {
  top: -2px;
  right: -10px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(28, 28, 25, 0.35);
}

body.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .hero-brand,
  .hero-copy,
  .hero-cta,
  .product-tile__media img {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

.collection-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  min-height: 280px;
  color: #fcf9f4;
  text-decoration: none;
}

.collection-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.collection-card:hover img {
  transform: scale(1.05);
}

.collection-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 28, 25, 0.78), rgba(28, 28, 25, 0.15));
}

.collection-card__copy {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}
.reveal-delay-2 {
  transition-delay: 0.24s;
}
.reveal-delay-3 {
  transition-delay: 0.36s;
}

/* Hero brand mark */
.hero-brand {
  animation: heroFade 1.2s var(--ease-out) both;
}

.hero-copy {
  animation: heroFade 1.2s 0.2s var(--ease-out) both;
}

.hero-cta {
  animation: heroFade 1.2s 0.4s var(--ease-out) both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Engagement icons */
.engagement-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  border: 1px solid #dac2b6;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #fcf9f4;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease-out);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1c19;
  color: #f3f0eb;
  padding: 14px 22px;
  border-radius: 8px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
  box-shadow: 0 20px 40px rgba(139, 69, 19, 0.12);
}

@media (min-width: 768px) {
  .toast {
    bottom: 32px;
  }
}

.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Checkout steps */
.checkout-step {
  display: none;
}

.checkout-step.is-active {
  display: block;
  animation: heroFade 0.5s var(--ease-out) both;
}

.step-indicator {
  display: flex;
  gap: 8px;
  align-items: center;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #dac2b6;
}

.step-dot.is-active {
  background: #6c2f00;
  width: 24px;
}

/* Qty control */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dac2b6;
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  background: #f6f3ee;
  border: none;
  cursor: pointer;
  color: #6c2f00;
  font-size: 18px;
  line-height: 1;
}

.qty-control span {
  min-width: 40px;
  text-align: center;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

/* Pattern strip accent (Bogolan-inspired) */
.pattern-strip {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    #6c2f00 0 8px,
    #fcf9f4 8px 12px,
    #9a4600 12px 20px,
    #fcf9f4 20px 24px,
    #563c00 24px 28px,
    #fcf9f4 28px 32px
  );
  opacity: 0.35;
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 45;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.whatsapp-float:hover {
  transform: scale(1.06);
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 211, 102, 0.45);
}

.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gallery-main {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  background: #f0ede8;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.gallery-thumbs button {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #dac2b6;
  padding: 0;
  background: #f0ede8;
  cursor: pointer;
}

.gallery-thumbs button.is-active {
  border-color: #6c2f00;
  box-shadow: 0 0 0 1px #6c2f00;
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stock-ok {
  color: #6c2f00;
}

.stock-out {
  color: #ba1a1a;
}
