/* Montserrat, self-hosted: the exact woff2 Google serves, latin and latin-ext only.
   Same files, no third-party origin and no extra handshake before text can paint.
   font-display stays optional — it is what took the catalogue's CLS to zero. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('../fonts/montserrat-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('../fonts/montserrat-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/montserrat-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('../fonts/montserrat-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --primary:      #dd3333;
  --primary-dark: #bb2222;
  --dark:         #000000;
  --light:        #ffffff;
  --gray:         #6c757d;
  --bg-light:     #f8f9fa;
  --border:       #ddd;
  --border-mid:   #dee2e6;
  --gold:         #ffd700;
  --success:      #198754;
  --danger:       #dc3545;
  --warning-text: #1a1a1a;
  --shadow-sm:    0 4px 15px rgba(0,0,0,0.06);
  --shadow-md:    0 12px 24px rgba(0,0,0,0.15);
  --font-base:    'Montserrat', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font-base);
  background: var(--light);
  color: var(--dark);
  margin: 0;
  line-height: 1.6;
}

a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--primary); }

.col-lg-9 a:not(.btn),
.accordion-body a:not(.btn),
section p a:not(.btn),
section li a:not(.btn) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.col-lg-9 a:not(.btn):hover,
.accordion-body a:not(.btn):hover,
section p a:not(.btn):hover,
section li a:not(.btn):hover { text-decoration: none; }

.text-primary { color: var(--primary) !important; }

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: 1320px;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* ==========================================================================
   Warning Bar
   ========================================================================== */
#warningBar {
  background: var(--gold);
  color: var(--warning-text);
  font-size: 0.85rem;
  position: relative;
  text-align: center;
  padding: 0.6rem 3rem 0.6rem 1rem;
}
#warningBar strong { color: var(--dark); }
#warningBar button {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  background: none;
  border: 2px solid rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--warning-text);
  padding: 0;
}
#warningBar button:hover {
  background-color: rgba(0,0,0,0.12);
  border-color: rgba(0,0,0,0.7);
}

/* Top Bar / Ticker
   ========================================================================== */
.top-bar {
  background: var(--primary);
  color: var(--light);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.ticker-wrap { text-align: center; }
.ticker-text  { white-space: nowrap; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar-brand { padding: 0; }
/* width:auto is load-bearing: the img carries width/height attributes for CLS, and without
   this the attribute width wins while max-height clamps the height, stretching the logo. */
.navbar-brand .logo { max-height: 50px; width: auto; }

.navbar-nav {
  flex-wrap: wrap !important;
  gap: 8px 12px;
}

.nav-link {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark) !important;
  padding: 10px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--primary) !important;
  background: rgba(255,255,255,0.1);
}

@media (min-width: 1200px) {
  .navbar-nav { flex-wrap: nowrap !important; }
}
@media (max-width: 1199px) {
  .navbar-nav { justify-content: center; }
}

/* Open navbar dropdowns on hover (desktop / expanded navbar only) */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
  }
  /* Hover is the sole trigger on desktop: a click-opened (.show) menu that isn't
     hovered must stay hidden, otherwise it lingers when moving to a neighbor. */
  .navbar-expand-lg .navbar-nav .dropdown-menu.show {
    display: none;
  }
  /* No gap between the toggle and the menu so the hover isn't lost */
  .navbar-expand-lg .navbar-nav .dropdown-menu {
    margin-top: 0;
  }
}

.search-form { min-width: 200px; }
.search-form input.form-control { min-width: 200px !important; }

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.hero-slider .carousel-item img { height: 60vh; object-fit: cover; }
.hero-slider .carousel-caption {
  background: rgba(0,0,0,0.5);
  padding: 20px;
  border-radius: 10px;
}
.hero-slider .carousel-caption h1,
.hero-slider .carousel-caption p { color: var(--light); }
.hero-slider .btn-danger { background: var(--primary); border: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-danger {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--light);
}
.btn-danger:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-outline-dark { color: var(--dark); border-color: var(--dark); }
.btn-outline-dark:hover { background-color: var(--dark); color: var(--light); }

/* ==========================================================================
   Product Card
   ========================================================================== */
.product-card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.product-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 0;
  background: none;
}

