/* ============================================================
   Ben Vision Printing — global styles
   Mobile-first. Bootstrap 5 handles the grid/utilities; this file
   only adds brand colour, header/footer, and shared components.
   ============================================================ */

:root {
  --bv-primary: #00cec8;      /* theme colour (Settings) */
  --bv-primary-dark: #00a9a4;
  --bv-btn: #00cec8;          /* button colour (Settings) */
  --bv-btn-dark: #00a9a4;
  --bv-btn-text: #ffffff;
  --bv-footer: #1f2a44;       /* footer colour (Settings) */
  --bv-footer-text: #ffffff;
  --bv-secondary: #1f2a44;    /* deep navy for footer/text */
  --bv-accent: #ffb703;       /* accent yellow for highlights */
  --bv-light-bg: #f7f7fb;
  --bv-radius: 0.75rem;
}

body {
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2b2b2b;
  background-color: #fff;
}

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

.btn-primary {
  background-color: var(--bv-btn);
  border-color: var(--bv-btn);
  color: var(--bv-btn-text);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--bv-btn-dark);
  border-color: var(--bv-btn-dark);
  color: var(--bv-btn-text);
}
.btn-outline-primary {
  color: var(--bv-btn);
  border-color: var(--bv-btn);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--bv-btn);
  border-color: var(--bv-btn);
  color: var(--bv-btn-text);
}

/* ---- Header ---- */
.site-header .navbar {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.brand-mark {
  font-size: 1.6rem;
  line-height: 1;
}
.brand-name {
  color: var(--bv-secondary);
  font-size: 1.15rem;
}
.site-header .nav-link {
  font-weight: 500;
  color: var(--bv-secondary);
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--bv-primary);
}

.nav-search-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7ef;
  background: var(--bv-light-bg);
  color: var(--bv-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-search-toggle:hover {
  background: var(--bv-primary);
  color: #fff;
  border-color: var(--bv-primary);
}

/* ---- Search modal ---- */
.search-modal-form {
  max-width: 720px;
  margin: 0 auto;
}
#searchResults .row {
  margin-top: 1.5rem;
}

.flash-toast {
  border-radius: 0;
  margin-bottom: 0;
  text-align: center;
}

/* ---- Section spacing helper ---- */
.section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.section-title {
  font-weight: 700;
  color: var(--bv-secondary);
  margin-bottom: 1.5rem;
}

