/* =========================================================
   Good Stock Creations — styles.css
   Clean, unified, production-safe
   ========================================================= */

/* ---------- Root variables ---------- */
:root{
  --bg: #f6f1e7;
  --bg2:#fbf7ef;
  --ink:#1f1f1f;
  --muted:#5a5a5a;
  --rule: rgba(31,31,31,.12);
  --card: rgba(255,255,255,.55);
  --shadow: 0 10px 30px rgba(31,31,31,.07);
  --shadow2: 0 16px 45px rgba(31,31,31,.11);
  --radius: 18px;
  --radius2: 26px;
  --max: 1080px;
  --serif: ui-serif, "Iowan Old Style", "Garamond", "Georgia", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*{ box-sizing: border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 25% -10%, rgba(145,104,64,.12), transparent 60%),
    radial-gradient(900px 600px at 110% 20%, rgba(70,90,80,.10), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  letter-spacing: .2px;
}

/* Default links: keep calm, but clearly interactive */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible{
  outline: 3px solid rgba(145,104,64,.35);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 70px;
}

/* ---------- Buttons / link-pills ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:10px 14px;
  border-radius:999px;

  border:1px solid rgba(31,31,31,.18);
  background: rgba(255,255,255,.45);
  box-shadow: 0 8px 18px rgba(31,31,31,.06);

  font-size:13.5px;
  font-weight:600;
  letter-spacing:.2px;

  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;

  text-decoration:none !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.btn:hover{
  background: rgba(255,255,255,.62);
  border-color: rgba(31,31,31,.30);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(31,31,31,.09);
}

.btn:active{
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(31,31,31,.07);
}

/* Subtle secondary button */
.btn.ghost{
  background: rgba(255,255,255,.22);
  box-shadow:none;
}
.btn.ghost:hover{
  background: rgba(255,255,255,.45);
}

/* Etsy PRIMARY button */
.btn.etsy{
  background: rgba(31,31,31,.94);
  border-color: rgba(31,31,31,.94);
  color: var(--bg2);
  box-shadow: var(--shadow2);
}
.btn.etsy:hover{
  background: rgba(31,31,31,1);
  border-color: rgba(31,31,31,1);
  transform: translateY(-1px);
  box-shadow: 0 20px 55px rgba(31,31,31,.18);
}
/* subtle external cue */
.btn.etsy::after{
  content:"↗";
  font-weight:800;
  opacity:.9;
  transform: translateY(-1px);
}

/* Make non-Etsy external buttons also feel like links */
.btn.ghost[target="_blank"]::after,
a.btn.ghost[target="_blank"]::after{
  content:"↗";
  font-weight:800;
  opacity:.55;
  transform: translateY(-1px);
}

/* ---------- Header ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 0 16px;
  border-bottom:1px solid var(--rule);
}

.brand{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.brand-link{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo{
  height: 150px;
  width:auto;
  display:block;
}

.brand-name{
  font-family: var(--serif);
  font-weight:600;
  font-size:20px;
  letter-spacing:.4px;
}

.brand .tag{
  font-size:12.5px;
  color: var(--muted);
}

/* ---------- Nav ---------- */
.nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.nav a{
  font-size:13.5px;
  color: rgba(31,31,31,.92);
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(31,31,31,.18);
  background: rgba(255,255,255,.35);
  text-decoration: none !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.nav a:hover{
  background: rgba(255,255,255,.55);
  border-color: rgba(31,31,31,.30);
  transform: translateY(-1px);
}

.nav a.active{
  background: rgba(31,31,31,.08);
  border-color: rgba(31,31,31,.35);
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero{
  padding:34px 0 12px;
}

.h-eyebrow{
  font-size:12.5px;
  color: var(--muted);
  letter-spacing:.18em;
  text-transform:uppercase;
}

.h-title{
  margin:12px 0;
  font-family: var(--serif);
  font-weight:600;
  font-size:clamp(30px,4vw,44px);
  line-height:1.15;
}

.h-sub{
  color: rgba(31,31,31,.80);
  font-size:15.5px;
  line-height:1.7;
  max-width:62ch;
}

/* ---------- Section utility ---------- */
.section{ margin-top: 34px; }

.lead{
  color: rgba(31,31,31,.78);
  font-size:15px;
  line-height:1.7;
}

/* ---------- Pills ---------- */
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.pill{
  display:inline-block;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--rule);
  background: rgba(255,255,255,.55);
}

/* ---------- Hero card ---------- */
.hero-card{
  background: rgba(255,255,255,.52);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}

.smallrule{
  height:1px;
  background: var(--rule);
  margin: 14px 0;
}

/* ---------- Marquee / gallery ---------- */
.marquee{
  margin-top: 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.40);
  box-shadow: var(--shadow);
  position: relative;
}

/* Desktop: animated */
.marquee-track{
  display: flex;
  gap: 12px;
  padding: 14px;
  width: max-content;
  animation: marquee 18s linear infinite;
}

/* Pause only on true hover devices */
@media (hover:hover) and (pointer:fine){
  .marquee:hover .marquee-track{ animation-play-state: paused; }
}

/* Touch devices: native swipe scroll (no animation) */
@media (hover:none), (pointer:coarse){
  .marquee{
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    /* prevents some “stuck” feeling when the browser tries to chain-scroll */
    touch-action: pan-x;
  }
  .marquee-track{
    animation: none;
    padding-right: 26px;
  }
  .marquee-track img{ scroll-snap-align: start; }
}

.marquee-track img{
  height: 180px;
  width: auto;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(31,31,31,.10);

  /* reduce mobile long-press / drag weirdness */
  user-select:none;
  -webkit-user-drag:none;

  cursor: zoom-in;
}

@keyframes marquee{
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Edge fade mask (desktop) */
.marquee:before,
.marquee:after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width: 70px;
  pointer-events:none;
  z-index: 2;
}
.marquee:before{
  left:0;
  background: linear-gradient(90deg, rgba(246,241,231,1), rgba(246,241,231,0));
}
.marquee:after{
  right:0;
  background: linear-gradient(270deg, rgba(246,241,231,1), rgba(246,241,231,0));
}

@media (max-width: 560px){
  .marquee-track img{ height: 150px; }
  .marquee:before, .marquee:after{ width: 36px; }
}

/* ---------- CTA row ---------- */
.cta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-top: 14px;
}

