:root {
  --navy: #122f4a;
  --navy-dark: #0d233a;
  --red: #c8262c;
  --red-dark: #a91f24;
  --bg: #faf9f7;
  --ink: #161514;
  --ink-soft: #4a453f;
  --muted: #6b6560;
  --muted-light: #8b847c;
  --border: #e7e3dd;
  --border-input: #d8d3cb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.brand-domain { font-size: 11px; color: var(--muted); }

.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-left: 12px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.main-nav a:hover { color: var(--navy); }

.cart-icon-link {
  position: relative;
  text-decoration: none;
  font-size: 22px;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cdd7e1;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  margin: 0;
  max-width: 780px;
  line-height: 1.1;
}

.hero p {
  font-size: 16px;
  max-width: 540px;
  color: #cdd7e1;
  margin: 0;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }
.btn-outline:hover { background: rgba(255,255,255,0.08); }

/* legacy alias so any old markup referencing .btn alone still renders reasonably */
.btn:not(.btn-navy):not(.btn-red):not(.btn-outline) { background: var(--navy); color: #fff; }

/* ---------- Category tiles ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 40px 24px 8px; }
.section h2 { font-size: 20px; font-weight: 800; margin: 0 0 18px; }

.category-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.category-tile-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--border);
  background-size: cover;
  background-position: center;
}

.category-tile span { font-size: 14px; font-weight: 700; }

/* ---------- Filter chips ---------- */
.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; }

.filter-chip {
  padding: 9px 18px;
  border-radius: 20px;
  border: 1px solid var(--border-input);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.filter-chip.active { border-color: var(--navy); background: var(--navy); color: #fff; }

.filter-search-form {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.filter-search-form input {
  padding: 9px 12px;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  font-size: 13px;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease;
}

.product-card:hover { transform: translateY(-3px); }

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--border);
  padding: 12px;
}

.product-card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.product-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-light); }
.product-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.product-price { font-size: 15px; font-weight: 700; color: var(--navy); margin-top: 2px; }

/* ---------- Trust badges ---------- */
.trust-badges {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  text-align: center;
}

.trust-badge { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.trust-badge-dot { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--navy); }
.trust-badge strong { font-size: 13px; }
.trust-badge span.sub { font-size: 12px; color: var(--muted); }

/* ---------- Newsletter + footer ---------- */
.newsletter-bar { background: var(--ink); color: #fff; padding: 16px 24px; }
.newsletter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}

.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  padding: 10px 14px;
  border: 1px solid #3a3733;
  border-radius: 4px;
  font-size: 13px;
  background: #232019;
  color: #fff;
  min-width: 200px;
}

.site-footer-full { background: var(--ink); color: #a9a29a; padding: 44px 24px 24px; }
.footer-columns {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.footer-col a { text-decoration: none; color: #a9a29a; }
.footer-col a:hover { color: #fff; }
.footer-heading { color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-brand { text-transform: none; letter-spacing: normal; font-size: 15px; }
.footer-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  border-top: 1px solid #2a2721;
  padding-top: 18px;
  font-size: 12px;
  text-align: center;
}

/* ---------- Generic page content ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.price { color: var(--red); font-weight: 700; }

table.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
table.cart-table th, table.cart-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); }

.variant-select { padding: 8px; margin: 12px 0; width: 100%; max-width: 300px; }

.pagination { display: flex; gap: 8px; margin-top: 24px; }
.pagination a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 4px; text-decoration: none; color: var(--ink); }
.pagination a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Product detail page ---------- */
.product-detail { display: grid; grid-template-columns: minmax(280px,1fr) minmax(280px,1fr); gap: 48px; }
.product-detail-image { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--border); }
.product-detail-image img { width: 100%; height: 100%; object-fit: contain; }
.product-detail-info { display: flex; flex-direction: column; gap: 14px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border-input); border-radius: 4px; width: fit-content; }
.qty-stepper button { width: 34px; height: 34px; border: none; background: none; font-size: 16px; cursor: pointer; }
.qty-stepper input { width: 40px; text-align: center; border: none; font-size: 14px; }

@media (max-width: 700px) {
  .product-detail { grid-template-columns: 1fr; }
}

/* ================================================================ */
/* Admin panel styles (unchanged from before) */
/* ================================================================ */

.admin-product-grid { display: flex; flex-direction: column; gap: 4px; }

.admin-product-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
}

.admin-product-header {
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
}