/* AMC Foam catalogue styles */

:root {
  --blue: #0f3a5f;
  --blue-deep: #0a2a46;
  --accent: #1f7a8c;
  --accent-warm: #e8a33d;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --text: #1c2733;
  --muted: #5b6b7a;
  --line: #dde4ea;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 58, 95, 0.08), 0 8px 24px rgba(15, 58, 95, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue-deep);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #2ea3b8);
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: .5px;
}
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-sub { font-size: 12px; opacity: .75; }

.topbar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 9px 14px;
  max-width: 560px;
}
.topbar-search svg { width: 17px; height: 17px; opacity: .7; flex-shrink: 0; }
.topbar-search input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font: inherit; font-size: 14px;
}
.topbar-search input::placeholder { color: rgba(255,255,255,.55); }

.btn-order {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-warm);
  color: #212121; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 8px;
  text-decoration: none; flex-shrink: 0;
  transition: filter .15s;
}
.btn-order:hover { filter: brightness(1.07); }
.btn-order svg { width: 16px; height: 16px; }

/* ---------- Layout ---------- */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px 24px 60px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 6px 14px;
  font-size: 13.5px;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.sidebar-heading {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  padding: 0 14px 8px;
}
.sidebar ul { list-style: none; margin: 0 0 14px; padding: 0; }
.sidebar a {
  display: block;
  padding: 5px 14px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
}
.sidebar a:hover { background: var(--bg); }
.sidebar a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(31,122,140,.07);
  font-weight: 600;
}
.nav-cat {
  font-weight: 600;
  padding: 6px 14px 2px;
  color: var(--blue);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nav-cat ul li a { padding-left: 26px; font-weight: 400; }

.sidebar-foot {
  margin: 6px 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.sidebar-foot .rev { opacity: .6; }

.nav-toggle { display: none; }

/* ---------- Content ---------- */
.content { min-width: 0; }

.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #155d80 60%, var(--accent) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 44px 40px;
  margin-bottom: 36px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero p { margin: 0 0 22px; max-width: 640px; opacity: .9; font-size: 15.5px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-links a {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; text-decoration: none;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  transition: background .15s;
}
.hero-links a:hover { background: rgba(255,255,255,.25); }

/* ---------- Categories & products ---------- */
.category { margin-bottom: 40px; }
.category-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
  margin: 0 0 18px;
}

.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 18px;
  margin-bottom: 18px;
  scroll-margin-top: 90px;
}
.product-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  background: var(--blue);
  color: #fff;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 9px 12px;
  white-space: nowrap;
}
thead th:first-child { border-radius: 6px 0 0 0; }
thead th:last-child { border-radius: 0 6px 0 0; }
tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody tr:nth-child(even) { background: #f8fafb; }
tbody tr:hover { background: rgba(31,122,140,.06); }
tbody td:first-child { font-weight: 600; color: var(--blue); }

.notes {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}
.notes li { padding: 2px 0 2px 18px; position: relative; }
.notes li::before {
  content: "";
  position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-warm);
}

/* ---------- Info sections ---------- */
.info-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
}
.info-section h2 {
  margin: 0 0 20px;
  font-size: 20px; font-weight: 700; color: var(--blue);
}

.terms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.term h3 { margin: 0 0 6px; font-size: 14.5px; color: var(--blue); }
.term p { margin: 0; font-size: 13.5px; color: var(--muted); }

.returns-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.card h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; font-size: 14.5px;
}
.card h3 svg { width: 18px; height: 18px; }
.card-ok { background: #f2faf5; border-color: #cde8d6; }
.card-ok h3 { color: #1e7a45; }
.card-no { background: #fdf4f2; border-color: #f0d4cd; }
.card-no h3 { color: #b3402e; }
.card-how { background: #f6f9fb; }
.card-how h3 { color: var(--blue); }
.card ul, .card ol { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.card li { margin-bottom: 6px; }

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.contact-card {
  background: #f6f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 14px;
}
.contact-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent);
  margin-bottom: 6px;
}
.contact-card a { color: var(--blue); text-decoration: none; font-weight: 600; }
.contact-card a:hover { text-decoration: underline; }

.fineprint { color: var(--muted); font-size: 12.5px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 290px;
    max-height: none;
    border-radius: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.2);
    padding-top: 20px;
  }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle {
    display: inline-flex;
    align-items: center; gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 16px;
    font: inherit; font-weight: 600; font-size: 14px;
    color: var(--blue);
    cursor: pointer;
    margin-bottom: 18px;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .terms-grid, .returns-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 30px 24px; }
}

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar-search { order: 3; min-width: 100%; }
  .btn-order { padding: 9px 12px; font-size: 13px; }
  .contact-grid { grid-template-columns: 1fr; }
  .product { padding: 16px 14px 14px; }
}

/* ---------- Product images ---------- */
.product-img {
  margin: 0 0 16px;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f6f8;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.product-img img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #fff;
}

/* ---------- Print ---------- */
@media print {
  .topbar, .sidebar, .nav-toggle, .hero-links { display: none; }
  .layout { display: block; padding: 0; max-width: none; }
  .hero { border-radius: 0; padding: 20px; }
  .product, .info-section { box-shadow: none; break-inside: avoid; }
  tbody td, thead th { white-space: normal; }
}