/* ---- Generic content card (categories, products, brands reuse this) ---- */
.bv-card {
  background: #fff;
  border-radius: var(--bv-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}
.bv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.bv-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---- Hero slider ---- */
.hero-slide-img {
  height: 60vh;
  min-height: 280px;
  max-height: 560px;
  object-fit: cover;
}
.carousel-caption {
  background: rgba(31, 42, 68, 0.55);
  border-radius: var(--bv-radius);
  padding: 1.25rem 1.5rem;
  bottom: 15%;
}
.carousel-caption h1 {
  font-size: 1.6rem;
  font-weight: 700;
}
@media (min-width: 768px) {
  .carousel-caption h1 {
    font-size: 2.4rem;
  }
}

/* ---- Category tabs (home page + category page pills) ---- */
.nav-pills .nav-link {
  color: var(--bv-secondary);
  border: 1px solid #e5e7ef;
  border-radius: 2rem;
  padding: 0.5rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.nav-pills .nav-link.active {
  background-color: var(--bv-btn);
  border-color: var(--bv-btn);
  color: var(--bv-btn-text);
}

/* ---- Product card ---- */
.bv-card-noimg {
  aspect-ratio: 4 / 3;
  background: var(--bv-light-bg);
}

/* ---- Brand strip ---- */
.brand-logo img {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.brand-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
}
.brand-name-fallback {
  font-weight: 600;
  color: var(--bv-secondary);
  opacity: 0.7;
}

/* ---- Clients page ---- */
.client-card {
  background: #fff;
  border-radius: var(--bv-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 1rem;
  text-align: center;
  min-height: 180px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
/* Fixed-height logo area so every card looks uniform, whatever size/shape
   the uploaded logo actually is. */
.client-card img {
  display: block;
  height: 72px;
  width: 100%;
  max-width: 160px;
  object-fit: contain;
}
.client-card-noimg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bv-light-bg);
  color: var(--bv-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}
.client-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bv-secondary);
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

/* ---- Marquee: full-width single row scrolling right to left --------------
   Shared by the client logos and the customer testimonials.
   The track holds two identical halves and scrolls by exactly one half-width
   before wrapping, so the second half is already sitting where the first
   began and the loop is invisible. Spacing uses margin-right (not `gap`) so
   every item occupies the same width and the two halves stay exactly equal.
   The CSS animation below is the no-JS fallback; when main.js takes over it
   adds .is-js and drives the transform itself (needed for the arrows, which
   reverse direction mid-flight — something keyframes can't do smoothly).
   Each row sets its own card width via --marquee-item-width. */
.bv-marquee {
  --marquee-item-width: 260px;
  --marquee-item-gap: 1.5rem;
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0.5rem 0;
}
.bv-marquee-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  animation: bv-marquee-scroll 45s linear infinite;
  will-change: transform;
}
.bv-marquee:hover .bv-marquee-track {
  animation-play-state: paused;
}
.bv-marquee.is-js .bv-marquee-track {
  animation: none;
}
.bv-marquee-item {
  flex: 0 0 var(--marquee-item-width);
  margin-right: var(--marquee-item-gap);
}
@keyframes bv-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Arrows: hold to speed up in that direction, release and it keeps going
   that way. Overlaid on the row's edges, above the cards. */
.bv-marquee-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e5e7ef;
  background: #fff;
  color: var(--bv-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.bv-marquee-nav:hover,
.bv-marquee-nav:active,
.bv-marquee-nav:focus-visible {
  background: var(--bv-primary);
  border-color: var(--bv-primary);
  color: #fff;
}
.bv-marquee-nav-prev { left: 0.75rem; }
.bv-marquee-nav-next { right: 0.75rem; }

@media (max-width: 575.98px) {
  .bv-marquee {
    --marquee-item-width: 200px;
    --marquee-item-gap: 1rem;
  }
  .bv-marquee-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .bv-marquee-nav-prev { left: 0.25rem; }
  .bv-marquee-nav-next { right: 0.25rem; }
}

/* Users who ask for less motion get a still row — the arrows still work, so
   the content stays reachable without anything moving on its own. */
@media (prefers-reduced-motion: reduce) {
  .bv-marquee-track {
    animation: none;
  }
}

/* ---- Testimonial card ---- */
.testimonial-marquee {
  --marquee-item-width: 380px;
}
@media (max-width: 575.98px) {
  .testimonial-marquee {
    --marquee-item-width: 290px;
  }
}
.testimonial-card {
  background: #fff;
  border-radius: var(--bv-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.testimonial-stars {
  color: var(--bv-accent);
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.1em;
}
.testimonial-comment {
  color: #4a4a4a;
  line-height: 1.7;
  margin: 0;
  flex-grow: 1;
}
.testimonial-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-photo,
.testimonial-photo-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.testimonial-photo-fallback {
  background: var(--bv-light-bg);
  color: var(--bv-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.testimonial-name {
  font-weight: 600;
  color: var(--bv-secondary);
  margin: 0;
  line-height: 1.3;
}
.testimonial-role {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.3;
}

/* ---- Floating WhatsApp button ---- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1050;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover {
  color: #fff;
  transform: scale(1.08);
}

/* ---- Product short description (admin can add bold/italic/lists) ---- */
.product-short-desc ul,
.product-short-desc ol,
.product-rich-text ul,
.product-rich-text ol {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ---- Product gallery ---- */
.main-product-img-wrap {
  position: relative;
}
.main-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: zoom-in;
}
.zoom-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(31, 42, 68, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.4rem;
  cursor: pointer;
  border: 2px solid transparent;
}
.gallery-thumb:hover {
  border-color: var(--bv-primary);
}
.gallery-thumb.active {
  border-color: var(--bv-primary);
}

/* ---- Image lightbox (full-screen) ---- */
#imageLightbox .modal-content {
  height: 100vh;
}
#imageLightbox .modal-body {
  height: 100%;
  touch-action: none;
}
.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 6;
}
.lightbox-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-tool-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-zoom-level {
  color: #fff;
  font-size: 0.85rem;
  min-width: 3.2rem;
  text-align: center;
  user-select: none;
}
.lightbox-img-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}
/* Solid white so the arrows stay visible over light-coloured photos — the
   old translucent white washed out completely against pale images. */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--bv-secondary);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  opacity: 0.95;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: var(--bv-primary);
  color: #fff;
  opacity: 1;
}
.lightbox-prev {
  left: 0.75rem;
}
.lightbox-next {
  right: 0.75rem;
}

@media (max-width: 575.98px) {
  .lightbox-zoom-level {
    display: none;
  }
}

.breadcrumb {
  --bs-breadcrumb-divider: '/';
}

/* ---- Share buttons (product/page) ---- */
.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bv-light-bg);
  color: var(--bv-secondary);
  margin-right: 0.4rem;
}
.share-buttons a:hover {
  background: var(--bv-primary);
  color: #fff;
}