/* Social links: always look like pills */
.social-links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.social-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid rgba(31,31,31,.18);
  background: rgba(255,255,255,.35);
  font-size:13.5px;
  font-weight:700;
  text-decoration:none !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

/* give a subtle “link cue” without clutter */
.social-links a::after{
  content:"↗";
  font-weight:800;
  opacity:.55;
  margin-left:8px;
  transform: translateY(-1px);
}

.social-links a:hover{
  background: rgba(255,255,255,.55);
  border-color: rgba(31,31,31,.30);
  transform: translateY(-1px);
}

/* ---------- About: hero layout with photo + copy ---------- */
.hero-about .about-grid{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.hero-about .about-photo{ max-width: 460px; }

.hero-about .about-photo img{
  width: 100%;
  height: clamp(360px, 48vw, 520px);
  object-fit: cover;
  object-position: center 20%;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  display: block;
}

@media (max-width: 820px){
  .hero-about .about-grid{
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .hero-about .about-photo img{
    max-width: 520px;
    height: clamp(320px, 85vw, 520px);
    object-fit: cover;
    object-position: center 20%;
    margin: 0 auto;
  }
}

/* ---------- Controls / Inputs ---------- */
.controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin:10px 0 18px;
}

select, input[type="search"], input.field, textarea, select.field{
  background: rgba(255,255,255,.55);
  border:1px solid var(--rule);
  border-radius: 14px;
  padding:10px 12px;
  font-size:13.5px;
  outline:none;
}
input[type="search"]{ border-radius:999px; }

textarea{
  width:100%;
  min-height: 120px;
  resize: vertical;
}

/* ---------- Form ---------- */
.form label{
  display:block;
  font-size:13px;
  color: rgba(31,31,31,.80);
  margin-bottom:6px;
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

@media (max-width: 640px){
  .row{ grid-template-columns: 1fr; }
}

.help{
  margin-top:12px;
  font-size:13px;
  color: rgba(31,31,31,.70);
}

/* ---------- Grid ---------- */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:14px;
}

.card{
  grid-column:span 4;
  background: rgba(255,255,255,.54);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  transition:transform .18s ease, box-shadow .18s ease;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(31,31,31,.09);
}

@media (max-width:920px){ .card{ grid-column:span 6; } }
@media (max-width:560px){ .card{ grid-column:span 12; } }

/* ---------- Card media ---------- */
.card-media{
  overflow: hidden;
  position: relative;
  background: transparent;
}

.card-media img{
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Card body spacing */
.card .pill,
.card .card-title,
.card .card-desc,
.card .card-meta,
.card .sku{
  padding-left: 14px;
  padding-right: 14px;
}

.card-title{
  margin:0 0 6px;
  font-family:var(--serif);
  font-weight:600;
  font-size:16.5px;
}

.card-desc{
  margin:0 0 10px;
  color: rgba(31,31,31,.76);
  font-size:13.5px;
  line-height:1.65;
}

/* ---------- Card meta ---------- */
.card-meta{
  display:grid;
  grid-template-columns:max-content 1fr;
  gap:10px 12px;
  align-items:center;
  border-top:1px solid var(--rule);
  padding-top:10px;
  margin-top:10px;
  font-size:12.5px;
}

.note{
  opacity: .85;
  min-width: 0;
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sku{
  display:block;
  margin-top:8px;
  padding-top:8px;
  padding-left:12px;
  border-top: 1px solid var(--rule);
  font-size:12.5px;
  color: rgba(31,31,31,.74);
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- Status pills ---------- */
.status{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:500;
  line-height:1;
  white-space:nowrap;
}

.status-in_stock{
  background:#e7f5ec;
  color:#1f7a4a;
  border:1px solid #bfe6cf;
}

.status-made_to_order{
  background:#fff3df;
  color:#8a5a12;
  border:1px solid #f1d7a6;
}

.status-out_of_stock{
  background:#fdeaea;
  color:#8b2d2d;
  border:1px solid #f2bcbc;
}

/* ---------- Footer ---------- */
.footer{
  margin-top:42px;
  padding-top:18px;
  border-top:1px solid var(--rule);
  display:flex;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  color: rgba(31,31,31,.74);
  font-size:13px;
  line-height:1.6;
}

.parent-company{
  display:block;
  margin-top:4px;
  font-size:12px;
  color: rgba(31,31,31,.55);
  letter-spacing:.02em;
  text-transform: none;
}

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(31,31,31,.68);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 9999;
}

.lightbox.open{ display:flex; }

.lightbox-inner{
  width: min(980px, 96vw);
  max-height: 92vh;
  background: rgba(251,247,239,.92);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  box-shadow: 0 25px 90px rgba(0,0,0,.35);
  overflow: hidden;
  position: relative;
}

.lightbox-img{
  width: 100%;
  height: 100%;
  max-height: 92vh;
  display:block;
  object-fit: contain;
  background: transparent;
}

.lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(31,31,31,.18);
  background: rgba(255,255,255,.55);
  font-weight: 800;
  cursor:pointer;
}