/* Card grids frame the shot on a light plate instead of cropping it; was an inline style. */
.product-img-tile {
  height: 220px;
  object-fit: contain;
  padding: 15px;
  background: var(--bg-light);
}

.product-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sale-badge {
  background: var(--primary);
  color: var(--light);
  padding: 5px 10px;
  border-radius: 5px;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.8rem;
}

.price { color: var(--primary); font-weight: bold; }
.old-price { text-decoration: line-through; color: var(--gray); margin-left: 5px; }
.stars { color: var(--gold); }

/* Product head — grouped title / rating+stock / price */
.product-head {
  margin-bottom: 1.5rem;
}
.product-title {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--dark);
}
.product-rating { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.product-rating .stars { font-size: 1rem; letter-spacing: 1px; }
.product-rating .stock-badge { font-size: 0.72rem; padding: 0.42em 0.7em; letter-spacing: 0.02em; }
.product-price { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.product-price .price { font-size: 2rem; font-weight: 800; line-height: 1; }
.product-price .old-price { font-size: 1.1rem; margin-left: 0; }
.product-price .save-badge {
  font-size: 0.8rem; font-weight: 700; color: var(--success);
  background: rgba(25, 135, 84, 0.1); padding: 0.2em 0.55em; border-radius: 6px;
}

/* Product-page quantity stepper */
.product-qty { width: 130px; flex-shrink: 0; }
/* Unify borders so the number field and +/- buttons share one color (no top/bottom mismatch) */
.product-qty .btn,
.product-qty .form-control { border-color: var(--border); }
.product-qty input[type="number"]::-webkit-inner-spin-button,
.product-qty input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.product-qty input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ==========================================================================
   Video Placeholders
   ========================================================================== */
.video-placeholder {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Click-to-play stand-in: the player iframe replaces the button, so both need the same box. */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-frame > iframe,
.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The posters come from Spotlightr at 720px, so a wider box only blurs them. */
.product-description .video-frame { max-width: 720px; margin: 1.5rem 0; }

.video-facade {
  display: block;
  text-decoration: none;
  padding: 0;
  background: var(--dark);
  cursor: pointer;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  transition: background 0.15s ease;
}

/* The triangle, drawn with borders so the button needs no icon font or SVG request. */
.video-facade-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--light);
}

.video-facade:hover .video-facade-play,
.video-facade:focus-visible .video-facade-play {
  background: var(--primary);
}

/* Drawn inside: the facade fills its frame and .video-placeholder clips with overflow:hidden,
   so a positive offset would put the focus ring where nobody can see it. */
.video-facade:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

/* ==========================================================================
   Accordion
   ========================================================================== */
.accordion-button { background: var(--light); color: var(--dark); border: 1px solid var(--border); }
.accordion-button:not(.collapsed) { background: var(--bg-light); color: var(--primary); }
.accordion-body { background: var(--light); }

/* ==========================================================================
   Categories List
   ========================================================================== */
.list-unstyled a { display: block; padding: 10px 0; transition: color 0.3s; }
.list-unstyled a:hover { color: var(--primary); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--dark); color: var(--light); }
.footer a { color: var(--light); text-decoration: none; }
.footer a:hover { color: var(--primary); }
.footer h5 { color: var(--light); font-weight: bold; margin-bottom: 1rem; }
.footer-logo { max-width: 200px; }
.footer-reviews-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--primary) !important;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.footer-reviews-link:hover { color: var(--light) !important; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination .page-item .page-link {
  color: var(--dark);
  background-color: var(--light);
  border: 1px solid var(--border);
  text-decoration: none;
}
.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--light);
}
.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  background-color: var(--bg-light);
  border-color: var(--border);
  color: var(--primary);
}
.pagination .page-item.disabled .page-link {
  color: var(--gray);
  background-color: var(--light);
  border-color: var(--border);
}

/* ==========================================================================
   Cart
   ========================================================================== */
.cart-item { transition: box-shadow 0.3s ease; }
.cart-item:hover { box-shadow: var(--shadow-md); }
.cart-item-title { font-size: 1.3rem; margin-top: 0.5rem; }

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: var(--bg-light);
  padding: 10px;
}
@media (min-width: 577px) {
  .cart-item-img { width: 100px; height: 100px; }
}

