/* AFM Videos — design system
   Palette: deep navy chrome (lets multicolored covers pop), red for
   buy/action, gold for membership/premium accents. */
:root {
  --c-bg: #f6f7f9;
  --c-surface: #ffffff;
  --c-ink: #14202e;
  --c-muted: #5a6878;
  --c-navy: #0c2340;        /* primary brand */
  --c-navy-2: #16365c;      /* hover / gradient partner */
  --c-red: #c8102e;         /* CTA / buy */
  --c-red-2: #a30d26;
  --c-gold: #ffb81c;        /* premium / membership */
  --c-line: #dbe1e8;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(12, 35, 64, 0.14);
  --shadow-lg: 0 6px 24px rgba(12, 35, 64, 0.16);
  --container: 1160px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.55;
}
a { color: var(--c-navy-2); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; }

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

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}
.brand { display: flex; align-items: center; color: #fff; text-decoration: none; }
.brand .logo { height: 46px; width: auto; display: block; }
.main-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.main-nav a, .header-actions a {
  color: #e8eef6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover, .header-actions a:hover { color: var(--c-gold); }
.header-actions { margin-left: auto; display: flex; gap: 1rem; align-items: center; }

.search-form { display: flex; }
.search-form input {
  border: none; border-radius: 6px 0 0 6px; padding: 0.45rem 0.7rem;
  min-width: 180px; font-size: 0.9rem;
}
.search-form button {
  border: none; border-radius: 0 6px 6px 0; padding: 0.45rem 0.8rem;
  background: var(--c-red); color: #fff; font-weight: 700; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  border-radius: 8px; font-weight: 700; padding: 0.65rem 1.3rem; font-size: 1rem;
  transition: background 0.15s ease;
}
.btn-buy { background: var(--c-red); color: #fff; }
.btn-buy:hover { background: var(--c-red-2); }
.btn-navy { background: var(--c-navy); color: #fff; }
.btn-navy:hover { background: var(--c-navy-2); }
.btn-gold { background: var(--c-gold); color: var(--c-navy); }
.btn-outline {
  background: transparent; color: var(--c-navy);
  border: 2px solid var(--c-navy);
}

/* ---------- Hero ---------- */
.hero {
  /* photo subject sits right; gradient keeps the left text column readable */
  background:
    linear-gradient(95deg, rgba(12, 35, 64, 0.94) 0%, rgba(12, 35, 64, 0.78) 42%,
      rgba(12, 35, 64, 0.25) 72%, rgba(12, 35, 64, 0.05) 100%),
    var(--c-navy) url('../img/afm-videos-hero.jpg') right center / cover no-repeat;
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 3.5rem 2.25rem;
  margin: 1.5rem 0 2rem;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.hero h1 { margin: 0 0 0.6rem; font-size: 2.1rem; max-width: 24ch; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.hero p { margin: 0 0 1.25rem; color: #d6e0ec; max-width: 54ch; font-size: 1.05rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hero .btn-outline { color: #fff; border-color: rgba(255, 255, 255, 0.85); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Product grid ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 2rem 0 1rem;
}
.section-head h2 { margin: 0; font-size: 1.45rem; }
.section-head a { font-weight: 600; font-size: 0.92rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.1rem;
}
.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card a.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.card-media {
  aspect-ratio: 2 / 3; background: #ffffff; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 1px solid var(--c-line);
}
.card-media .cover {
  width: 100%; height: 100%; object-fit: contain; padding: 12px;
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: var(--c-navy); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px;
  padding: 0.2rem 0.55rem; border-radius: 999px; text-transform: uppercase;
}
.badge.stream { background: var(--c-red); }
.card-body { padding: 0.8rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.card-title { font-weight: 700; font-size: 0.98rem; margin: 0; }
.card-author { color: var(--c-muted); font-size: 0.85rem; margin: 0; }
.card-price { margin-top: auto; font-weight: 800; font-size: 1.05rem; color: var(--c-navy); }
.card-price .was { color: var(--c-muted); text-decoration: line-through; font-weight: 500; font-size: 0.85rem; margin-left: 0.4rem; }

/* ---------- Product detail ---------- */
.product-page { display: grid; grid-template-columns: minmax(300px, 5fr) 4fr; gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 820px) { .product-page { grid-template-columns: 1fr; } }
.product-media video, .product-media img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); background: #000;
}
.product-info h1 { margin: 0 0 0.4rem; font-size: 1.7rem; }
.product-info .byline { color: var(--c-muted); margin: 0 0 1rem; }
.price-block { margin: 1rem 0; }
.price-block .price { font-size: 1.9rem; font-weight: 800; color: var(--c-navy); }
.price-block .sub-price { color: var(--c-red); font-weight: 700; }
.crumbs { font-size: 0.85rem; color: var(--c-muted); margin: 1rem 0 0; }
.crumbs a { color: var(--c-muted); }

/* ---------- Split layouts (cart, checkout) ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 2rem;
  align-items: start;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Misc ---------- */
.pagination { display: flex; gap: 0.4rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.4rem 0.8rem; border-radius: 6px; text-decoration: none;
  border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-navy);
}
.pagination .current { background: var(--c-navy); color: #fff; border-color: var(--c-navy); }

.category-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.category-tile {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); text-decoration: none; color: inherit;
}
.category-tile h3 { margin: 0 0 0.4rem; color: var(--c-navy); }
.category-tile ul { margin: 0; padding-left: 1.1rem; color: var(--c-muted); font-size: 0.9rem; }

.placeholder-note {
  border-left: 4px solid var(--c-gold);
  background: var(--c-surface);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
}
.error-page { padding: 3rem 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-navy);
  color: #b9c6d6;
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: #dce6f1; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .split-grid { grid-template-columns: 1fr; }
  .split-grid aside { order: -1; }
}
@media (max-width: 760px) {
  .header-row { gap: 0.6rem 1rem; padding: 0.6rem 0 0.8rem; }
  .brand .logo { height: 36px; }
  .header-actions { margin-left: auto; gap: 0.8rem; }
  .main-nav { order: 3; width: 100%; gap: 0.9rem; justify-content: space-between; }
  .main-nav a { font-size: 0.9rem; }
  .search-form { order: 4; width: 100%; }
  .search-form input { flex: 1; min-width: 0; }
  .hero {
    /* full-width text on small screens: flatten the overlay for legibility */
    background:
      linear-gradient(rgba(12, 35, 64, 0.88), rgba(12, 35, 64, 0.88)),
      var(--c-navy) url('../img/afm-videos-hero.jpg') center / cover no-repeat;
    padding: 1.8rem 1.3rem;
    min-height: 0;
  }
  .hero h1 { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero .btn { display: block; text-align: center; margin: 0; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
  .card-title { font-size: 0.9rem; }
  .section-head { flex-wrap: wrap; }
  table { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