/* ---- Product "As seen on" social links ---- */
.product-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bv-light-bg);
  color: var(--bv-secondary);
  font-size: 1.1rem;
  border: 1px solid #e5e7ef;
}
.product-social-link:hover {
  background: var(--bv-secondary);
  color: #fff;
}

/* ---- Footer ---- */
.site-footer {
  background-color: var(--bv-footer);
  color: var(--bv-footer-text);
}
/* Everything in the footer derives from --bv-footer-text, so the footer
   stays readable whether the chosen background is dark or light. */
.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bv-footer-text);
  margin-bottom: 1rem;
}
.site-footer a {
  color: var(--bv-footer-text);
  opacity: 0.85;
}
.site-footer a:hover {
  color: var(--bv-footer-text);
  opacity: 1;
}
/* Bootstrap's white-50 utility is invisible on a light footer. */
.site-footer .text-white-50 {
  color: var(--bv-footer-text) !important;
  opacity: 0.75;
}
.site-footer hr {
  border-color: var(--bv-footer-text) !important;
  opacity: 0.25;
}
.footer-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.22);
  opacity: 1;
}
.footer-social a:hover {
  background: var(--bv-primary);
}

/* ---- Responsive tweaks ---- */
@media (max-width: 767.98px) {
  .section {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* ---- Floating prev/next product navigation (product page) ----
   Plain anchors pinned to the viewport edges, vertically centred so they
   never collide with the WhatsApp bubble in the bottom-right corner.
   The neighbour's name slides open on hover/focus on pointer devices; on
   touch screens it stays icon-only to keep the tap target clear of content. */
.product-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: calc(100% - 5rem);
  padding: 0.65rem 0.5rem;
  background: #fff;
  color: var(--bv-secondary);
  border: 1px solid #e5e7ef;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.product-nav-prev {
  left: 0;
  border-left: 0;
  border-radius: 0 2rem 2rem 0;
}
.product-nav-next {
  right: 0;
  border-right: 0;
  border-radius: 2rem 0 0 2rem;
}
.product-nav-btn:hover,
.product-nav-btn:focus-visible {
  background: var(--bv-primary);
  border-color: var(--bv-primary);
  color: #fff;
}

/* Name label: collapsed by default, expands on hover/focus. */
.product-nav-label {
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: max-width 0.25s ease;
}
@media (hover: hover) and (min-width: 768px) {
  .product-nav-btn:hover .product-nav-label,
  .product-nav-btn:focus-visible .product-nav-label {
    max-width: 190px;
  }
}
/* Touch screens: icon only, slightly smaller, semi-transparent so it never
   hides the product image underneath. */
@media (hover: none), (max-width: 767.98px) {
  .product-nav-btn {
    font-size: 1.15rem;
    padding: 0.5rem 0.35rem;
    opacity: 0.9;
  }
  .product-nav-label {
    max-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .product-nav-label {
    transition: none;
  }
}

/* ---- Gallery slideshow play/pause (product page) ----
   Sits bottom-left, opposite the zoom hint. Needs pointer-events (unlike the
   hint) because it is a real control, and must sit above the image so its
   click is not read as "open the lightbox". */
.gallery-play-toggle {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(31, 42, 68, 0.65);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.gallery-play-toggle:hover,
.gallery-play-toggle:focus-visible {
  background: var(--bv-primary);
}

/* ---- QR share modal ----
   The modal previews the finished poster canvas (1080x1920) rather than a
   bare QR, so what you see is exactly what downloads. Capped by viewport
   height so the whole portrait layout stays visible without scrolling. */
.qr-poster-wrap {
  min-height: 200px;
}
.qr-poster-preview {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  border: 1px solid #e5e7ef;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ---- Product card price + CTA on small screens ----
   Two columns on a phone leaves the card narrow, so "Rs. 1,250.00" and the
   button were competing for the same row and the price wrapped. Smaller
   price text plus a shorter button label ("View") keeps them on one line. */
@media (max-width: 575.98px) {
  .card-price {
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .card-cta {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* ---- Category dropdown (mobile replacement for the pill row) ----
   Styled to echo the pills it stands in for: rounded, brand-coloured border,
   same weight and size, with a themed chevron. */
.category-select {
  border: 2px solid var(--bv-btn);
  border-radius: 2rem;
  padding: 0.6rem 2.75rem 0.6rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bv-secondary);
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  appearance: none;
  -webkit-appearance: none;
  /* Chevron drawn inline so it needs no extra request and no fixed colour. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231f2a44'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 14px 14px;
}
.category-select:focus {
  border-color: var(--bv-btn);
  box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.08);
  outline: none;
}

/* ---- Filter bar (home + category listings) ----
   One panel holding sort, price and the action buttons. Controls stack on a
   phone and sit inline from large screens up; the buttons stretch full width
   on mobile so they are easy to tap, then shrink to their content on desktop. */
.filter-bar {
  background: var(--bv-light-bg);
  border: 1px solid #e7e9f2;
  border-radius: var(--bv-radius);
  padding: 1rem;
}
.filter-bar .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bv-secondary);
  margin-bottom: 0.35rem;
}
.filter-bar .form-select,
.filter-bar .form-control {
  border: 1px solid #dfe2ee;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  background-color: #fff;
}
.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
  border-color: var(--bv-btn);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.06);
}
/* Hide the number spinners — they cramp an already narrow field on mobile. */
.filter-bar input[type="number"]::-webkit-outer-spin-button,
.filter-bar input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.filter-bar input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}
.filter-actions .btn {
  flex: 1 1 auto;          /* full width side by side on mobile */
  border-radius: 0.5rem;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (min-width: 992px) {
  .filter-actions .btn {
    flex: 0 0 auto;        /* size to content once inline */
  }
}

/* ---- Mobile header on a single line ----
   The brand (logo + company name) was wide enough to fill the row on its own,
   pushing the search and menu buttons onto a second line. Letting the brand
   shrink (flex-shrink needs min-width:0 to work) and trimming the logo and
   type keeps everything on one row; the collapsing nav still drops below,
   because Bootstrap gives .navbar-collapse flex-basis:100%. */
@media (max-width: 991.98px) {
  .site-header .navbar-brand {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0.5rem;
    gap: 0.5rem !important;
  }
  .site-header .navbar-brand img {
    height: 34px;
    width: auto;
    flex-shrink: 0;
  }
  .site-header .brand-name {
    font-size: 0.98rem;
    line-height: 1.15;
    /* Wrap inside the brand instead of pushing the buttons down. */
    overflow-wrap: anywhere;
  }
  /* Never let the controls be squeezed or wrapped. */
  .site-header .navbar > .container > .d-flex {
    flex-shrink: 0;
  }
  .site-header .navbar-toggler {
    padding: 0.3rem 0.55rem;
    font-size: 1rem;
  }
}

/* Very small phones: tighten further so it still fits at 320px. */
@media (max-width: 400px) {
  .site-header .navbar > .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .site-header .navbar-brand img {
    height: 30px;
  }
  .site-header .brand-name {
    font-size: 0.88rem;
  }
  .nav-search-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* ---- Compact filter area on phones ----
   The controls are the same, just tighter: smaller labels, shorter fields and
   less padding, so the product grid starts higher up the screen. Desktop keeps
   the roomier spacing defined above. */
@media (max-width: 767.98px) {
  .site-header + main .section,
  main > .section:first-child {
    padding-top: 1.25rem;
  }
  .breadcrumb {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
  }

  .category-select-wrap .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
  }
  .category-select {
    padding: 0.4rem 2.25rem 0.4rem 1rem;
    font-size: 0.95rem;
    background-position: right 0.9rem center;
  }

  .filter-bar {
    padding: 0.7rem;
    margin-bottom: 1rem !important;
  }
  .filter-bar .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.15rem;
  }
  .filter-bar .form-select,
  .filter-bar .form-control {
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
  }
  .filter-actions {
    margin-top: 0.15rem;
  }
  .filter-actions .btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
  }
}

/* ---- Auto-applying filters on phones ----
   When JS has wired the price fields to submit on blur, the Apply button is
   redundant on mobile, so it is hidden — but only once .auto-filter-on is
   present, so it stays visible if JS never runs. Clear then takes the row. */
@media (max-width: 767.98px) {
  .auto-filter-on .filter-apply {
    display: none;
  }
  /* Marked by JS when Apply is the only control in the row. */
  .auto-filter-on .filter-actions-apply-only {
    display: none;
  }
}

/* ---- Get a Quote form ---- */
.quote-card {
  background: #fff;
  border: 1px solid #e7e9f2;
  border-radius: var(--bv-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 1.75rem;
}
.quote-card .form-label {
  font-weight: 600;
  color: var(--bv-secondary);
  margin-bottom: 0.35rem;
}
.quote-card .form-control,
.quote-card .form-select {
  border: 1px solid #dfe2ee;
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
}
.quote-card .form-control:focus,
.quote-card .form-select:focus {
  border-color: var(--bv-btn);
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.06);
}
.quote-card .form-text {
  font-size: 0.8rem;
}
/* Required marker, kept distinct from the theme colour so it reads as a
   warning rather than decoration. */
.quote-card .req {
  color: #dc3545;
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .quote-card {
    padding: 1.1rem;
  }
}

/* ---- Spam honeypot ----
   Hidden from people but present in the DOM for bots to fill. Deliberately
   not display:none — some bots skip those; this is off-screen instead. */
.spam-trap {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
