/* =====================================================================
   tinyhomes-us - stylesheet
   A white-and-gold business aesthetic: clean white backgrounds, warm
   gold accents, and dimension-line motifs borrowed from architectural
   drawings. Playfair Display for display type (a refined, professional
   serif), Lato for body/UI, JetBrains Mono for numbers/specs
   (dimensions, prices) so they read like a cut list.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=Lato:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Dancing+Script:wght@600;700&display=swap');

:root {
  /* Palette */
  --paper: #FFFFFF;
  --paper-dim: #FAF6EA;
  --card: #FFFFFF;
  --ink: #221D12;
  --ink-soft: #5B5346;
  --line: #E8E1CB;
  --line-strong: #D2C293;
  --blueprint: #8A6D1F;
  --blueprint-dark: #6B5316;
  --blueprint-tint: #FBF6E3;
  --cedar: #C9A227;
  --cedar-dark: #A98618;
  --cedar-tint: #FAF0D0;
  --success: #4F7A5C;
  --danger: #B0483F;
  --warn: #C08A2E;

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --max-width: 1180px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow-card: 0 1px 2px rgba(27,36,48,0.06), 0 6px 20px rgba(27,36,48,0.07);
  --shadow-pop: 0 10px 34px rgba(27,36,48,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Sticky footer for the public site: keeps the footer pinned to the
   bottom of the viewport on short pages (sign-in forms, empty states)
   instead of it floating up right under the content. #main is the only
   flexible child, so it absorbs any extra vertical space. Scoped away
   from .admin-body, which already manages its own full-height layout
   via .admin-shell. */
body:not(.admin-body) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body:not(.admin-body) > #main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }

.mono { font-family: var(--font-mono); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cedar); color: #fff; }
.btn-primary:hover { background: var(--cedar-dark); }
.btn-dark { background: var(--blueprint); color: #fff; }
.btn-dark:hover { background: var(--blueprint-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline.danger { border-color: var(--danger); color: var(--danger); }
.btn-outline.danger:hover { background: var(--danger); color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--blueprint); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blueprint); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f382f; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Header / nav
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(245,241,231,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand-name span { color: var(--cedar); }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.93rem;
  position: relative; padding: 4px 0;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--cedar);
}
.nav-cta-group { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.cart-link svg { width: 22px; height: 22px; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--cedar); color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 999px; min-width: 16px; text-align: center; font-family: var(--font-mono); }

/* Quantity stepper + Add to Cart, used on product cards and the detail page */
.add-to-cart-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.qty-btn { background: var(--blueprint); color: #fff; border: none; width: 32px; height: 32px; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-btn:hover:not(:disabled) { background: var(--blueprint-dark); }
.qty-value { min-width: 32px; text-align: center; font-family: var(--font-mono); font-weight: 600; }
.add-to-cart-row .btn { flex: 1; }

/* Cart page */
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-strong); }
.cart-line-thumb { width: 72px; height: 54px; border-radius: 6px; overflow: hidden; background: var(--blueprint-tint); flex-shrink: 0; }
.cart-line-thumb img, .cart-line-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.cart-line-remove { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 0.82rem; text-decoration: underline; padding: 0; }
.cart-line-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-summary-row.total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 14px; }

/* Checkout flow: progress bar + billing form + mini order-summary lines */
.checkout-steps { background: var(--blueprint); color: rgba(255,255,255,0.6); padding: 22px 0; text-align: center; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; font-weight: 600; }
.checkout-steps .step { color: rgba(255,255,255,0.55); }
.checkout-steps .step.active { color: #fff; }
.checkout-steps .arrow { margin: 0 14px; opacity: 0.5; }
.billing-form .field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.summary-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.summary-line-thumb { width: 56px; height: 42px; border-radius: 6px; overflow: hidden; background: var(--blueprint-tint); }
.summary-line-thumb img, .summary-line-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.summary-line .qty-stepper { transform: scale(0.85); transform-origin: left center; margin-top: 4px; }
.nav-phone { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(138,109,31,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138,109,31,0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--ink); margin-bottom: 20px; }
.hero p.lede { color: var(--ink-soft); font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-stat .num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--cedar-dark); }
.hero-stat .label { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

.hero-art { position: relative; }
.hero-art img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); display: block; }

