/* ============================================================================
   Darbar Azim — Design System
   Palette (Dribbble reference 26955717):
   paper #F1F0ED · ink #1A140F · terracotta #A25E3B · rust #5A2615
   sand #B09369 · khaki #C6BD9B · indigo #4B468F · taupe #5B5443
   ============================================================================ */

:root {
  --paper:  #F1F0ED;
  --paper2: #E9E6DF;
  --card:   #FBFAF8;
  --ink:    #1A140F;
  --ink2:   #5B5443;
  --terra:  #A25E3B;
  --terra2: #C97B4E;
  --rust:   #5A2615;
  --sand:   #B09369;
  --khaki:  #C6BD9B;
  --indigo: #4B468F;
  --olive:  #6C7A3F;
  --wa:     #1FA855;
  --line:   rgba(26, 20, 15, .12);
  --line2:  rgba(26, 20, 15, .08);
  --shadow: 0 18px 40px -18px rgba(26, 20, 15, .22);
  --shadow-sm: 0 8px 20px -10px rgba(26, 20, 15, .18);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(162, 94, 59, .28); color: var(--ink); }

/* predictable sizing: padding + border count INSIDE width — without this,
   width:100% inputs and pill nav overflow their containers on phones */
*, *::before, *::after { box-sizing: border-box; }

/* warm thin scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper2); }
::-webkit-scrollbar-thumb { background: #CBC5B8; border-radius: 99px; border: 2px solid var(--paper2); }
::-webkit-scrollbar-thumb:hover { background: var(--sand); }

/* ---------------------------------------------------------------- type */
.font-display, h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.font-mono, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.display-hero {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
}
.display-2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra);
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 99px;
  background: var(--terra);
  box-shadow: 0 0 0 4px rgba(162, 94, 59, .15);
}
.eyebrow.on-dark { color: var(--sand); }
.eyebrow.on-dark::before { background: var(--sand); box-shadow: 0 0 0 4px rgba(176, 147, 105, .18); }

.lede { color: var(--ink2); font-size: 15.5px; line-height: 1.75; }

/* hero squiggle underline */
.squiggle { position: relative; white-space: nowrap; color: var(--terra); }
.squiggle svg {
  position: absolute; left: 0; bottom: -0.18em; width: 100%; height: .32em; overflow: visible;
}
.squiggle svg path {
  fill: none; stroke: var(--terra2); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 560; stroke-dashoffset: 560;
  animation: squiggleDraw 1.1s .5s cubic-bezier(.6, .05, .3, 1) forwards;
}
@keyframes squiggleDraw { to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- layout helpers */
/* [hidden] must always win — .alert and other display-flex blocks
   would otherwise override the HTML hidden attribute (the cause of
   "we received your message" showing before any submit). */
[hidden] { display: none !important; }
.alert[hidden] { display: none !important; }
.alert-ok[hidden] { display: none !important; }

/* never allow anything to push the page wider than the screen (mobile) */
html, body { overflow-x: clip; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 28px; } }

.section { padding-block: clamp(2.2rem, 5vw, 4rem); }