.cart-summary { box-shadow: var(--shadow-sm); }
.cart-empty-message { box-shadow: var(--shadow-sm); border-radius: 10px; }
.js-subtotal { color: var(--dark); }

/* ==========================================================================
   Checkout / Forms
   ========================================================================== */
.form-label { font-weight: bold; color: var(--dark); font-size: 1rem; }
.form-control,
.form-select {
  font-size: 1rem;
  border-radius: 0.5rem;
  background: var(--light);
  border: 1px solid var(--border);
}
.form-control-lg,
.form-select-lg { border-radius: 0.375rem; }
.form-check-input { margin-top: 0.25rem; }
.invalid-feedback { color: var(--danger); }

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
  outline: none;
}
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2);
  border-color: var(--primary);
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkout-page { background-color: var(--bg-light) !important; }
.checkout-page .text-primary { color: var(--primary) !important; }

/* ==========================================================================
   Best Sellers sidebar block
   ========================================================================== */
.best-seller-item {
  color: var(--dark);
  transition: background 0.15s;
}
.best-seller-item:hover { background: var(--bg-light); color: var(--primary); }
.best-seller-rank {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray);
  min-width: 1.2rem;
  text-align: center;
}
.best-seller-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-light);
  border-radius: 4px;
}
.best-seller-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.best-seller-title {
  font-size: 0.8rem;
  line-height: 1.3;
  color: inherit;
}
.best-seller-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(220,53,69,0.08);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.best-seller-substance {
  font-size: 0.72rem;
  color: var(--gray);
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Order Page
   ========================================================================== */
.order-page .table-responsive { overflow-x: auto; width: 100%; }

@media (min-width: 992px) {
  .order-page .row.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
aside.sidebar {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.sidebar .filter-card,
.filter-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sidebar .filter-title,
.filter-title {
  margin: 0;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dark);
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  cursor: default;
  user-select: none;
  text-align: center;
}
.sidebar .filter-content { padding: 8px 0; }
.sidebar .filter-link-item { margin: 0; }
.sidebar .filter-link-item > a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sidebar .filter-link-item > a:hover {
  color: var(--primary);
  background: rgba(255,0,0,0.04);
  border-left-color: var(--primary);
}
.sidebar .filter-link-item > a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 700;
}
.sidebar .filter-link-item.child > a {
  font-size: 0.85rem;
  font-weight: 500;
  padding-left: 12px;
}
.sidebar .ms-4 {
  margin-left: 0 !important;
  padding-left: 0;
  border-left: none;
  background: var(--bg-light);
}

/* ==========================================================================
   Rich Content (catalog description + product description)
   ========================================================================== */
.catalog-description,
.product-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333;
}
.catalog-description h1,
.product-description h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  color: var(--dark);
}
.catalog-description h1 strong,
.catalog-description h2 strong,
.catalog-description h3 strong,
.product-description h1 strong,
.product-description h2 strong,
.product-description h3 strong,
.product-description h4 strong { font-weight: inherit; }

.catalog-description h2,
.product-description h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: var(--dark);
}
.catalog-description h3,
.product-description h3 {
  font-size: 0.95rem;
  font-weight: 700;
  font-style: italic;
  margin: 1.25rem 0 0.3rem;
  color: #444;
}
.catalog-description p,
.product-description p { margin-bottom: 0.9rem; }

.catalog-description ul,
.catalog-description ol,
.product-description ul,
.product-description ol { padding-left: 1.5rem; margin-bottom: 1rem; }

.catalog-description li,
.product-description li { margin-bottom: 0.3rem; }

.catalog-description table,
.product-description table {
  width: 100%;
  margin: 0.5rem 0 1.25rem;
  border-collapse: collapse;
}
.catalog-description .table-scroll,
.product-description .table-scroll {
  margin: 0.5rem 0 1.25rem;
  overflow-x: auto;
}
.catalog-description .table-scroll > table,
.product-description .table-scroll > table { margin: 0; }
.catalog-description td,
.catalog-description th,
.product-description td,
.product-description th {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-mid);
}
.catalog-description tr:first-child td,
.product-description tr:first-child td {
  font-weight: 700;
  background: var(--bg-light);
}
@media (max-width: 575.98px) {
  .catalog-description table,
  .product-description table { font-size: 0.8rem; }
  .catalog-description td,
  .catalog-description th,
  .product-description td,
  .product-description th { padding: 0.3rem; }
}