/* ---------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------- */
section { padding: 84px 0; }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-alt { background: var(--paper-dim); }

/* Legal pages (privacy, terms, shipping & returns) */
.legal-content { max-width: 780px; }
.legal-content .updated-note { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 2.2em; }
.legal-content h2 { font-size: 1.3rem; margin: 2em 0 0.6em; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin: 1.4em 0 0.5em; }
.legal-content p, .legal-content li { line-height: 1.7; }
.legal-content ul, .legal-content ol { margin: 0 0 1em; padding-left: 1.3em; color: var(--ink-soft); }
.legal-content li { margin-bottom: 0.4em; }
.legal-content a { color: var(--cedar-dark); }
.legal-content strong { color: var(--ink); }
.legal-toc { background: var(--paper-dim); border-radius: var(--radius-lg); padding: 22px 26px; margin-bottom: 2.4em; }
.legal-toc h2 { margin-top: 0 !important; font-size: 0.95rem !important; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.legal-toc ol { columns: 2; column-gap: 24px; padding-left: 1.1em; margin-bottom: 0; }
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }
.section-dark { background: var(--ink); color: #fff; }
.section-dark h2, .section-dark p { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.72); }

/* ---------------------------------------------------------------------
   Cards: product cards
   --------------------------------------------------------------------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.product-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.product-media { position: relative; aspect-ratio: 4/3; background: var(--blueprint-tint); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media svg { width: 100%; height: 100%; }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--cedar); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 5px 10px; border-radius: 100px; letter-spacing: 0.03em; text-transform: uppercase;
}
.product-badge.stock-low { background: var(--warn); }
.product-badge.stock-out { background: var(--danger); }
.product-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blueprint); font-weight: 600; }
.product-body h3 { margin-bottom: 2px; }
.product-tagline { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 6px; }
.product-specs { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 4px; flex-wrap: wrap; }
.product-specs span { display: flex; align-items: center; gap: 5px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.product-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.product-price .from { font-size: 0.7rem; font-weight: 500; color: var(--ink-soft); display: block; font-family: var(--font-body); }

/* Dimension-line spec strip (blueprint motif) */
.dim-line { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--blueprint); }
.dim-line::before, .dim-line::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }

/* ---------------------------------------------------------------------
   Process steps
   --------------------------------------------------------------------- */
.step-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step-item { position: relative; padding-top: 8px; }
.step-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--cedar); color: var(--cedar);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-item p { font-size: 0.9rem; }

/* ---------------------------------------------------------------------
   Testimonials
   --------------------------------------------------------------------- */
