/* webapp/static/css/style.css — Style C: Classic Corporate */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1E3A5F;
  --navy-dark: #152B47;
  --navy-light: #2A4F7C;
  --gold: #B8960C;
  --gold-light: #D4AF37;
  --text: #2C3E50;
  --text-muted: #6B7280;
  --border: #D1D5DB;
  --bg: #F8F6F0;
  --white: #FFFFFF;
  --cream: #FDFBF7;
  --success: #059669;
  --danger: #DC2626;
}

body { font-family: 'Open Sans', sans-serif; color: var(--text); background: var(--cream); font-size: 15px; line-height: 1.6; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }

/* ── Topbar ── */
.topbar { background: var(--navy); color: rgba(255,255,255,.75); padding: .35rem 1.5rem; font-size: .75rem; display: flex; justify-content: space-between; align-items: center; }
.topbar-right { display: flex; gap: 1.25rem; }
.topbar-right a { color: rgba(255,255,255,.75); }
.topbar-right a:hover { color: #fff; }

/* ── Nav ── */
.site-nav { background: var(--white); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: .75rem; }
.logo-mark { width: 52px; height: 52px; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--gold); font-family: 'Merriweather', serif; font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.logo-name { font-family: 'Merriweather', serif; font-size: 1.25rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.logo-tagline { font-size: .7rem; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.nav-links { display: flex; list-style: none; }
.nav-links a { display: block; padding: .5rem 1.1rem; font-size: .875rem; font-weight: 600; color: var(--text); border-bottom: 3px solid transparent; margin-bottom: -3px; transition: all .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); border-bottom-color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.25rem; font-size: .875rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .2s; font-family: 'Open Sans', sans-serif; line-height: 1; }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: #9A7D0A; border-color: #9A7D0A; color: #fff; }
.btn-outline { background: none; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.cart-btn { position: relative; background: none; border: 2px solid var(--border); color: var(--text); padding: .45rem .9rem; cursor: pointer; font-size: .875rem; font-weight: 600; font-family: 'Open Sans', sans-serif; transition: border-color .2s; }
.cart-btn:hover { border-color: var(--navy); }
.cart-badge { position: absolute; top: -7px; right: -7px; background: var(--gold); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: .62rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-body { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; display: grid; grid-template-columns: 220px 1fr; gap: 2rem; }
.section { padding: 3.5rem 0; }

/* ── Sidebar ── */
.sidebar-box { background: var(--white); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.sidebar-title { background: var(--navy); color: #fff; padding: .65rem 1rem; font-family: 'Merriweather', serif; font-size: .85rem; font-weight: 700; }
.sidebar-list { list-style: none; }
.sidebar-list li a { display: flex; justify-content: space-between; align-items: center; padding: .55rem 1rem; font-size: .85rem; color: var(--text); border-bottom: 1px solid var(--border); transition: background .15s; }
.sidebar-list li:last-child a { border-bottom: none; }
.sidebar-list li a:hover, .sidebar-list li a.active { background: var(--bg); color: var(--navy); }
.sidebar-count { color: var(--text-muted); font-size: .75rem; }
.sidebar-body { padding: .875rem 1rem; font-size: .82rem; color: var(--text-muted); line-height: 1.7; }
.cert-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.cert-badge { background: var(--bg); border: 1px solid var(--border); padding: .25rem .55rem; font-size: .68rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; }

/* ── Hero ── */
.hero { background: var(--navy); color: #fff; display: flex; min-height: 440px; }
.hero-content { flex: 1; padding: 3.5rem 3rem 3.5rem 4rem; display: flex; flex-direction: column; justify-content: center; max-width: 580px; }
.hero-eyebrow { font-size: .75rem; color: var(--gold-light); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin-bottom: .875rem; display: flex; align-items: center; gap: .5rem; }
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 2px; background: var(--gold); flex-shrink: 0; }
.hero h1 { font-family: 'Merriweather', serif; font-size: 2.1rem; font-weight: 700; line-height: 1.3; margin-bottom: 1.1rem; }
.hero p { font-size: .9rem; color: rgba(255,255,255,.8); line-height: 1.8; margin-bottom: .875rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.75rem; }
.hero-tag { background: rgba(184,150,12,.15); border: 1px solid rgba(184,150,12,.35); color: var(--gold-light); font-size: .72rem; font-weight: 600; padding: .2rem .55rem; }
.hero-actions { display: flex; gap: .875rem; flex-wrap: wrap; }
.hero-sidebar { width: 300px; background: var(--navy-light); padding: 2.25rem; display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; flex-shrink: 0; }
.trust-item { display: flex; align-items: flex-start; gap: .875rem; }
.trust-icon { width: 36px; height: 36px; background: rgba(184,150,12,.2); border: 1px solid rgba(184,150,12,.4); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.trust-text h4 { font-size: .825rem; font-weight: 700; color: #fff; margin-bottom: .15rem; }
.trust-text p { font-size: .75rem; color: rgba(255,255,255,.6); line-height: 1.5; }

/* ── Stats bar ── */
.stats-bar { background: var(--bg); border-bottom: 1px solid var(--border); }
.stats-inner { max-width: 1200px; margin: 0 auto; padding: .875rem 1.5rem; display: flex; justify-content: space-around; flex-wrap: wrap; gap: .75rem; }
.stat { text-align: center; padding: .4rem 1.25rem; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-num { font-family: 'Merriweather', serif; font-size: 1.4rem; font-weight: 700; color: var(--navy); }
.stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: .15rem; }

/* ── Section headers ── */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; padding-bottom: .875rem; border-bottom: 2px solid var(--gold); }
.section-header h2 { font-family: 'Merriweather', serif; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.section-header p { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }
.view-all { color: var(--navy); font-size: .82rem; font-weight: 600; border-bottom: 1px solid var(--gold); white-space: nowrap; }

/* ── Product grid ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.product-card { background: var(--white); border: 1px solid var(--border); transition: all .2s; cursor: pointer; }
.product-card:hover { border-color: var(--navy); box-shadow: 0 4px 12px rgba(30,58,95,.1); }
.product-img { height: 155px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 2.75rem; border-bottom: 1px solid var(--border); overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: .825rem; }
.product-sku { font-size: .68rem; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.product-name { font-size: .875rem; font-weight: 600; margin: .25rem 0 .3rem; line-height: 1.4; color: var(--text); }
.product-spec { font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; }
.product-price { font-family: 'Merriweather', serif; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.product-moq { font-size: .7rem; color: var(--text-muted); margin-top: .15rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.add-btn { background: var(--navy); color: #fff; border: none; padding: .38rem .8rem; font-size: .78rem; font-weight: 600; cursor: pointer; font-family: 'Open Sans', sans-serif; transition: background .2s; }
.add-btn:hover { background: var(--navy-dark); }

/* ── About strip ── */
.about-strip { background: var(--navy); color: #fff; padding: 3.5rem 0; }
.about-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-eyebrow { font-size: .72rem; color: var(--gold-light); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; margin-bottom: .75rem; }
.about-inner h2 { font-family: 'Merriweather', serif; font-size: 1.65rem; font-weight: 700; margin-bottom: .875rem; line-height: 1.35; }
.about-inner p { font-size: .875rem; color: rgba(255,255,255,.8); line-height: 1.8; margin-bottom: .875rem; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.feature { display: flex; align-items: flex-start; gap: .7rem; }
.feature-icon { color: var(--gold); font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.feature-text h4 { font-size: .825rem; font-weight: 700; margin-bottom: .15rem; }
.feature-text p { font-size: .75rem; color: rgba(255,255,255,.6); line-height: 1.5; }

/* ── Cart ── */
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); }
.cart-table th { background: var(--navy); color: #fff; padding: .7rem 1rem; font-size: .8rem; font-weight: 600; text-align: left; }
.cart-table td { padding: .875rem 1rem; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.qty-control { display: flex; align-items: center; gap: .4rem; }
.qty-btn { width: 26px; height: 26px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: .9rem; display: flex; align-items: center; justify-content: center; font-family: 'Open Sans', sans-serif; }
.qty-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.qty-input { width: 44px; text-align: center; border: 1px solid var(--border); padding: .25rem; font-size: .875rem; font-family: 'Open Sans', sans-serif; }
.remove-btn { background: none; border: none; color: var(--danger); cursor: pointer; font-size: .8rem; font-weight: 600; }
.cart-summary { background: var(--white); border: 1px solid var(--border); padding: 1.25rem; }
.cart-summary h3 { font-family: 'Merriweather', serif; font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--gold); }
.summary-row { display: flex; justify-content: space-between; font-size: .875rem; margin-bottom: .5rem; }
.summary-total { font-weight: 700; font-size: 1rem; color: var(--navy); border-top: 1px solid var(--border); padding-top: .75rem; margin-top: .75rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.form-label .required { color: var(--danger); margin-left: .2rem; }
.form-control { width: 100%; padding: .55rem .875rem; border: 1px solid var(--border); font-size: .875rem; font-family: 'Open Sans', sans-serif; color: var(--text); background: var(--white); transition: border-color .2s; }
.form-control:focus { outline: none; border-color: var(--navy); }
.form-control::placeholder { color: #9CA3AF; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Product detail ── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.product-detail-img { background: var(--bg); border: 1px solid var(--border); height: 380px; display: flex; align-items: center; justify-content: center; font-size: 7rem; }
.product-detail-img img { width: 100%; height: 100%; object-fit: contain; }
.product-detail-info h1 { font-family: 'Merriweather', serif; font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: .5rem; line-height: 1.3; }
.product-detail-sku { font-size: .75rem; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1rem; }
.product-detail-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.25rem; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.spec-table td { padding: .5rem .75rem; border: 1px solid var(--border); font-size: .82rem; }
.spec-table td:first-child { background: var(--bg); font-weight: 600; width: 40%; color: var(--navy); }
.price-box { background: var(--bg); border: 1px solid var(--border); padding: 1rem; margin-bottom: 1.25rem; }
.price-box .price { font-family: 'Merriweather', serif; font-size: 1.75rem; font-weight: 700; color: var(--navy); }
.price-box .moq { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.add-to-cart-form { display: flex; gap: .75rem; align-items: center; }
.qty-large { width: 70px; padding: .55rem; border: 1px solid var(--border); font-size: 1rem; text-align: center; font-family: 'Open Sans', sans-serif; }

/* ── Order confirmation ── */
.order-box { background: var(--white); border: 1px solid var(--border); padding: 2rem; text-align: center; }
.order-box .order-icon { font-size: 3rem; margin-bottom: 1rem; }
.order-box h2 { font-family: 'Merriweather', serif; font-size: 1.5rem; color: var(--navy); margin-bottom: .5rem; }
.order-number { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin: .75rem 0; }

/* ── Pagination ── */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2rem; }
.page-btn { padding: .4rem .75rem; border: 1px solid var(--border); background: var(--white); font-size: .82rem; cursor: pointer; font-family: 'Open Sans', sans-serif; color: var(--text); transition: all .2s; }
.page-btn:hover, .page-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Alerts ── */
.alert { padding: .75rem 1rem; border-left: 4px solid; font-size: .875rem; margin-bottom: 1rem; }
.alert-success { background: #F0FDF4; border-color: var(--success); color: #065F46; }
.alert-error { background: #FEF2F2; border-color: var(--danger); color: #991B1B; }

/* ── Footer ── */
footer { background: #0D1B2E; color: #6B7280; padding: 2.75rem 0 1.25rem; margin-top: 3rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #1E3A5F; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-tagline { color: var(--gold); }
.footer-brand p { margin-top: .75rem; font-size: .9rem; line-height: 1.7; }
.footer-col h4 { color: var(--gold-light); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: .875rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .45rem; font-size: .82rem; }
.footer-col a { color: #6B7280; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { text-align: center; font-size: .75rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .page-body { grid-template-columns: 1fr; }
  .hero { flex-direction: column; }
  .hero-sidebar { width: 100%; }
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-content { padding: 2rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr; }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
