/* ============================================================
   PERCHAMMON — forms, drawer, footer, responsive
   ============================================================ */

/* ---------- forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3.4vw, 2.6rem);
  box-shadow: var(--shadow-sm);
}
.section--dark .form-card {
  background: rgba(248,241,230,.05);
  border-color: rgba(248,241,230,.16);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .42rem;
}
.section--dark .field label { color: rgba(248,241,230,.66); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--cream-50);
  border: 1px solid rgba(85,50,31,.2);
  border-radius: var(--r-sm);
  padding: .78rem .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.section--dark .field input,
.section--dark .field select,
.section--dark .field textarea {
  background: rgba(20,11,7,.4);
  border-color: rgba(248,241,230,.2);
  color: var(--cream-50);
}
.section--dark .field input::placeholder,
.section--dark .field textarea::placeholder { color: rgba(248,241,230,.34); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--copper-500);
  box-shadow: 0 0 0 3px rgba(184,117,47,.16);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: #b4472f; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field-hint { font-size: .76rem; color: var(--muted); margin-top: .35rem; }
.section--dark .field-hint { color: rgba(248,241,230,.5); }

.check {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}
.check input { width: 16px; height: 16px; margin-top: .18rem; accent-color: var(--copper-600); flex: 0 0 auto; }
.section--dark .check { color: rgba(248,241,230,.66); }

.form-note {
  margin-top: 1rem;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
}
.form-status {
  margin-top: .9rem;
  font-size: .85rem;
  font-weight: 600;
  padding: .7rem .9rem;
  border-radius: var(--r-sm);
  display: none;
}
.form-status.is-ok { display: block; background: rgba(60,120,70,.1); color: #2f6b3a; border: 1px solid rgba(60,120,70,.24); }
.form-status.is-err { display: block; background: rgba(180,71,47,.08); color: #9c3a24; border: 1px solid rgba(180,71,47,.24); }
.section--dark .form-status.is-ok { background: rgba(120,200,140,.12); color: #a8e0b4; border-color: rgba(120,200,140,.3); }

/* split layout for contact / wholesale */
.split {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: start;
}
.split__aside h2 { margin-bottom: 1rem; }
.split__aside p { color: var(--muted); font-size: .96rem; }
.section--dark .split__aside p { color: rgba(248,241,230,.72); }

.contact-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .9rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; font-size: .92rem; }
.contact-list svg { width: 17px; height: 17px; color: var(--copper-500); flex: 0 0 auto; margin-top: .22rem; }
.section--dark .contact-list svg { color: var(--gold-300); }
.contact-list a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.contact-list a:hover { border-bottom-color: currentColor; }
.contact-list small { display: block; color: var(--muted); font-size: .78rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: .25rem;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding-block: 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--copper-600); }
.faq summary:focus-visible { outline: 2px solid var(--copper-500); outline-offset: 4px; border-radius: 4px; }
.faq summary::after {
  content: "";
  width: 11px; height: 11px;
  flex: 0 0 auto;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  rotate: 45deg;
  transition: rotate .3s, translate .3s;
  margin-top: -4px;
}
.faq details[open] summary::after { rotate: -135deg; margin-top: 4px; }
.faq__body { padding-bottom: 1.3rem; color: var(--muted); font-size: .94rem; max-width: 68ch; }
.faq__body p:last-child { margin-bottom: 0; }