.catalog-description a:not(.btn),
.product-description a:not(.btn) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.catalog-description a:not(.btn):hover,
.product-description a:not(.btn):hover { text-decoration: none; }

/* Video embed wrapper inside description */
.product-description div:has(> iframe) { margin: 1.5rem 0; }

/* Unpacking promo phrase (imported from WP as h3 with inline orange color) */
.product-description h3[style*="color"] {
  color: var(--primary) !important;
  font-size: 1.1rem;
  font-weight: 400;
  font-style: normal;
}

/* Product description extras */
.product-description h4 { font-size: 0.9rem; font-weight: 700; margin: 1rem 0 0.3rem; color: var(--dark); }
.product-description img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.5rem 0 1rem; }
.product-description table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.product-description th,
.product-description td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.product-description th { background: var(--bg-light); font-weight: 700; }

/* ==========================================================================
   Product Specs (excerpt)
   ========================================================================== */
.product-specs {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.875rem;
}
.product-specs__row {
  display: flex;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
}
.product-specs__row:last-child { border-bottom: none; }
.product-specs__row:nth-child(even) { background: var(--bg-light); }
.product-specs dt { flex: 0 0 42%; font-weight: 600; color: var(--gray); }
.product-specs dd { margin: 0; color: var(--dark); }

/* ==========================================================================
   Product Meta (Brand / Category / Tags)
   ========================================================================== */
.product-meta { font-size: 0.875rem; }
.product-meta__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
}
.product-meta__label {
  flex: 0 0 80px;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.product-meta__value a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.product-meta__value a:hover { text-decoration: none; }

/* ==========================================================================
   Product Tabs
   ========================================================================== */
#productTabs {
  border-bottom: none;
  margin-bottom: 0 !important;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden; /* horizontal scroll only; prevents the spurious vertical scrollbar */
  -webkit-overflow-scrolling: touch;
}
#productTabs .nav-item { flex-shrink: 0; }
#productTabs .nav-link {
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray);
  padding: 10px 20px;
}
#productTabs .nav-link:hover { color: var(--dark); border-color: transparent; }
/* Active tab: gray top/side borders, white bottom border to glue flush onto the content box */
#productTabs .nav-link.active {
  color: var(--dark);
  background: var(--light);
  border-color: var(--border-mid) var(--border-mid) var(--light);
}
/* Content box has a full border (the separator line under the inactive tabs); pulled up 1px
   so the active tab's white bottom border overlaps and masks the line under the active tab. */
#productTabsContent {
  margin-top: -1px;
  background: var(--light);
  border: 1px solid var(--border-mid);
  border-radius: 0 8px 8px 8px; /* square top-left so the active first tab glues flush */
}
#productTabsContent:not(:has(> #description.active)) {
  border-top-left-radius: 8px;
}
#productTabsContent .tab-pane { padding: 1.75rem 2rem; }

/* ==========================================================================
   Categories A-Z
   ========================================================================== */
.categories-az .col { padding: 0; }
.categories-az .col a {
  display: block;
  padding: 7px 14px;
  color: #222;
  text-decoration: none;
  font-size: .9rem;
  border-bottom: 1px solid #e9ecef;
  transition: background .15s, color .15s;
}
.categories-az .col a:hover { background: var(--primary); color: var(--light); }

/* ==========================================================================
   Success color — shared token for toast + success badges
   ========================================================================== */
.badge.bg-success { background-color: var(--success) !important; }

/* ==========================================================================
   Toasts — skin over the Bootstrap component
   ========================================================================== */
.toast {
  --bs-toast-bg: var(--toast-bg);
  --bs-toast-color: var(--toast-fg);
  --bs-toast-border-color: transparent;
  --bs-toast-border-radius: 14px;
  --bs-toast-box-shadow: var(--shadow-md);
  --bs-toast-padding-x: 14px;
  --bs-toast-padding-y: 12px;
  --bs-toast-font-size: 0.875rem;
  --bs-toast-max-width: 400px;
  font-family: var(--font-base);
}