.testimonial-card { padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; }
.stars { color: var(--cedar); font-size: 0.9rem; letter-spacing: 2px; }
.testimonial-quote { font-family: var(--font-display); font-size: 1.08rem; font-style: italic; color: var(--ink); }
.testimonial-who { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.testimonial-who span { font-weight: 400; color: var(--ink-soft); }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.83rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 0.76rem; color: var(--ink-soft); margin-top: 5px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blueprint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { padding: 34px; }
.form-msg { padding: 12px 14px; border-radius: var(--radius); font-size: 0.88rem; margin-bottom: 16px; display: none; }
.form-msg.success { background: #E7F0E9; color: var(--success); display: block; }
.form-msg.error { background: #F7E7E4; color: var(--danger); display: block; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--ink-soft); }

/* =====================================================================
   Customer account dashboard (account-dashboard.html)
   ===================================================================== */
.account-shell { display: flex; align-items: flex-start; gap: 48px; }
.account-sidebar {
  width: 220px; flex-shrink: 0; padding-right: 32px;
  border-right: 1px solid var(--line);
  transition: width .2s ease;
}
.account-sidebar-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.account-sidebar h2 {
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0;
}
.account-sidebar-toggle {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 26px; height: 26px; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); color: var(--ink-soft); cursor: pointer;
}
.account-sidebar-toggle:hover { background: var(--paper-dim); color: var(--ink); }
.account-sidebar-toggle svg { width: 15px; height: 15px; transition: transform .2s ease; }
.account-sidebar.collapsed .account-sidebar-toggle svg { transform: rotate(-90deg); }
.account-sidebar.collapsed .account-nav { display: none; }
.account-nav { display: flex; flex-direction: column; }
.account-nav button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; background: none; border: none;
  font-family: var(--font-body); font-size: 0.94rem; font-weight: 700; color: var(--ink);
  padding: 11px 12px; border-radius: var(--radius); cursor: pointer;
}
.account-nav button:hover { background: var(--paper-dim); }
.account-nav button.active { background: var(--line); }
.account-nav .nav-badge { background: var(--cedar); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-family: var(--font-mono); }
.account-main { flex: 1; min-width: 0; }
.account-main h1 { font-size: 1.6rem; margin-bottom: 4px; }
.account-main .sub { color: var(--ink-soft); margin-bottom: 28px; }
.address-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.address-col h3 { font-size: 1.15rem; margin-bottom: 14px; }
.address-edit-link {
  display: inline-flex; align-items: center; gap: 7px; color: var(--cedar-dark);
  font-weight: 700; font-size: 0.9rem; text-decoration: none; margin-bottom: 10px;
}
.address-edit-link svg { width: 15px; height: 15px; }
.address-edit-link:hover { text-decoration: underline; }
.address-empty { font-style: italic; color: var(--ink-soft); font-size: 0.92rem; }
.address-text { font-size: 0.92rem; line-height: 1.7; color: var(--ink); }
.order-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 22px; border-bottom:1px solid var(--line); }
.order-row:last-child { border-bottom:none; }

/* ---- Document viewer (used by invoices) ---- */
.contract-viewer { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; background: var(--blueprint-tint); }
.contract-frame { width: 100%; height: 70vh; min-height: 420px; border: none; display: block; background: #fff; }
.order-status-pill { display:inline-block; padding:4px 12px; border-radius:100px; font-size:0.76rem; font-weight:700; letter-spacing:0.02em; text-transform:uppercase; }
.order-status-pill.status-new, .order-status-pill.status-contacted { background:var(--cedar-tint); color:var(--cedar-dark); }
.order-status-pill.status-confirmed { background:var(--blueprint-tint); color:var(--blueprint-dark); }
.order-status-pill.status-fulfilled { background:#E7F0E9; color:var(--success); }
.order-status-pill.status-cancelled { background:#F7E7E4; color:var(--danger); }

@media (max-width: 720px) {
  .account-shell { flex-direction: column; }
  .account-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 20px; }
  .address-cols { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--ink);
}
.faq-q .icon { flex-shrink: 0; width: 20px; height: 20px; transition: transform .2s ease; color: var(--cedar); }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding-bottom: 20px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,0.68); font-size: 0.9rem; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.88rem; max-width: 32ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 10px; }
.footer-legal-links { display: flex; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; }
.footer-legal-links a { font-size: 0.85rem; }
.footer-legal-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-bottom: 20px; }
.footer-legal-row .footer-legal-links { padding-bottom: 0; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
  transition: background .15s ease, color .15s ease;
}
.footer-social a:hover { background: var(--cedar); color: #fff; }
.footer-social svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------------------
   Misc: badges, breadcrumb, gallery filters, blog cards
   --------------------------------------------------------------------- */
.page-hero { background: var(--ink); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.72); max-width: 60ch; }
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-chip {
  font-family: var(--font-mono); font-size: 0.78rem; padding: 8px 16px; border-radius: 100px;
  border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; color: var(--ink-soft);
}
.filter-chip.active { background: var(--blueprint); border-color: var(--blueprint); color: #fff; }
.filter-select {
  width: auto; min-width: 240px; font-family: var(--font-mono); font-size: 0.82rem;
  padding: 10px 14px; border-radius: 100px; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--ink); cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--blueprint); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 40px 0 8px; }