.band {
  background: var(--ink);
  color: #EFE9DD;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}
.band-terra {
  background: linear-gradient(115deg, var(--rust) 0%, var(--terra) 55%, var(--terra2) 100%);
  color: #FFF6EC;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}
.band .eyebrow { color: var(--sand); }
.band h2, .band-terra h2 { color: #fff; }

/* hex background pattern */
.hexbg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 2 52 15v26L28 54 4 41V15Z' fill='none' stroke='%231A140F' stroke-opacity='.055' stroke-width='1.2' transform='translate(0,-10)'/%3E%3Cpath d='M28 34 52 47v26L28 86 4 73V47Z' fill='none' stroke='%231A140F' stroke-opacity='.055' stroke-width='1.2' transform='translate(0,-10)'/%3E%3C/svg%3E"); }
.hexbg-dark { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 2 52 15v26L28 54 4 41V15Z' fill='none' stroke='%23F1F0ED' stroke-opacity='.05' stroke-width='1.2' transform='translate(0,-10)'/%3E%3Cpath d='M28 34 52 47v26L28 86 4 73V47Z' fill='none' stroke='%23F1F0ED' stroke-opacity='.05' stroke-width='1.2' transform='translate(0,-10)'/%3E%3C/svg%3E"); }

/* floating blobs */
.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  animation: blobFloat 16s ease-in-out infinite alternate;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(38px, -30px) scale(1.1); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2.5deg); }
}
.mol-float { position: absolute; pointer-events: none; animation: floaty 9s ease-in-out infinite; }
.mol-float.f2 { animation-delay: -3s; animation-duration: 11s; }
.mol-float.f3 { animation-delay: -6s; animation-duration: 8s; }

/* ---------------------------------------------------------------- scroll reveal */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.rv.in { opacity: 1; transform: none; }
.rv-l { opacity: 0; transform: translateX(-26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.rv-l.in { opacity: 1; transform: none; }
.rv-r { opacity: 0; transform: translateX(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.rv-r.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv-l, .rv-r { opacity: 1 !important; transform: none !important; transition: none !important; }
  .squiggle svg path { animation: none; stroke-dashoffset: 0; }
  .blob, .mol-float { animation: none !important; }
}

/* ---------------------------------------------------------------- glass cards */
.glass {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.glass-hover { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease, border-color .25s ease; }
.glass-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(162, 94, 59, .3); }

.lift { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: .78rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 17px; height: 17px; }

.btn-primary { background: var(--terra); color: #fff; box-shadow: 0 12px 26px -12px rgba(162, 94, 59, .6); }
.btn-primary:hover { background: var(--terra2); transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(162, 94, 59, .65); }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #2A2118; transform: translateY(-1px); }

.btn-outline { border-color: rgba(26, 20, 15, .28); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 12px 26px -12px rgba(31, 168, 85, .55); }
.btn-wa:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-indigo { background: var(--indigo); color: #fff; }
.btn-indigo:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--terra); color: var(--terra); }

.btn-mini { padding: .45rem .95rem; font-size: 12.5px; }
.btn-mini .ic { width: 14px; height: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.ic { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .22rem .6rem;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink2);
  background: #fff;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-cas { font-family: 'JetBrains Mono', monospace; font-size: 11px; background: rgba(75, 70, 143, .07); border-color: rgba(75, 70, 143, .28); color: var(--indigo); }
.chip-stock { background: rgba(108, 122, 63, .12); border-color: rgba(108, 122, 63, .35); color: #52602B; }
.chip-amber { background: rgba(162, 94, 59, .12); border-color: rgba(162, 94, 59, .35); color: #8A4E2C; }
.chip-ghost { background: transparent; border-color: var(--line); color: var(--ink2); }
.chip-dark { background: rgba(26, 20, 15, .06); border-color: rgba(26, 20, 15, .14); color: var(--ink); }

/* ---------------------------------------------------------------- molecule tiles */
.mol {
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--mol-c1, var(--terra));
  background:
    radial-gradient(130% 130% at 18% 8%, #fff 0%, transparent 60%),
    linear-gradient(155deg, rgba(255, 255, 255, .92), color-mix(in srgb, var(--mol-c1, var(--terra)) 10%, #fff) 70%, color-mix(in srgb, var(--mol-c2, var(--sand)) 18%, #fff) 100%);
  border: 1px solid color-mix(in srgb, var(--mol-c1, var(--terra)) 22%, transparent);
  position: relative;
  overflow: hidden;
}
.mol::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(90% 70% at 80% 100%, color-mix(in srgb, var(--mol-c2, var(--sand)) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.mol-svg { width: 70%; height: 70%; max-width: 100%; }
.mol-bond {
  stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 230; stroke-dashoffset: 0;
}
.mol-bond2 { opacity: .5; stroke-width: 2.4; }
.mol-atom { fill: currentColor; }
.mol-ring { fill: none; stroke: currentColor; stroke-width: 2.6; }
.mol-dot { fill: currentColor; opacity: .85; }

/* bond draw-in animation: on scroll reveal (.mol-in) and on hover */
.mol-anim .mol-bond { stroke-dashoffset: 230; transition: stroke-dashoffset 1.15s cubic-bezier(.55, .06, .28, .99) .12s; }
.mol-anim.mol-in .mol-bond, .mol-anim:hover .mol-bond { stroke-dashoffset: 0; }
.mol-anim .mol-atom, .mol-anim .mol-ring, .mol-anim .mol-dot { opacity: 0; transition: opacity .5s ease .75s; }
.mol-anim.mol-in .mol-atom, .mol-anim.mol-in .mol-ring, .mol-anim.mol-in .mol-dot,
.mol-anim:hover .mol-atom, .mol-anim:hover .mol-ring, .mol-anim:hover .mol-dot { opacity: 1; }

.mol-tile { width: 100%; aspect-ratio: 16 / 10; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
.mol-hero { width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; }
.mol-hero .mol-svg { width: 62%; height: 62%; }
.mol-glyph { width: 46px; height: 46px; border-radius: 12px; }
.mol-glyph .mol-svg { width: 74%; height: 74%; }
.mol-float-box { width: 92px; height: 92px; border-radius: 22px; box-shadow: var(--shadow-sm); }
.mol-float-box.f2 { width: 74px; height: 74px; }
.mol-float-box.f3 { width: 60px; height: 60px; }

/* ---------------------------------------------------------------- product card */
.pcard {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2, .7, .2, 1), box-shadow .28s ease, border-color .28s ease;
}
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(162, 94, 59, .35); }
.pcard-top { position: relative; display: block; }
.pcard-top .chip { position: absolute; top: 10px; left: 10px; z-index: 2; backdrop-filter: blur(4px); background: rgba(255, 255, 255, .85); }
.pcard-flag {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--ink); color: var(--sand);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: .28rem .6rem;
}
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-cat { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.pcard-name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); }
.pcard-name a { color: inherit; text-decoration: none; transition: color .15s; }
.pcard-name a:hover { color: var(--terra); }
.pcard-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pcard-origin {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: 11.5px; color: var(--ink2); line-height: 1.3;
}
.pcard-origin .ic { width: 13px; height: 13px; color: var(--terra); flex: none; }
.pcard-origin b { color: var(--ink); font-weight: 700; }
.chip-origin .ic { width: 13px; height: 13px; }
/* real product photo inside a molecule-tile frame */
.mol.has-img { overflow: hidden; }
.mol.has-img::after { display: none; }
.mol.has-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: inherit; position: relative; z-index: 1;
}
/* specifications table (product detail page) */
.specs-table-wrap { margin-top: 16px; }
.specs-table {
  width: 100%; max-width: 560px; border-collapse: separate; border-spacing: 0; margin-top: 8px;
  background: var(--paper); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden;
}
.specs-table th, .specs-table td {
  text-align: left; padding: 9px 14px; font-size: 12.5px; line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: 0; }
.specs-table th { width: 42%; font-weight: 600; color: var(--ink2); background: rgba(176, 147, 105, .07); }
.specs-table td { color: var(--ink); font-weight: 600; }
.specs-note { color: var(--ink2); font-weight: 500; }
.pcard-foot { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 9px; }
.pcard-price { font-size: 12.5px; color: var(--ink2); }
.pcard-price b { color: var(--ink); font-weight: 700; }
.pcard-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.pcard-actions .btn { flex: 1; min-width: 104px; }
.pcard-actions .btn .ic { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- marquee */
.marquee {
  overflow: hidden;
  background: var(--ink);
  border-block: 1px solid rgba(241, 240, 237, .12);
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  padding-block: .85rem;
  animation: mq 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 2.6rem;
  padding-inline: 1.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #C9C0AC;
  white-space: nowrap;
}
.marquee-item b { color: var(--sand); font-weight: 700; }
.marquee-item::after { content: '✦'; color: var(--terra2); font-size: 12px; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- nav */
.nav-shell {
  position: sticky;
  top: 10px;
  z-index: 60;
  padding-inline: 14px;
}
.nav-pill {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(251, 250, 248, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 9px 12px 9px 18px;
  box-shadow: 0 6px 24px -14px rgba(26, 20, 15, .25);
  transition: box-shadow .3s ease, background .3s ease;
}
.nav-pill.scrolled { box-shadow: 0 14px 34px -14px rgba(26, 20, 15, .35); background: rgba(251, 250, 248, .96); }
.nav-links { display: none; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-link {
  position: relative;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  padding: .5rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  transition: color .15s, background .15s;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); background: rgba(26, 20, 15, .05); }
.nav-link.nav-active { color: var(--terra); background: rgba(162, 94, 59, .1); }

.nav-drop {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.nav-drop.open { opacity: 1; transform: none; pointer-events: auto; }
.nav-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: .55rem .7rem;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
}
.nav-drop a:hover { background: rgba(162, 94, 59, .08); color: var(--terra); }

.nav-burger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
@media (min-width: 1024px) { .nav-burger { display: none; } }
.nav-mobile {
  position: absolute; inset-inline: 14px; top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { padding: .6rem .9rem; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink2); text-decoration: none; }
.nav-mobile a:hover { background: rgba(162, 94, 59, .08); color: var(--terra); }

.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--terra);
  color: #fff;
  font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
  padding-inline: 4px;
}

/* small phones: keep the pill nav inside the screen */
.nav-pill > a { min-width: 0; }
.nav-pill > a > span:last-child { min-width: 0; }
.nav-pill > a > span:last-child .mono {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw;
}
@media (max-width: 480px) {
  .nav-shell { padding-inline: 10px; }
  .nav-pill { gap: 8px; padding: 8px 8px 8px 12px; }
  .nav-pill > a > span:last-child > span:first-child { font-size: 15.5px; }
  .nav-pill > a > span:last-child .mono { font-size: 8.5px; letter-spacing: .1em; }
}

/* announcement strip */
.topstrip {
  background: var(--ink);
  color: #C9C0AC;
  font-size: 12.5px;
  position: relative;
  z-index: 70;
}
.topstrip .wrap { flex-wrap: wrap; row-gap: 2px; }
.topstrip .wrap > div { flex-wrap: wrap; row-gap: 2px; }
.topstrip a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.topstrip a:hover { color: var(--sand); }
@media (max-width: 640px) {
  .topstrip { font-size: 11.5px; }
  .topstrip .wrap { justify-content: center; }
  .topstrip .wrap > div { justify-content: center; }
}

/* ---------------------------------------------------------------- stats / counters */
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.on-dark .stat-num, .band .stat-num { color: #fff; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--ink2); letter-spacing: .04em; }
.band .stat-label { color: #B8AD99; }

/* ---------------------------------------------------------------- category tiles */
.cattile { position: relative; display: block; text-decoration: none; }
.cattile .mol { width: 52px; height: 52px; border-radius: 15px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.cattile:hover .mol { transform: rotate(-6deg) scale(1.06); }
.cattile-arrow { position: absolute; right: 16px; top: 16px; color: var(--khaki); transition: transform .25s ease, color .25s ease; }
.cattile:hover .cattile-arrow { transform: translateX(4px); color: var(--terra); }
.cattile-count { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: var(--terra); }

/* ---------------------------------------------------------------- forms */
.label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin-bottom: .45rem; }
.input, .select, .textarea {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(26, 20, 15, .18);
  border-radius: 13px;
  padding: .72rem 1rem;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3.5px rgba(162, 94, 59, .16);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%235B5443' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }

.field-err { border-color: #C0392B !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12) !important; }

/* ---------------------------------------------------------------- detail page */
.tier {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: .8rem 1.05rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tier:hover { border-color: rgba(162, 94, 59, .45); }
.tier.active { border-color: var(--terra); box-shadow: 0 0 0 3.5px rgba(162, 94, 59, .16); }
.tier input { accent-color: var(--terra); }
.tier-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.tier-sub { font-size: 11.5px; color: var(--ink2); font-family: 'JetBrains Mono', monospace; }
.tier-price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--terra); white-space: nowrap; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: .55rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink2);
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: all .18s ease;
}
.tab:hover { color: var(--ink); background: rgba(26, 20, 15, .05); }
.tab.active { background: var(--ink); color: var(--paper); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.safety-band {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(162, 94, 59, .08);
  border: 1px solid rgba(162, 94, 59, .25);
  border-radius: 16px;
  padding: 14px 16px;
  color: #7C4A2D;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- FAQ */
.faq-item { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); overflow: hidden; transition: border-color .2s; }
.faq-item[open] { border-color: rgba(162, 94, 59, .35); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1rem 1.2rem;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.faq-q .ic { transition: transform .25s ease; color: var(--terra); }
.faq-item[open] .faq-q .ic { transform: rotate(180deg); }
.faq-a { padding: 0 1.2rem 1.1rem; color: var(--ink2); font-size: 13.5px; line-height: 1.7; }

/* ---------------------------------------------------------------- toasts */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: .6rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(241, 240, 237, .15);
  border-radius: 999px;
  padding: .68rem 1.2rem;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.3);
}
.toast.err { background: #7C2D12; }
.toast.ok .ic { color: #8FD694; }
.toast.err .ic { color: #F3B39A; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

/* ---------------------------------------------------------------- social proof gadget */
.sp-toast {
  position: fixed;
  left: 18px; bottom: 18px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, calc(100vw - 36px));
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  transform: translateY(140%);
  transition: transform .55s cubic-bezier(.2, .8, .25, 1.15), opacity .4s ease;
  opacity: 0;
}
.sp-toast.show { transform: none; opacity: 1; }
.sp-toast .mol { flex: none; }
.sp-label { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); display: flex; align-items: center; gap: .4rem; }
.sp-label .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--olive); animation: spPulse 1.6s ease infinite; }
@keyframes spPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(108, 122, 63, .5); } 50% { box-shadow: 0 0 0 5px rgba(108, 122, 63, 0); } }
.sp-text { font-size: 12.5px; color: var(--ink); line-height: 1.45; margin-top: 2px; }
.sp-text b { font-weight: 700; }
.sp-close { flex: none; color: var(--khaki); background: none; border: 0; cursor: pointer; padding: 4px; border-radius: 8px; }
.sp-close:hover { color: var(--ink2); background: rgba(26, 20, 15, .05); }
@media (max-width: 640px) { .sp-toast { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(320px, calc(100vw - 24px)); } }

/* ---------------------------------------------------------------- quote drawer */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 20, 15, .45);
  backdrop-filter: blur(3px);
  z-index: 130;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.quote-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--paper);
  z-index: 140;
  transform: translateX(103%);
  transition: transform .4s cubic-bezier(.25, .8, .25, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -30px 0 70px -30px rgba(26, 20, 15, .5);
}
.quote-drawer.open { transform: none; }
.qd-head { padding: 18px 20px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; justify-content: space-between; background: var(--card); }
.qd-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.qd-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line2); background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.qd-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 10px 12px;
}
.qd-item .mol { flex: none; }
.qd-qty { display: flex; align-items: center; gap: 6px; }
.qd-qty button {
  width: 26px; height: 26px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff;
  font-weight: 800; color: var(--ink2); cursor: pointer;
  display: grid; place-items: center;
  line-height: 1;
}
.qd-qty button:hover { border-color: var(--terra); color: var(--terra); }
.qd-qty input { width: 46px; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: .3rem; font-size: 13px; font-weight: 600; }

/* ---------------------------------------------------------------- back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px;
  z-index: 100;
  width: 46px; height: 46px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: all .3s ease;
  box-shadow: var(--shadow);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--terra); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--ink);
  color: #B8AD99;
  margin-top: clamp(3rem, 7vw, 5rem);
  position: relative;
}
.site-footer a { color: #CFC7B4; text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: var(--sand); }
.footer-h { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sand); margin-bottom: 1rem; }
.footer-link { display: inline-block; padding-block: .28rem; font-size: 13.5px; }
.social-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(241, 240, 237, .07);
  border: 1px solid rgba(241, 240, 237, .1);
  color: #CFC7B4;
  transition: all .2s ease;
}
.social-btn:hover { background: var(--terra); border-color: var(--terra); color: #fff; transform: translateY(-2px); }

/* ---------------------------------------------------------------- generic page hero */
.page-hero {
  padding: clamp(2.4rem, 5vw, 3.6rem) 0 clamp(1.6rem, 3vw, 2.2rem);
  position: relative;
  overflow: hidden;
}

/* ---------------------------------------------------------------- tables (admin) */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink2);
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(162, 94, 59, .045); }

/* ---------------------------------------------------------------- admin shell */
.adm-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 1024px) { .adm-shell { grid-template-columns: 248px 1fr; } }
.adm-side {
  background: var(--ink);
  color: #B8AD99;
  padding: 18px 14px;
  display: none;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
@media (min-width: 1024px) { .adm-side { display: flex; } }
.adm-nav-group { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #7A6F5C; padding: 14px 12px 6px; }
.adm-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: .6rem .8rem;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #CFC7B4;
  text-decoration: none;
  transition: all .15s ease;
}
.adm-nav-item:hover { background: rgba(241, 240, 237, .07); color: #F1F0ED; }
.adm-nav-item.active { background: var(--terra); color: #fff; box-shadow: 0 8px 20px -10px rgba(162, 94, 59, .7); }
.adm-nav-item .ic { width: 16px; height: 16px; }
.adm-main { padding: 20px; min-width: 0; }
@media (min-width: 768px) { .adm-main { padding: 28px 32px; } }
.adm-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }

/* stat cards */
.stat-card { padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat-card .mol { position: absolute; right: -14px; bottom: -16px; width: 84px; height: 84px; opacity: .35; border: 0; background: none; filter: saturate(.7); }
.stat-card h4 { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.stat-card .v { font-family: 'Space Grotesk', sans-serif; font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; line-height: 1.55; }
.alert[hidden] { display: none !important; }
.alert-ok { background: rgba(108, 122, 63, .1); border: 1px solid rgba(108, 122, 63, .3); color: #52602B; }
.alert-err { background: rgba(192, 57, 43, .07); border: 1px solid rgba(192, 57, 43, .3); color: #8E2A20; }
.alert-warn { background: rgba(162, 94, 59, .08); border: 1px solid rgba(162, 94, 59, .3); color: #7C4A2D; }
.alert-info { background: rgba(75, 70, 143, .07); border: 1px solid rgba(75, 70, 143, .3); color: var(--indigo); }

/* search box in catalog */
.searchbox {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}
.searchbox:focus-within { border-color: var(--terra); box-shadow: 0 0 0 3.5px rgba(162, 94, 59, .14); }
.searchbox input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; color: var(--ink); }

.filter-chip {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--terra); color: var(--terra); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* empty state */
.empty-state { text-align: center; padding: 4rem 1.5rem; }
.empty-state .mol { width: 110px; height: 110px; margin-inline: auto; border-radius: 28px; }

/* misc */
.text-muted { color: var(--ink2); }
.mono { font-family: 'JetBrains Mono', monospace; }
.link-terra { color: var(--terra); font-weight: 600; text-decoration: none; }
.link-terra:hover { text-decoration: underline; }
.divider { border: 0; border-top: 1px dashed var(--line); margin-block: 1.2rem; }

/* responsive visibility helpers */
.hide-sm { display: none !important; }
@media (min-width: 640px) { .hide-sm { display: inline-flex !important; } }
.show-lg { display: none !important; }
@media (min-width: 1024px) { .show-lg { display: inline-flex !important; } }
.show-md { display: none !important; }
@media (min-width: 768px) { .show-md { display: inline-flex !important; } }

/* number ticker wrapper for overflow safety */
.count { font-variant-numeric: tabular-nums; }

/* print / misc safety */
img { max-width: 100%; }
a { color: inherit; }
input, select, textarea { max-width: 100%; }

/* two-col form rows: stacked on phones, side-by-side from 560px */
.two-col { grid-template-columns: 1fr !important; }
@media (min-width: 560px) { .two-col { grid-template-columns: 1fr 1fr !important; } }

/* long product names never break the layout */
.pcard-name, .tier-name, .qd-item > div > div:first-child { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- mobile hardening (v5) */
/* hero badge chip: allow wrapping so it can never force its column wider
   than a phone screen (the "fields and boxes out of the page" bug) */
.chip-hero { white-space: normal; line-height: 1.5; }
.form-side { position: sticky; top: 90px; }
@media (max-width: 560px) {
  .display-hero, .display-2 { overflow-wrap: anywhere; }
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; row-gap: 12px; }
  .stat-label { font-size: 10px; }
  .wrap { padding-inline: 16px; }
  .lede { font-size: 14.5px; line-height: 1.65; }
}
@media (max-width: 1023px) {
  /* sticky quote/contact forms jump and clip on phones — stack them instead */
  .form-side { position: static !important; }
}
/* every grid built from template inline styles collapses safely
   (!important beats the inline `1fr`; the per-page min-width:1024px
   media query re-enables two columns on desktop) */
.detail-grid, .contact-grid, .rfq-grid { grid-template-columns: minmax(0, 1fr) !important; }
/* quantity steppers and inputs never overflow their row */
.qd-qty { max-width: 132px; }
.qd-qty input { width: 100%; min-width: 0; }
.searchbox input { min-width: 0; }
/* admin tables scroll horizontally instead of pushing the page */
.table { min-width: 0; }
.adm-main { overflow-x: hidden; }
