/* ============================================================
   ShopSmartXpress / AmeriGlas Stained Glass — site styles
   Modern, responsive, self-contained (no external requests).
   ============================================================ */
:root {
  --navy: #1e3a8a;
  --navy-dark: #16294f;
  --navy-deep: #101d3a;
  --amber: #b45309;
  --amber-soft: #f59e0b;
  --ink: #1f2937;
  --muted: #5b6472;
  --line: #dbe2ec;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --tint: #eef3fc;
  --ok: #1a7f4b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 29, 58, .06), 0 8px 24px rgba(16, 29, 58, .08);
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--navy); }
a:hover { color: var(--amber); }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 4px 18px rgba(16, 29, 58, .07);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: .65rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  background:
    radial-gradient(circle at 20% 25%, #f59e0b 0 26%, transparent 27%),
    radial-gradient(circle at 78% 30%, #2563eb 0 24%, transparent 25%),
    radial-gradient(circle at 35% 80%, #16a34a 0 22%, transparent 23%),
    radial-gradient(circle at 75% 78%, #dc2626 0 24%, transparent 25%),
    linear-gradient(135deg, #16294f, #1e3a8a);
}
.brand-name {
  font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; color: var(--navy-deep);
  line-height: 1.1;
}
.brand-name small {
  display: block; font-weight: 600; font-size: .72rem; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.brand:hover .brand-name { color: var(--navy); }

.nav-toggle { display: none; }
.nav-toggle-btn {
  margin-left: auto; display: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--tint); color: var(--navy);
  border-radius: 8px; padding: .45rem .8rem; font-weight: 600; font-size: .95rem;
}
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink);
}
.main-nav a:hover, .main-nav a:focus-visible { background: var(--tint); color: var(--navy); }
.main-nav .drop > a::after { content: " ▾"; font-size: .8em; color: var(--muted); }
.main-nav ul ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 235px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: .4rem;
}
.main-nav li:hover > ul, .main-nav li:focus-within > ul { display: block; }
.main-nav ul ul a { font-weight: 500; font-size: .9rem; }

/* mobile nav */
@media (max-width: 860px) {
  .nav-toggle-btn { display: inline-block; }
  .main-nav {
    display: none; width: 100%; margin: .4rem 0 0;
    border-top: 1px solid var(--line); padding-top: .5rem;
  }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; gap: .1rem; }
  .main-nav ul ul {
    display: block; position: static; box-shadow: none; border: 0;
    padding: 0 0 0 .9rem; min-width: 0;
  }
  .main-nav .drop > a::after { content: ""; }
}

/* ---------- breadcrumb ---------- */
.crumbs {
  max-width: var(--maxw); margin: 0 auto; padding: .8rem 1.25rem 0;
  font-size: .85rem; color: var(--muted);
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: "›"; margin-right: .35rem; color: #9aa5b5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--amber); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- page shell ---------- */
.page {
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem 2.5rem;
}
.page-title {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2;
  color: var(--navy-deep); margin: .9rem 0 .4rem; font-weight: 800;
}
.lead { color: var(--muted); font-size: 1.06rem; max-width: 62rem; margin: .35rem 0 1.2rem; }

.notice {
  background: var(--tint); border: 1px solid #ccd9f2; color: var(--navy-dark);
  border-radius: var(--radius); padding: .85rem 1.1rem; margin: 0 0 1.4rem; font-size: .95rem;
}
.notice strong { color: var(--navy-deep); }
.notice a { font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: .6rem 1.15rem; border-radius: 9px;
  font-weight: 700; text-decoration: none; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: #c6d2ea; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- cards / sections ---------- */
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 1.2rem 0; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: 0 1px 2px rgba(16,29,58,.05);
}
.card h2, .card h3 { margin: .1rem 0 .45rem; font-size: 1.08rem; color: var(--navy-deep); }
.card p { margin: .25rem 0 0; font-size: .93rem; color: var(--muted); }
.card .card-link { display: inline-block; margin-top: .55rem; font-weight: 700; text-decoration: none; }

.section { margin: 2rem 0; }
.section > h2 {
  font-size: 1.35rem; color: var(--navy-deep); margin: 0 0 .8rem;
  padding-bottom: .4rem; border-bottom: 2px solid var(--tint);
}

/* ---------- legacy content restyling ---------- */
.legacy { font-size: .98rem; }
.legacy table {
  width: 100%; max-width: 100%; border-collapse: collapse; margin: .4rem 0 1rem;
}
table.data, .page > .section table, main table {
  width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem;
  background: #fff; font-size: .95rem;
}
table thead th {
  background: var(--tint); color: var(--navy-deep); text-align: left;
  padding: .55rem .8rem; border-bottom: 2px solid var(--navy); font-size: .9rem;
}
table tbody td {
  padding: .5rem .8rem; border-bottom: 1px solid var(--line);
}
.legacy td, .legacy th { vertical-align: top; padding: .45rem .6rem; }
.legacy td[align="CENTER"], .legacy th[align="CENTER"] { text-align: center; }
.legacy td[align="RIGHT"], .legacy th[align="RIGHT"] { text-align: right; }

.legacy h2, .legacy h3, .legacy h4 { color: var(--navy-dark); line-height: 1.3; margin: 1.1rem 0 .45rem; }
.legacy h3 { font-size: 1.13rem; }
.legacy h4 { font-size: 1.02rem; }

.legacy p { margin: .5rem 0; }
.legacy .c { text-align: center; }
.legacy .r { text-align: right; }

.legacy img { border-radius: 6px; background: #fff; }
.legacy a img { border-radius: 8px; }

.legacy hr.soft {
  border: 0; border-top: 1px solid var(--line); margin: 1.4rem auto; max-width: 70%;
}

.legacy ul { padding-left: 1.2rem; }

/* item-code / price line emphasis */
.legacy p b { color: var(--ink); }

/* catalog hub link tables become tidy panels */
.legacy .hublinks { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.legacy .hublinks a { font-weight: 600; }

/* gallery / selection grids */
.legacy .gallery-grid td { text-align: center; padding: .8rem .5rem; }

/* index of products (top thumbnail tables) */
.legacy .thumbstrip img { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 2px; }

/* product detail blocks (M2bDetail, single-product pages) */
.product-sheet {
  display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 1.2rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; margin: 1rem 0;
}
@media (max-width: 700px) { .product-sheet { grid-template-columns: 1fr; } }
.product-sheet img { justify-self: center; }
.price-flag { color: var(--ok); font-weight: 700; }

/* order box */
.order-box {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.4rem 0; font-size: .95rem;
}
.order-box h2 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--navy-deep); }

/* FAQ */
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.1rem; margin: .7rem 0; }
.faq-item h3 { margin: 0 0 .3rem; font-size: 1.02rem; color: var(--navy-deep); }
.faq-item p { margin: 0; color: var(--ink); font-size: .95rem; }