.page-btn {
  font-family: var(--font-mono); font-size: 0.82rem; min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 100px; border: 1.5px solid var(--line-strong); background: #fff; cursor: pointer; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.page-btn:hover:not(:disabled) { border-color: var(--blueprint); color: var(--blueprint); }
.page-btn.active { background: var(--blueprint); border-color: var(--blueprint); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.page-ellipsis { border-color: transparent; background: transparent; cursor: default; }
.page-btn.page-ellipsis:hover { border-color: transparent; color: var(--ink-soft); }

.blog-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.blog-media { aspect-ratio: 16/10; background: var(--cedar-tint); overflow: hidden; }
.blog-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-media svg { width: 100%; height: 100%; }
.blog-body { padding: 20px 22px 24px; }
.blog-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.blog-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.blog-body p { font-size: 0.9rem; }
.blog-read { font-size: 0.85rem; font-weight: 600; color: var(--cedar); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--blueprint-tint); cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item svg { width: 100%; height: 100%; }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff; font-size: 0.78rem; opacity: 0; transition: opacity .2s ease;
}
.gallery-item:hover .cap { opacity: 1; }

.detail-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.detail-gallery .main-shot { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--blueprint-tint); grid-row: span 2; }
.detail-gallery .sub-shot { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--blueprint-tint); }
.detail-gallery img, .detail-gallery svg { width: 100%; height: 100%; object-fit: cover; }

.spec-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 28px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-item .label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 3px; }
.spec-item .value { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; }
.feature-list svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; color: var(--success); }

.sticky-buy { position: sticky; top: 100px; }
.buy-card { padding: 26px; }
.buy-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.8rem; margin-bottom: 2px; }
.buy-stock { font-size: 0.85rem; font-weight: 600; margin-bottom: 18px; }
.buy-stock.in { color: var(--success); }
.buy-stock.low { color: var(--warn); }
.buy-stock.out { color: var(--danger); }

