/* ============================================================
   OAKTOPUS — shared stylesheet (all pages)
   ============================================================ */
:root {
  --bg: #0F1113;
  --surface: #1A1C1F;
  --oak: #3E2A1E;
  --copper: #B87A4D;
  --copper-light: #d18b5a;
  --text: #F4F1EC;
  --muted: #8C8C8C;
  --radius: 6px;
  --font-h: 'Space Grotesk', sans-serif;
  --font-b: 'Inter', sans-serif;
  --font-a: 'Oswald', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-b); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: 90%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
header { position: sticky; top: 0; z-index: 100; background: rgba(15,17,19,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(184,122,77,0.2); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; flex-wrap: wrap; }
.logo-img { display: flex; align-items: center; height: 46px; }
.logo-img img { height: 100%; width: auto; object-fit: contain; }
.logo-text { font-family: var(--font-h); font-size: 1.4rem; font-weight: 700; color: var(--copper); letter-spacing: 2px; }
nav ul { display: flex; gap: 24px; list-style: none; }
nav a { font-family: var(--font-a); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; transition: color 0.2s; color: var(--text); }
nav a:hover { color: var(--copper); }
nav a.active { color: var(--copper); }
.utility { display: flex; gap: 16px; align-items: center; }
.utility-btn { background: none; border: none; color: var(--text); cursor: pointer; font-family: var(--font-b); font-size: 0.9rem; display: flex; align-items: center; gap: 6px; transition: color 0.2s; }
.utility-btn:hover { color: var(--copper); }
.cart-count { background: var(--copper); color: var(--bg); border-radius: 50%; width: 18px; height: 18px; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius); font-family: var(--font-a); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; font-size: 0.95rem; }
.btn-primary { background: var(--copper); color: var(--bg); }
.btn-primary:hover { background: var(--copper-light); transform: translateY(-1px); }
.btn-outline { border-color: var(--copper); color: var(--copper); background: transparent; }
.btn-outline:hover { background: var(--copper); color: var(--bg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; background-image: url('../img/hero-background.png'); background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,17,19,0.6) 0%, rgba(15,17,19,0.85) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 0 20px; }
.hero-eyebrow { font-family: var(--font-a); letter-spacing: 4px; text-transform: uppercase; color: var(--copper); font-size: 0.85rem; margin-bottom: 16px; }
.hero h1 { font-family: var(--font-h); font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 16px; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.hero p { font-size: 1.15rem; color: var(--muted); margin-bottom: 32px; }
.cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section scaffolding ---------- */
section { padding: 64px 0; }
.section-title { font-family: var(--font-h); text-align: center; margin-bottom: 8px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 40px; }

/* ---------- Home: category cards ---------- */
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(184,122,77,0.15); transition: border-color 0.3s, transform 0.3s; }
.cat-card:hover { border-color: rgba(184,122,77,0.5); transform: translateY(-4px); }
.cat-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: brightness(0.6) grayscale(20%); transition: filter 0.4s ease, transform 0.6s ease; }
.cat-card:hover img { filter: brightness(0.9) grayscale(0%); transform: scale(1.05); }
.cat-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 24px 16px; background: linear-gradient(to top, rgba(15,17,19,0.95) 10%, transparent 100%); }
.cat-info h3 { font-family: var(--font-a); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.cat-info p { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

/* ---------- Shop: grid ---------- */
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip { background: var(--surface); border: 1px solid rgba(184,122,77,0.2); color: var(--muted); padding: 8px 16px; border-radius: var(--radius); font-family: var(--font-a); text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.filter-chip.active { background: var(--copper); color: var(--bg); border-color: var(--copper); }
.filter-chip:hover { border-color: var(--copper); color: var(--copper); }
.filter-chip.active:hover { color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(184,122,77,0.1); transition: border-color 0.3s, transform 0.3s; display: flex; flex-direction: column; }
.card:hover { border-color: rgba(184,122,77,0.4); transform: translateY(-4px); }
.card .thumb { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--oak); }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-family: var(--font-h); font-size: 1.05rem; margin-bottom: 4px; }
.card .cat { color: var(--copper); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-a); margin-bottom: 6px; }
.card .desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { font-weight: 700; color: var(--copper); font-size: 1.1rem; }
.add-btn { background: none; border: 1px solid rgba(184,122,77,0.4); color: var(--copper); padding: 6px 14px; border-radius: var(--radius); font-family: var(--font-a); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; }
.add-btn:hover { background: var(--copper); color: var(--bg); }
.add-btn.added { background: var(--copper); color: var(--bg); }