/* catalog A-Z index */
.az-cols { columns: 2 340px; column-gap: 2.2rem; }
.az-cols h2 { break-after: avoid; font-size: 1.05rem; color: var(--amber); margin: 1rem 0 .3rem; }
.az-cols ul { list-style: none; margin: 0 0 .8rem; padding: 0; }
.az-cols li { margin: .18rem 0; font-size: .93rem; }

/* sitemap page */
.sitemap-cols { columns: 2 320px; column-gap: 2.4rem; }
.sitemap-cols h2 { break-after: avoid; font-size: 1.02rem; color: var(--navy-deep); margin: 1rem 0 .3rem; }
.sitemap-cols ul { list-style: none; margin: 0 0 .8rem; padding: 0; }
.sitemap-cols li { margin: .15rem 0; font-size: .92rem; }

/* ---------- home page ---------- */
.hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, .18) 0 18%, transparent 19%),
    radial-gradient(circle at 88% 15%, rgba(37, 99, 235, .16) 0 16%, transparent 17%),
    radial-gradient(circle at 78% 85%, rgba(220, 38, 38, .12) 0 15%, transparent 16%),
    radial-gradient(circle at 20% 88%, rgba(22, 163, 74, .14) 0 16%, transparent 17%),
    linear-gradient(140deg, var(--navy-deep) 0%, var(--navy) 70%, #2b4ea3 100%);
  color: #fff;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 3.2rem 1.25rem 3.4rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.15; margin: 0 0 .7rem; font-weight: 800;
  max-width: 46rem;
}
.hero p { color: #dbe6ff; max-width: 46rem; margin: .3rem 0 1.4rem; font-size: 1.08rem; }
.hero .kicker {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #ffd58a; margin-bottom: .7rem;
}
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero .btn-primary { background: var(--amber-soft); color: #21354f; }
.hero .btn-primary:hover { background: #ffb221; color: #21354f; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; }

.home-section { max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 1.25rem 0; }
.home-section > h2 {
  font-size: 1.5rem; color: var(--navy-deep); margin: 0 0 .25rem;
}
.home-section > .sub { color: var(--muted); margin: 0 0 1.1rem; }

.cat-card { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; }
.cat-card .cat-icon { font-size: 1.35rem; }
.cat-card strong { color: var(--navy-deep); font-size: 1.02rem; }
.cat-card:hover strong { color: var(--amber); }
.cat-card span { color: var(--muted); font-size: .9rem; }

.value-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.value-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.value-item strong { display: block; color: var(--navy-deep); margin-bottom: .25rem; }
.value-item span { color: var(--muted); font-size: .92rem; }

.gallery-strip { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery-strip figure {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.gallery-strip img { width: 100%; height: 150px; object-fit: cover; display: block; }
.gallery-strip figcaption { padding: .55rem .75rem; font-size: .88rem; color: var(--muted); }
.gallery-strip a { text-decoration: none; }

.home-faq .faq-item { background: #fff; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem; background: var(--navy-deep); color: #c8d4ec;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 1.25rem 1.4rem;
  display: grid; gap: 1.6rem; grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand strong { color: #fff; font-size: 1.05rem; display: block; margin-bottom: .3rem; }
.footer-brand p { margin: 0; font-size: .9rem; color: #9fb0d4; max-width: 30rem; }
.site-footer h3 {
  color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  margin: 0 0 .55rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .3rem 0; }
.site-footer a { color: #c8d4ec; text-decoration: none; font-size: .92rem; }
.site-footer a:hover { color: #ffd58a; text-decoration: underline; }
.footer-legal {
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem 1.6rem;
  border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: #8fa2c7;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* back to top */
.to-top {
  display: inline-block; margin-top: 1.6rem; font-size: .88rem; font-weight: 600;
  text-decoration: none; color: var(--navy);
}

/* misc */
.tiny { font-size: .82rem; color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid #93b4f5; outline-offset: 2px; border-radius: 4px; }

@media print {
  .site-header, .site-footer, .crumbs, .notice, .to-top { display: none; }
  body { background: #fff; }
}