/* Each type gets a colour the rest of the site already uses: gold is the warning bar's,
   red the brand's, green the in-stock badge's. */
.toast--success { --toast-bg: var(--success); --toast-fg: var(--light); }
.toast--danger  { --toast-bg: var(--danger);  --toast-fg: var(--light); }
.toast--warning { --toast-bg: var(--gold);    --toast-fg: var(--warning-text); }
.toast--info    { --toast-bg: var(--dark);    --toast-fg: var(--light); }

.toast--clickable { cursor: pointer; }
.toast--clickable:hover { filter: brightness(1.08); }

.toast-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 14px 0 0 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.toast--warning .toast-icon { background: rgba(0, 0, 0, 0.18); }

.toast-message { color: inherit; opacity: 0.85; }

@media (max-width: 575.98px) {
  /* The doubled class beats this theme's own .p-3 override for small screens.
     Lifted above the floating WhatsApp button — 54px tall, sitting 30px from the bottom —
     so it cannot cover the toast's close button. */
  .toast-container.p-3 {
    left: 0 !important;
    right: 0;
    bottom: 96px !important;
    padding: 12px !important;
    transform: none !important;
    width: 100%;
  }
  .toast {
    width: 100%;
    max-width: 100%;
  }
}

/* ==========================================================================
   Responsive — tablet and below (≤ 991px)
   ========================================================================== */
@media (max-width: 991px) {
  /* Ticker */
  .ticker-wrap { overflow: hidden; width: 100%; }
  .ticker-text { display: inline-block; padding-left: 100%; animation: ticker-scroll 20s linear infinite; }

  /* Navbar */
  .navbar-brand .logo { max-height: 44px; width: auto; }
  .navbar-nav { flex-direction: column; gap: 2px; width: 100%; text-align: center; }
  .navbar-nav .nav-link { width: 100%; text-align: left; padding: 12px 20px; }
  .search-form { width: 100%; margin-top: 1rem; }

  /* Single-column sections */
  .footer .row > [class*="col-"],
  .blog-section .row > [class*="col-"],
  .random-products-grid > [class*="col-"],
  #videos .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .footer-logo { display: block; margin: 0 auto; }

  /* Layout */
  .sticky-top { position: static !important; }
  .sidebar { margin-bottom: 2rem; }
  .best-sellers-card { display: none !important; }

  /* Order page */
  .order-page.container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .order-page .row { margin-left: 0 !important; margin-right: 0 !important; }
  .order-page .col-lg-8,
  .order-page .col-lg-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .order-page .card { width: 100% !important; }
}

/* ==========================================================================
   Responsive — tablet portrait (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hero slider */
  .hero-slider .carousel-item img { height: 40vh; }
  .hero-slider .carousel-caption { padding: 10px 12px; bottom: 10px; left: 8%; right: 8%; }
  .hero-slider .carousel-caption h1 { font-size: 1.1rem; margin-bottom: 4px; }
  .hero-slider .carousel-caption p { font-size: 0.8rem; margin-bottom: 8px; }
  .hero-slider .btn-danger { font-size: 0.8rem; padding: 6px 16px; }

  /* Center product title, rating and price/stock on mobile */
  .product-head { text-align: center; }
  .product-head .product-rating,
  .product-head .product-price { justify-content: center; }

  /* Product tabs */
  .js-add-to-cart,
  .btn-outline-secondary[disabled] { display: block; width: 100%; }
  /* Keep the qty stepper and Add to Cart on one line on mobile (button fills remaining width) */
  .product-buy-row { flex-wrap: nowrap; }
  .product-buy-row .js-add-to-cart { display: inline-block; width: auto; flex: 1 1 auto; padding-left: 0; padding-right: 0; }
  #productTabs .nav-link {
    font-size: 0.75rem;
    padding: 8px 12px;
    letter-spacing: 0.02em;
  }
  #productTabsContent .tab-pane { padding: 1.25rem; }
}

/* ==========================================================================
   Responsive — mobile (≤ 576px)
   ========================================================================== */