/* ---------- cart drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,11,7,.5);
  backdrop-filter: blur(3px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100%);
  background: var(--cream-50);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.32,.72,0,1);
  box-shadow: -12px 0 48px rgba(20,11,7,.22);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
}
.drawer__head h2 { font-size: 1.15rem; }
.drawer__close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background .2s, border-color .2s;
}
.drawer__close:hover { background: var(--cream-200); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1.1rem 1.35rem; }
.drawer__foot { border-top: 1px solid var(--line); padding: 1.1rem 1.35rem 1.35rem; background: var(--cream-100); }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: .92rem; }
.cart-empty svg { width: 40px; height: 40px; margin: 0 auto 1rem; opacity: .4; }

.cart-line {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: .9rem;
  align-items: start;
  padding-block: .9rem;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-of-type { border-bottom: 0; }
.cart-line__img { width: 62px; height: 62px; border-radius: var(--r-sm); object-fit: cover; background: var(--cream-200); }
.cart-line__name { font-weight: 600; font-size: .9rem; line-height: 1.35; }
.cart-line__meta { font-size: .76rem; color: var(--muted); margin-top: .15rem; }
.cart-line__price { font-size: .9rem; font-weight: 600; color: var(--copper-600); text-align: right; white-space: nowrap; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 100px;
  margin-top: .5rem;
  overflow: hidden;
}
.qty button {
  width: 26px; height: 26px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  color: var(--bark-700);
  display: grid;
  place-items: center;
  transition: background .18s;
}
.qty button:hover { background: var(--cream-200); }
.qty span { min-width: 26px; text-align: center; font-size: .82rem; font-weight: 600; }
.cart-line__rm {
  background: none; border: 0; padding: 0;
  font-size: .72rem; color: var(--muted);
  cursor: pointer; text-decoration: underline;
  margin-top: .3rem;
}
.cart-line__rm:hover { color: #9c3a24; }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .35rem;
  font-size: .95rem;
}
.cart-total strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--bark-800); }
.cart-footnote { font-size: .74rem; color: var(--muted); margin-bottom: 1rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bark-900);
  color: rgba(248,241,230,.66);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  font-size: .88rem;
}
.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, .8fr));
  gap: clamp(1.6rem, 4vw, 3rem);
  padding-bottom: 2.6rem;
  border-bottom: 1px solid rgba(248,241,230,.12);
}
.foot-brand .brand { color: var(--cream-50); margin-bottom: 1rem; }
.foot-brand p { max-width: 34ch; font-size: .86rem; }
.foot-col h4 {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream-200);
  margin-bottom: .95rem;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot-col a { transition: color .2s; }
.foot-col a:hover { color: var(--gold-300); }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.6rem;
  font-size: .78rem;
  color: rgba(248,241,230,.44);
}
.foot-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(248,241,230,.2);
  border-radius: 100px;
  padding: .32rem .75rem;
  font-size: .72rem;
  letter-spacing: .06em;
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: #1f6f4a;
  color: #fff;
  border-radius: 100px;
  padding: .78rem 1.1rem;
  font-size: .86rem;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(31,111,74,.34);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .25s;
}
.wa-float:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 30px rgba(31,111,74,.44); background: #227c53; }
.wa-float svg { width: 19px; height: 19px; }
.wa-float span { display: inline; }

/* ---------- sub pages ---------- */
.page-hero {
  padding-block: 132px clamp(2rem, 4vw, 3.4rem);
  background: var(--bark-900);
  color: var(--cream-100);
}
.page-hero .eyebrow { color: var(--gold-300); }
.page-hero h1 { color: var(--cream-50); font-size: clamp(2rem, 4.4vw, 3.2rem); }
.page-hero p { color: rgba(248,241,230,.74); max-width: 58ch; margin-top: 1rem; }

.legal { max-width: 760px; }
.legal h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-top: 2.4rem; margin-bottom: .8rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted); font-size: .94rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .45rem; }
.legal .updated { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--copper-600); }

/* ---------- reveal (JS adds .is-in) ---------- */
[data-reveal] { opacity: 0; }
.no-js [data-reveal] { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .tl-item { grid-template-columns: 1fr; gap: 1rem; }
  .tl-item:nth-child(even) .tl-item__media { order: 0; }
  .tl-item__dot { top: 2.2rem; translate: 0 0; }
  .cmp { grid-template-columns: 1fr; }
  .cmp__col--ours { order: -1; }
  .scroll-hint { display: none; }
}

@media (max-width: 780px) {
  html { scroll-padding-top: 68px; }
  .nav { height: 62px; gap: .8rem; }
  .nav__links {
    position: fixed;
    inset: 62px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream-50);
    padding: .6rem var(--gutter) 1.2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform .4s cubic-bezier(.3,.7,.2,1);
    margin: 0;
    z-index: 89;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links li { border-bottom: 1px solid var(--line); }
  .nav__links li:last-child { border-bottom: 0; }
  .nav__links a { display: block; padding-block: .9rem; color: var(--bark-800) !important; font-size: .95rem; }
  .nav__links a::after { display: none; }
  .menu-toggle { display: grid; }
  .cart-btn span.cart-btn__label { display: none; }
  .pill-select { font-size: .74rem; padding: .36rem .55rem; }

  .hero { min-height: 88svh; padding-block: 108px 40px; }
  .hero__trust { gap: .9rem 1.2rem; font-size: .76rem; }
  .hero__cta .btn { flex: 1 1 auto; }

  .field-row { grid-template-columns: 1fr; }
  .wa-float span { display: none; }
  .wa-float { padding: .85rem; }
  .drawer { width: 100%; }
  .foot-top { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .prod-card__body { padding: 1.15rem; }
  .why-card { padding: 1.3rem; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.9rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__media { transform: none !important; }
  .strip__track { animation: none; }
}
