/* Crochettiks independent storefront - original stylesheet, phase 1.
   Plain CSS, no framework, no build step. */
:root {
  --green: #243a30;
  --green-dark: #1a2c23;
  --cream: #fbf7f0;
  --paper: #ffffff;
  --ink: #2b2b26;
  --muted: #6b6a60;
  --line: #e6dfd2;
  --accent: #b3402a;
  --accent-dark: #93301d;
  --gold: #c9a227;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(36, 58, 48, 0.10);
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--font-head); color: var(--green); line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.9em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

/* Announcement bar */
.announce { background: var(--green); color: #fff; text-align: center; font-size: 0.85rem; padding: 9px 16px; letter-spacing: 0.02em; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.logo { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--green); text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { text-decoration: none; color: var(--ink); font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover, .main-nav a.active { background: var(--cream); color: var(--green); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 1.05rem; color: var(--green); position: relative; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { background: var(--cream); }
.cart-count { position: absolute; top: -5px; right: -5px; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.menu-btn { display: none; }
@media (max-width: 820px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 8px 20px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .header-inner { flex-wrap: wrap; }
}

/* Hero */
.hero { background: linear-gradient(180deg, #f3ecdd, var(--cream)); padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: 2.6rem; margin-bottom: 0.3em; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.4em; }
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; border: none; cursor: pointer; font-size: 1rem; font-weight: 600; padding: 13px 26px; border-radius: 999px; font-family: var(--font-body); }
.btn:hover { background: var(--green-dark); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Sections */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 0.95rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.center { text-align: center; }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.tile-body { padding: 12px 14px 14px; text-align: center; }
.tile-body h3 { margin: 0 0 2px; font-size: 1.05rem; }
.tile-body p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1020px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card a.card-img { display: block; }
.card img.cover { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; margin: 0; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--green); }
.price { font-weight: 700; color: var(--green); font-size: 1.05rem; }
.price s { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 0.9rem; }
.flags { display: flex; gap: 3px; align-items: center; }
.flags img { width: 15px; height: 15px; border-radius: 50%; object-fit: cover; }
.flags span { font-size: 0.78rem; color: var(--muted); margin-left: 5px; }
.card-actions { margin-top: auto; display: flex; gap: 8px; }
.card-actions .btn { flex: 1; padding: 10px 8px; font-size: 0.9rem; text-align: center; }
.card-actions .btn-ghost { flex: 0 0 auto; }

/* Why choose / info */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 820px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }
.info-grid .kicker { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; }
.info-grid h3 { margin: 4px 0 6px; }
.info-grid p { color: var(--muted); }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .reviews { grid-template-columns: 1fr; } }
.review { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.review .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.review blockquote { margin: 0 0 12px; font-style: italic; }
.review .who { display: flex; align-items: center; gap: 10px; }
.review .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.1rem; }
.review .who strong { display: block; font-size: 0.95rem; }
.review .who span { color: var(--muted); font-size: 0.85rem; }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-list details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 14px 18px; }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--green); list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; float: right; font-size: 1.2rem; }
.faq-list details[open ] summary::after { content: "–"; }
.faq-list details p { margin: 10px 0 2px; color: var(--muted); }

/* Product page */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 32px 0 48px; }
@media (max-width: 820px) { .product-layout { grid-template-columns: 1fr; gap: 24px; } }
.gallery-main img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button.active { border-color: var(--green); }
.gallery-thumbs img { width: 64px; height: 84px; object-fit: cover; display: block; }
.product-info .price { font-size: 1.4rem; }
.product-info .price s { font-size: 1rem; }
.buy-row { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 180px; }
.product-meta { font-size: 0.92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.product-meta p { margin-bottom: 6px; }
.desc-block h3 { margin-top: 1.2em; }
.desc-block ul { margin: 0 0 0.9em; padding-left: 20px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 0.92rem; color: var(--ink); text-decoration: none; }
.chip:hover { border-color: var(--green); }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.search-box { margin-left: auto; display: flex; gap: 8px; }
.search-box input { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; min-width: 220px; background: var(--paper); }

/* Steps (Start Here) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .num { font-family: var(--font-head); font-size: 1.8rem; color: var(--accent); font-weight: 700; }
.step h3 { margin: 6px 0; }

/* Forms */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form-card label { display: block; font-weight: 600; margin: 12px 0 4px; }
.form-card input, .form-card textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: var(--font-body); }
.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }

/* Cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: var(--paper); z-index: 61; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 1.2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px; }
.cart-line { display: flex; gap: 12px; margin-bottom: 14px; align-items: center; }
.cart-line img { width: 56px; height: 74px; object-fit: cover; border-radius: 8px; }
.cart-line .t { flex: 1; }
.cart-line .t strong { display: block; font-size: 0.92rem; }
.cart-line .t span { color: var(--muted); font-size: 0.88rem; }
.cart-line button { background: none; border: none; cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.empty-cart { color: var(--muted); text-align: center; padding: 32px 0; }
[hidden] { display: none !important; }

/* Search overlay */
.search-overlay { position: fixed; inset: 0; background: rgba(251, 247, 240, 0.98); z-index: 70; padding: 80px 20px 40px; overflow-y: auto; }
.search-overlay .narrow { position: relative; }
.search-overlay input { width: 100%; padding: 14px 18px; font-size: 1.2rem; border: 2px solid var(--green); border-radius: 12px; }
.search-close { position: absolute; top: -56px; right: 0; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--green); }
.search-results { margin-top: 20px; display: grid; gap: 10px; }
.search-result { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-decoration: none; color: var(--ink); }
.search-result img { width: 48px; height: 64px; object-fit: cover; border-radius: 6px; }
.search-result strong { display: block; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--paper); border-radius: var(--radius); max-width: 520px; width: 100%; padding: 26px; max-height: 86vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#whop-checkout-mount { min-height: 120px; }

/* Footer */
.site-footer { background: var(--green); color: #dfe8e2; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 40px 20px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 1.1rem; }
.site-footer a { color: #dfe8e2; }
.site-footer p { font-size: 0.93rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.18); padding: 16px 20px; text-align: center; font-size: 0.85rem; color: #b9c8bf; }
.badge-note { background: #fdf3e7; border: 1px solid #ecd9ae; color: #7a5b12; border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; margin: 14px 0; }
