:root {
  --ink: #111111;
  --paper: #ffffff;
  --card: #ffffff;
  --panel: #fafafa;
  --gold: #ad9451;
  --gold-light: #e8dcc0;
  --gold-dark: #8a7440;
  --accent: #ad9451;
  --accent-dark: #8a7440;
  --muted: #6b6b6b;
  --border: #e7e3da;
  --success: #3f7a52;
  --error: #b5453c;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(17, 17, 17, 0.07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { letter-spacing: -0.01em; }

/* ── Top hairline + utility bar (light, like a mainstream retailer's) ──── */
.topline { height: 4px; background: var(--gold); }
.utility-bar {
  background: #f4f2ee; color: #57544c; font-size: 12px; border-bottom: 1px solid var(--border);
}
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; padding: 8px 24px; }
.utility-bar a { color: #57544c; }
.utility-bar a:hover { color: var(--gold-dark); }
.utility-links { display: flex; align-items: center; gap: 12px; }
.utility-links .sep { color: #d8d2c4; }
.currency-switcher { position: relative; }
.currency-switcher select {
  background: transparent; color: #57544c; border: none; font-size: 12px; cursor: pointer;
  -webkit-appearance: none; appearance: none; padding-right: 14px;
}
.currency-switcher select option { color: #111; }
.social-icons-mini { display: flex; gap: 12px; color: #57544c; }
.social-icons-mini a { display: flex; align-items: center; color: #57544c; }
.social-icons-mini a:hover { color: var(--gold-dark); }

/* ── Header / mega-menu — light, two-row layout (logo+search+account, then nav) */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.site-header .header-row { display: flex; align-items: center; gap: 24px; padding: 18px 24px 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand img { height: 54px; width: auto; }
.brand .gold { color: var(--gold); }

.site-search { flex: 1; max-width: 480px; margin: 0 auto; position: relative; }
.site-search input {
  width: 100%; padding: 10px 44px 10px 16px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; background: #faf9f6;
}
.site-search input:focus { outline: none; border-color: var(--gold); background: #fff; }
.site-search button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px;
  background: none; border: none; display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer; border-radius: 50%;
}
.site-search button:hover { background: var(--panel); color: var(--gold-dark); }

.main-nav { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; padding: 0 24px 14px; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a {
  display: block; padding: 6px 1px; font-size: 14.5px; font-weight: 500;
  color: var(--ink); border-bottom: 2px solid transparent;
}
.main-nav > .nav-item:hover > a, .main-nav > .nav-item > a.active { color: var(--ink); border-bottom-color: var(--gold); }
.mega-dropdown {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; min-width: 220px; z-index: 40;
}
.main-nav > .nav-item:hover .mega-dropdown { display: block; }
.mega-dropdown a { display: block; padding: 8px 12px; font-size: 13.5px; font-weight: 400; border-radius: 6px; white-space: nowrap; color: #3a3a3a; }
.mega-dropdown a:hover { background: var(--panel); color: var(--gold-dark); }

.header-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.account-menu { position: relative; }
.account-menu > a { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.account-dropdown {
  display: none; position: absolute; top: 100%; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; min-width: 180px; z-index: 40;
}
.account-menu:hover .account-dropdown { display: block; }
.account-dropdown a, .account-dropdown form button { display: block; width: 100%; text-align: left; padding: 8px 12px; font-size: 13.5px; border-radius: 6px; background: none; border: none; cursor: pointer; font-family: inherit; text-decoration: none; }
.account-dropdown a:hover, .account-dropdown form button:hover { background: var(--panel); color: var(--gold-dark); }

.cart-link {
  display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px;
  background: none; color: var(--ink); padding: 0; border-radius: 0;
}
.cart-link:hover { color: var(--gold-dark); }

/* ── Promo strip — one deliberate dark accent under the nav ────────────── */
.promo-strip {
  background: var(--ink); color: #fff; text-align: center; font-size: 13px; font-weight: 600;
  padding: 10px 16px; letter-spacing: 0.01em;
}

/* ── Demo banner / flash ─────────────────────────────────────────────── */
.demo-banner { background: var(--gold-light); color: var(--gold-dark); text-align: center; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--gold); font-weight: 600; }
.flash-list { max-width: 1240px; margin: 16px auto 0; padding: 0 24px; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 10px; font-size: 14px; }
.flash.success { background: #eaf3ec; color: var(--success); border: 1px solid #cfe4d5; }
.flash.error { background: #fbeae6; color: var(--error); border: 1px solid #f1cfc5; }

/* ── Hero banner — light, editorial (not a heavy dark block) ───────────── */
.hero-banner {
  position: relative; background: var(--panel); color: var(--ink); overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 420px;
  border-bottom: 1px solid var(--border);
}
.hero-banner .hero-copy { padding: 56px; z-index: 2; }
.hero-banner .eyebrow { color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12.5px; font-weight: 700; margin-bottom: 14px; }
.hero-banner h1 { font-size: 40px; margin: 0 0 16px; line-height: 1.1; color: var(--ink); }
.hero-banner p { color: #57544c; font-size: 15.5px; margin: 0 0 26px; max-width: 460px; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-fallback { background: linear-gradient(135deg, #f8f6f0, #efe7d4); padding: 80px 24px; text-align: center; }
.hero-fallback h1 { font-size: 40px; color: var(--ink); margin: 0 0 14px; }
.hero-fallback p { color: #57544c; max-width: 560px; margin: 0 auto 26px; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--gold); color: #111; border: none; cursor: pointer; letter-spacing: 0.01em;
}
.btn:hover { background: var(--gold-dark); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--gold-dark); }
/* Default "secondary" reads as an outline button on light backgrounds
   (the overwhelming majority of uses — cart/admin/table actions); the hero
   banner is the one dark-background context and gets its own override. */
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.secondary:hover { background: var(--ink); color: #fff; }
.btn.outline-dark { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.outline-dark:hover { background: var(--ink); color: #fff; }
.btn.small { padding: 8px 16px; font-size: 12.5px; }
.btn.block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Homepage category tile grid ─────────────────────────────────────── */
.category-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.category-tile { display: block; text-align: center; }
.category-tile .tile-image { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-bottom: 10px; }
.category-tile img { width: 100%; height: 100%; object-fit: cover; }
.category-tile .tile-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--gold-light); color: var(--gold-dark); font-weight: 700; font-size: 14px; text-align: center; padding: 10px; }
.category-tile span { font-size: 14px; font-weight: 600; color: var(--ink); }
.category-tile:hover span { color: var(--gold-dark); }
@media (max-width: 980px) { .category-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ── Sections / product grid ─────────────────────────────────────────── */
section.shop-section { padding: 52px 0; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.section-title { font-size: 24px; margin: 0; }
.section-title .sub { display: block; font-size: 13.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.section-header a.view-all { font-size: 13px; font-weight: 700; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.03em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product-card { background: transparent; border-radius: 0; overflow: visible; box-shadow: none; border: none; transition: opacity .15s ease; }
.product-card:hover { opacity: 0.88; }
.product-card .thumb { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.product-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-card .body { padding: 12px 2px 0; }
.product-card h3 { font-size: 14.5px; font-weight: 500; margin: 0 0 4px; }
.product-card .price { color: var(--ink); font-weight: 700; }
.ribbon { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--ink); border: 1px solid var(--ink); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; }
.ribbon.gold { background: #fff; color: var(--gold-dark); border-color: var(--gold); }

.badge { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; margin: 0 4px 8px 0; border: 1px solid var(--border); }
.badge.printful { background: #fff; color: #57544c; }
.badge.own { background: #fff; color: var(--gold-dark); border-color: var(--gold); }
.badge.custom { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag-chip { display: inline-block; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); margin: 0 6px 6px 0; color: var(--muted); }
.tag-chip:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ── Category / listing layout with filters ──────────────────────────── */
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-dark); }
.listing-title { text-align: center; font-size: 30px; margin: 6px 0 22px; }
.subcat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.subcat-pills a { display: inline-block; padding: 9px 20px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.subcat-pills a:hover, .subcat-pills a.active { background: var(--ink); color: #fff; }

.listing-layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; align-items: start; }
.filter-panel { background: transparent; border: none; padding: 0; position: sticky; top: 90px; }
.filter-panel details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.filter-panel details:first-child { border-top: 1px solid var(--border); }
.filter-panel summary {
  font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex;
  justify-content: space-between; align-items: center; color: var(--ink);
}
.filter-panel summary::-webkit-details-marker { display: none; }
.filter-panel summary::after { content: "⌄"; font-size: 15px; color: var(--muted); transition: transform .15s ease; }
.filter-panel details[open] summary::after { transform: rotate(180deg); }
.filter-panel details > div, .filter-panel details > .price-range { margin-top: 14px; }
.filter-panel label.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 10px; cursor: pointer; color: #3a3a3a; }
.filter-panel input[type=checkbox] { width: auto; accent-color: var(--gold); }
.filter-panel .price-range { display: flex; gap: 8px; align-items: center; }
.filter-panel .price-range input { width: 100%; }
.subcat-list a { display: block; padding: 6px 0; font-size: 13.5px; color: #3a3a3a; }
.subcat-list a:hover, .subcat-list a.active { color: var(--gold-dark); font-weight: 600; }
.listing-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.listing-toolbar .count { font-size: 13.5px; color: var(--muted); }
.listing-toolbar select { width: auto; padding: 9px 12px; font-size: 13px; border-radius: 999px; }

/* ── Product detail ──────────────────────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail img { border-radius: var(--radius); box-shadow: var(--shadow); }
.product-detail h1 { font-size: 30px; margin: 8px 0 8px; }
.product-detail .price { font-size: 22px; color: var(--gold-dark); font-weight: 700; margin-bottom: 18px; }
.option-group { margin-bottom: 18px; }
.option-group label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=file], textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14.5px;
  font-family: inherit; background: #fff;
}
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-tags { margin: 14px 0; }
.share-row { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.share-row span { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.share-icon {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--border); font-size: 15px;
}
.share-icon:hover { background: var(--gold-light); border-color: var(--gold); }

/* ── Cart / checkout ──────────────────────────────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.cart-line-item { display: flex; align-items: center; gap: 14px; }
.cart-line-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.cart-summary { max-width: 380px; margin-left: auto; background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14.5px; }
.cart-summary .row.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }

.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.pay-options { display: flex; gap: 12px; margin-top: 18px; }
.pay-options button { flex: 1; }
.order-summary-box { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.order-summary-box .item-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.currency-note { font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 14px; }

/* ── Panels / prose (legal pages, about, FAQ) ─────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 24px; }
.panel h3 { margin-top: 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 34px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; color: #2b2b2b; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq-item p { margin: 12px 0 0; color: var(--muted); }
.legal-note { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }

/* ── Account pages ────────────────────────────────────────────────────── */
.auth-box { max-width: 400px; margin: 60px auto; background: var(--card); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-box h2 { margin-top: 0; }
.auth-box .swap-link { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #ccc; margin-top: 60px; padding: 48px 0 24px; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 14px; }
.footer-grid a { display: block; color: #b9b9b9; padding: 4px 0; }
.footer-grid a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #999; }

/* ── Admin (unchanged structure, updated palette) ─────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--ink); color: #fff; padding: 24px 0; flex-shrink: 0; }
.admin-sidebar .brand { color: #fff; padding: 0 22px 20px; }
.admin-sidebar nav a { display: block; padding: 11px 22px; color: #cfcfcf; font-size: 14.5px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { flex: 1; padding: 32px 40px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 32px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.stat-card .value { font-size: 26px; font-weight: 700; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.bar-chart .bar { flex: 1; background: var(--gold); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.bar-chart .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--muted); }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th, table.admin-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; }
.status-pill.paid, .status-pill.shipped, .status-pill.submitted_to_printful { background: #eaf3ec; color: var(--success); }
.status-pill.pending, .status-pill.needs_manual { background: var(--gold-light); color: var(--gold-dark); }
.status-pill.failed { background: #fbeae6; color: var(--error); }
.login-box { max-width: 380px; margin: 90px auto; background: var(--card); padding: 34px; border-radius: var(--radius); box-shadow: var(--shadow); }
.integration-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot.on { background: var(--success); }
.dot.off { background: #ccc; }

@media (max-width: 980px) {
  .product-detail, .checkout-grid, .listing-layout { grid-template-columns: 1fr; }
  .hero-banner { grid-template-columns: 1fr; min-height: auto; }
  .hero-banner img { height: 260px; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}