.cta-band { background: var(--cedar); color: #fff; padding: 64px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 52ch; margin-left: auto; margin-right: auto; }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-new { background: var(--blueprint-tint); color: var(--blueprint); }
.badge-contacted { background: #FBF0DC; color: var(--warn); }
.badge-quoted { background: #E4ECF3; color: var(--blueprint); }
.badge-won { background: #E7F0E9; color: var(--success); }
.badge-lost { background: #F7E7E4; color: var(--danger); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------------
   Checkout page
   --------------------------------------------------------------------- */
.coupon-toggle { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 18px; }
.coupon-toggle a { color: var(--blueprint); font-weight: 600; text-decoration: underline; cursor: pointer; }
.coupon-panel { display: none; background: var(--paper-dim); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.coupon-panel.open { display: block; }
.coupon-panel .field { margin-bottom: 0; }
.coupon-panel-row { display: flex; gap: 10px; align-items: flex-end; }
.coupon-panel-row .field { flex: 1; margin-bottom: 0; }

.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.section-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--blueprint); color: #fff; font-family: var(--font-mono);
  font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
}
.section-heading h3 { margin: 0; }

.checkout-section + .checkout-section { margin-top: 22px; }

.payment-methods { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.payment-method-item { border-bottom: 1px solid var(--line); }
.payment-method-item:last-child { border-bottom: none; }
.payment-method-label { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.payment-method-label input[type="radio"] { width: auto; accent-color: var(--blueprint); }
.payment-method-desc { display: none; padding: 0 16px 16px 40px; font-size: 0.85rem; color: var(--ink-soft); }
.payment-method-item.selected .payment-method-desc { display: block; }
.payment-method-item.selected { background: var(--blueprint-tint); }

.payment-privacy-note { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 20px; }
.payment-privacy-note a { color: var(--blueprint); font-weight: 600; }

.summary-col-headers { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }

.shipping-note { font-size: 0.82rem; color: var(--success); font-weight: 600; margin: 10px 0 6px; }
.shipping-bar { height: 6px; border-radius: 100px; background: var(--paper-dim); overflow: hidden; }
.shipping-bar-fill { height: 100%; width: 100%; background: var(--blueprint); }

.review-card { padding: 22px 24px; }
.review-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.review-card-head h4 { margin: 0 0 3px; font-family: var(--font-body); font-size: 1rem; }
.review-card-head .review-count { font-size: 0.78rem; color: var(--ink-soft); }
.review-stars-badge { color: var(--cedar); font-size: 0.95rem; letter-spacing: 1px; }
.review-quote { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 14px; }
.review-person { display: flex; align-items: center; gap: 10px; }
.review-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blueprint-tint); color: var(--blueprint); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.review-person-name { font-size: 0.85rem; font-weight: 600; }
.review-person-role { font-size: 0.76rem; color: var(--ink-soft); }

.more-info-card { padding: 22px 24px 6px; }
.more-info-card h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 1rem; }
.more-info-card .faq-q { padding: 14px 0; font-size: 0.92rem; }
.more-info-card .faq-q .label-row { display: flex; align-items: center; gap: 10px; }
.more-info-card .faq-q svg.leading { width: 17px; height: 17px; color: var(--blueprint); flex-shrink: 0; }
.more-info-card .faq-a-inner { padding-bottom: 16px; font-size: 0.86rem; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-page-grid { grid-template-columns: 1fr !important; }
}

/* Tablet portrait (iPad, Galaxy Tab, etc.): the 7-link nav plus phone,
   cart, account, and CTA button no longer fit in one row, so switch to
   the same hamburger menu used on phones a bit earlier than the rest
   of the layout collapses. */
@media (max-width: 900px) {
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 0 24px; gap: 12px 24px;
    max-height: 0; opacity: 0; overflow: hidden;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: max-height .25s ease, opacity .2s ease, padding .25s ease;
    z-index: 55;
  }
  .main-nav.open { max-height: 320px; opacity: 1; padding: 20px 24px; overflow-y: auto; }
  .main-nav a { font-size: 1rem; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-phone { display: none; }
}

@media (max-width: 720px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 22px; }
  .field-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-gallery .main-shot { grid-row: auto; }
  .feature-list { grid-template-columns: 1fr; }
  .spec-sheet { grid-template-columns: repeat(2, 1fr); }
  .billing-form .field-row-3 { grid-template-columns: 1fr; }
  .address-cols { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Small phones (iPhone SE/mini, most Android phones in portrait)
   --------------------------------------------------------------------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-stats { gap: 18px; justify-content: space-between; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .spec-sheet { grid-template-columns: 1fr; gap: 14px; }
  .cart-line { grid-template-columns: 56px 1fr; row-gap: 10px; }
  .cart-line-thumb { width: 56px; height: 44px; }
  .cart-line-controls { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .form-card, .buy-card, .review-card, .more-info-card { padding: 20px; }
  .modal-box { padding: 20px 16px 18px; }
  .table-card-head { flex-direction: column; align-items: flex-start; }
  table.data-table th, table.data-table td { padding: 10px 12px; font-size: 0.82rem; }
}

/* ---------------------------------------------------------------------
   Page transition loader
   --------------------------------------------------------------------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  transition: opacity .35s ease, visibility .35s ease;
}
.page-loader img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  animation: page-loader-pulse 1.1s ease-in-out infinite;
}
.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@keyframes page-loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.82); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader img { animation: none; }
}