/* ---------- Hat Builder (wizard) ---------- */
.stepper { display: flex; justify-content: center; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.step-item { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid rgba(184,122,77,0.2); color: var(--muted); font-family: var(--font-a); text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; transition: all 0.2s; }
.step-item.active { border-color: var(--copper); color: var(--copper); }
.step-item.done { border-color: var(--copper); color: var(--text); }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: rgba(184,122,77,0.2); color: var(--copper); display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.step-item.active .step-num { background: var(--copper); color: var(--bg); }
.builder-step { max-width: 780px; margin: 0 auto; }
.step-title { font-family: var(--font-h); font-size: 1.3rem; margin-bottom: 20px; color: var(--text); }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option-card { background: var(--surface); border: 2px solid rgba(184,122,77,0.15); border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, transform 0.2s; }
.option-card:hover { transform: translateY(-2px); }
.option-card.selected { border-color: var(--copper); background: rgba(184,122,77,0.08); }
.option-img { font-size: 3rem; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.option-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); margin-bottom: 8px; }
.option-name { font-family: var(--font-h); font-weight: 700; font-size: 0.95rem; }
.option-price { color: var(--copper); font-weight: 700; margin-top: 4px; }
.option-desc { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.color-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.shelf-reference { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.shelf-reference img { width: 100%; max-width: 380px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 2px solid rgba(184,122,77,0.15); }
.color-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s; width: 84px; }
.color-card.selected { border-color: var(--copper); }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15); display: block; }
.color-name { font-size: 0.75rem; color: var(--muted); text-align: center; }
.order-summary { background: var(--surface); border: 1px solid rgba(184,122,77,0.15); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.nav-btns { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; }
.next-btn { margin-top: 24px; width: 100%; }

/* ---------- About ---------- */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-family: var(--font-h); font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 16px; line-height: 1.8; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.stat { border-left: 2px solid var(--copper); padding-left: 16px; }
.stat-num { font-family: var(--font-h); font-size: 1.8rem; font-weight: 700; color: var(--copper); }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.about-visual { background: rgba(62,42,30,0.3); border: 1px solid rgba(184,122,77,0.2); border-radius: var(--radius); min-height: 320px; display: flex; align-items: center; justify-content: center; font-size: 5rem; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h3 { font-family: var(--font-h); margin-bottom: 16px; color: var(--copper); }
.contact-info p { color: var(--muted); margin-bottom: 24px; line-height: 1.8; }
.contact-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.contact-icon { font-size: 1.2rem; margin-top: 2px; }
.contact-item-text h4 { font-family: var(--font-h); font-size: 0.9rem; margin-bottom: 2px; }
.contact-item-text p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea { width: 100%; padding: 12px; background: var(--bg); border: 1px solid rgba(184,122,77,0.3); border-radius: var(--radius); color: var(--text); font-family: var(--font-b); resize: vertical; min-height: 120px; }
textarea:focus { outline: none; border-color: var(--copper); }
.form-feedback { display: none; padding: 12px; border-radius: var(--radius); font-size: 0.9rem; margin-top: 8px; }
.form-feedback.success { background: rgba(184,122,77,0.1); border: 1px solid var(--copper); color: var(--copper); display: block; }

/* ---------- Drawer (cart) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 200; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: -420px; width: 100%; max-width: 400px; height: 100%; background: var(--surface); z-index: 300; transition: right 0.3s ease; display: flex; flex-direction: column; }
.drawer.open { right: 0; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid rgba(184,122,77,0.2); }
.drawer-head h2 { font-family: var(--font-h); font-size: 1.2rem; }
.close-btn { background: none; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.close-btn:hover { color: var(--copper); }
.drawer-items { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.drawer-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.drawer-item img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.drawer-item .info { flex: 1; }
.drawer-item .name { font-weight: 600; font-size: 0.9rem; }
.drawer-item .meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 0.85rem; flex-wrap: wrap; }
.qty-btn { background: none; border: 1px solid rgba(184,122,77,0.3); color: var(--copper); width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.qty-btn:hover { background: var(--copper); color: var(--bg); }
.drawer-item .remove { background: none; border: none; color: var(--muted); font-size: 0.75rem; cursor: pointer; margin-top: 4px; display: block; padding: 0; }
.drawer-item .remove:hover { color: var(--copper); }
.drawer-foot { padding: 20px; border-top: 1px solid rgba(184,122,77,0.2); }
.drawer-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-family: var(--font-h); font-size: 1.1rem; }
.checkout-btn { width: 100%; background: var(--copper); border: none; color: var(--bg); padding: 14px; border-radius: var(--radius); font-family: var(--font-a); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; font-size: 0.95rem; transition: background 0.2s; }
.checkout-btn:hover { background: var(--copper-light); }
.checkout-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Checkout ---------- */
.checkout-page { max-width: 640px; margin: 0 auto; padding: 60px 16px; }
.checkout-page h1 { font-family: var(--font-h); margin-bottom: 8px; }
.checkout-page .sub { color: var(--muted); margin-bottom: 32px; }
.summary { background: var(--surface); border: 1px solid rgba(184,122,77,0.15); border-radius: var(--radius); padding: 20px; margin-bottom: 32px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-size: 0.9rem; gap: 16px; }
.summary-row .opt { color: var(--muted); font-size: 0.8rem; }
.summary-row.total { border-top: 1px solid rgba(184,122,77,0.2); margin-top: 8px; padding-top: 16px; color: var(--text); font-weight: 700; font-size: 1rem; }
.field-label { display: block; margin-bottom: 6px; color: var(--copper); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.text-input { width: 100%; padding: 12px; background: rgba(15,17,19,0.7); border: 1px solid rgba(184,122,77,0.3); border-radius: var(--radius); color: var(--text); font-family: var(--font-b); margin-bottom: 20px; transition: border-color 0.2s; }
.text-input:focus { outline: none; border-color: var(--copper); }
#card-container { background: var(--surface); border: 1px solid rgba(184,122,77,0.3); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; min-height: 60px; }
.pay-btn { width: 100%; background: var(--copper); border: none; color: var(--bg); padding: 14px; border-radius: var(--radius); font-family: var(--font-a); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; font-size: 0.95rem; transition: background 0.2s; }
.pay-btn:hover { background: var(--copper-light); }
.pay-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.status-msg { margin-top: 16px; padding: 12px; border-radius: var(--radius); font-size: 0.9rem; }
.status-msg.err { background: rgba(200,60,60,0.1); border: 1px solid #c83c3c; color: #ff7a7a; }
.status-msg.ok { background: rgba(60,180,120,0.1); border: 1px solid #3cb478; color: #7affc3; }
.back-link { display: inline-block; margin-top: 24px; color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.back-link:hover { color: var(--copper); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--copper); border-radius: var(--radius); padding: 14px 20px; font-size: 0.9rem; z-index: 9999; transform: translateY(100px); opacity: 0; transition: all 0.3s ease; max-width: 300px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: var(--copper); margin-right: 8px; }

/* ---------- Footer ---------- */
footer { background: var(--surface); padding: 30px 0; border-top: 1px solid rgba(184,122,77,0.1); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer p { color: var(--muted); font-size: 0.85rem; }
footer nav a { color: var(--muted); }
.social-links { display: flex; gap: 10px; }
.social-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(184,122,77,0.12); color: var(--copper); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; text-decoration: none; transition: background 0.2s, transform 0.2s; }
.social-btn:hover { background: var(--copper); color: var(--bg); transform: translateY(-2px); }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.social-card { background: var(--surface); border: 2px solid rgba(184,122,77,0.15); border-radius: var(--radius); padding: 24px; text-align: center; text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.2s; display: block; }
.social-card:hover { border-color: var(--copper); transform: translateY(-2px); }
.social-card .big-icon { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.social-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; display: block; }
.social-card h3 { font-family: var(--font-h); margin-bottom: 4px; }
.social-card p { color: var(--muted); font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  section { padding: 48px 0; }
  .hamburger { display: block; }
  nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); padding: 20px; display: none; border-bottom: 1px solid rgba(184,122,77,0.2); }
  nav.active { display: block; }
  nav ul { flex-direction: column; gap: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .builder-wrap, .about-wrap, .contact-wrap { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
  .logo-img { height: 40px; }
  .about-visual { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
}