@media (max-width: 576px) {
  /* Typography */
  h1.h2, h2 { font-size: 1.5rem; }

  /* Spacing */
  .p-3   { padding: 1rem !important; }
  .p-4   { padding: 1.5rem !important; }
  .p-md-4 { padding: 1.25rem !important; }
  .p-lg-5 { padding: 1.5rem !important; }

  /* Buttons / forms */
  .btn-lg { font-size: 0.9rem; padding: 0.5rem 1rem; }
  .form-label { font-size: 0.9rem; }
  .form-control, .form-select { font-size: 0.9rem; }
  .search-form { width: 100% !important; margin-bottom: 10px; }

  /* Product grid */
  .product-img { max-height: 180px; }
  .row.g-4 [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
  .blog-section .row > [class*="col-"] { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }

  /* Pagination */
  .pagination { flex-wrap: wrap; justify-content: center; }
  .pagination .page-item { margin: 2px; }
  .pagination .page-link { padding: 0.25rem 0.5rem; font-size: 0.875rem; }

  /* Cart item */
  .cart-item {
    position: relative;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    text-align: left;
  }
  .cart-item-img { width: 70px !important; height: 70px !important; flex-shrink: 0; }
  .cart-item-title { font-size: 1.05rem; }
  .cart-item .me-3 { margin-right: 12px !important; margin-bottom: 0 !important; }
  .cart-item .flex-grow-1 { padding-right: 30px; min-width: 0; }
  .cart-item .js-remove-item { position: absolute !important; top: 10px !important; right: 10px !important; margin: 0 !important; }
  /* The delete link also carries .ms-auto, and hiding it left the item with no way to be
     removed on a phone — the rule above deliberately places it in the corner instead. */
  .cart-item .ms-auto:not(.js-remove-item) { display: none; }
  /* Keep unit price / qty stepper / subtotal on a single line */
  .cart-item-meta { flex-wrap: nowrap !important; gap: 0.65rem !important; }
  .cart-item-meta .fs-5 { font-size: 0.9rem !important; white-space: nowrap; }
  .cart-item .qty-input { width: 100px !important; flex-shrink: 0; }
  .cart-item .product-qty .btn { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
  .cart-item .product-qty .form-control { padding-left: 3px !important; padding-right: 3px !important; }

  /* Sidebar */
  .sidebar .filter-content { padding: 10px; }
  .sidebar .filter-link-item > a { padding: 12px; font-size: .98rem; }
  .sidebar .ms-4 { margin-left: 12px !important; padding-left: 10px; }
}

/* ==========================================================================
   Cycle Finder Quiz
   ========================================================================== */

/* The shared widget paints itself from --accent and --light-accent, falling back
   to its own blue; hand it the shop's red instead. The two buttons it renders are
   Bootstrap ones, so they are repainted through the Bootstrap button variables. */
.cfq {
  --accent:       var(--primary);
  --light-accent: rgba(221, 51, 51, .1);
  --light-accent: color-mix(in srgb, var(--primary) 10%, transparent);
}

.cfq .btn-primary {
  --bs-btn-bg:                   var(--primary);
  --bs-btn-border-color:         var(--primary);
  --bs-btn-hover-bg:             var(--primary-dark);
  --bs-btn-hover-border-color:   var(--primary-dark);
  --bs-btn-active-bg:            var(--primary-dark);
  --bs-btn-active-border-color:  var(--primary-dark);
  --bs-btn-disabled-bg:          var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
}

.cfq .btn-outline-primary {
  --bs-btn-color:                var(--primary);
  --bs-btn-border-color:         var(--primary);
  --bs-btn-hover-bg:             var(--primary);
  --bs-btn-hover-border-color:   var(--primary);
  --bs-btn-active-bg:            var(--primary);
  --bs-btn-active-border-color:  var(--primary);
}

/* Type and corners the way the rest of the shop draws them: bold headings, heavy product
   titles with tight tracking, and the 10px radius used by the product cards. */
.cfq .cfq-question {
  font-weight: 700;
}

.cfq .cfq-result-title-link {
  font-weight: 800;
  letter-spacing: -0.01em;
  /* The widget prints its own rules after this file and scopes them by id, so the two
     properties it sets itself need the flag to lose; the rest above wins on its own. */
  color: var(--dark) !important;
}

.cfq .cfq-result-card,
.cfq .cfq-result-imgwrap {
  border-radius: 10px;
}

.cfq .cfq-opt {
  border-radius: 10px !important;
}
