/* Contact section styles */
#contact .contact-chip {
  border-radius: 999px;
  padding: 6px 12px;
}

/* Footer styles */
.site-footer .footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus {
  color: #fff;
  text-decoration: underline;
}
.site-footer .footer-social {
  border-color: rgba(255,255,255,0.5);
}
.site-footer .footer-social:hover,
.site-footer .footer-social:focus {
  background: rgba(255,255,255,0.15);
}
.site-footer .footer-newsletter .form-control {
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.site-footer .footer-newsletter .form-control::placeholder {
  color: rgba(255,255,255,0.75);
}
.site-footer .footer-newsletter .form-control:focus {
  outline: 2px solid rgba(212,175,55,0.9);
  outline-offset: 2px;
}
.site-footer .footer-legal a:hover { text-decoration: underline; }

/* Footer payment badges */
.site-footer .footer-payments .payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  user-select: none;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,0.25);
  color: #0A2342;
  background: #fff;
}
.site-footer .payment-badge.secure { color: #fff; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); font-weight: 600; }
.site-footer .payment-badge.visa { background: #1A1F71; color: #fff; border-color: #1A1F71; }
.site-footer .payment-badge.mastercard { background: #EB001B; color: #fff; border-color: #EB001B; }
.site-footer .payment-badge.mastercard::after { content: "\00A0\2022\00A0"; font-weight: 900; opacity: 0.85; }
.site-footer .payment-badge.mpesa { background: #34B233; color: #0A2342; border-color: #2FA82F; }
.site-footer .payment-badge.paypal { background: #003087; color: #fff; border-color: #003087; }
/* Size and recolor CDN simple-icons inside badges */
.site-footer .footer-payments .badge-logo {
  width: 40px;
  height: 16px;
  display: block;
}
.site-footer .payment-badge.visa .badge-logo,
.site-footer .payment-badge.mastercard .badge-logo,
.site-footer .payment-badge.mpesa .badge-logo,
.site-footer .payment-badge.paypal .badge-logo {
  filter: brightness(0) invert(1);
}
#contact .card { border: 1px solid rgba(0,0,0,0.05); }
#contact .card-body { padding: 1.25rem 1.25rem; }

#contact #contact-status[role="alert"],
#contact #contact-status.alert {
  margin-top: 0.5rem;
}
/* =========================================
   style.css (Custom Styling)
   ========================================= */

:root {
  --primary-navy: #0A2342;
  --secondary-burgundy: #800020;
  --secondary-olive: #556B2F;
  --neutral-charcoal: #2F2F2F;
  --accent-gold: #D4AF37;
  --progress-bar-height: 4px;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: var(--neutral-charcoal);
}

.bg-primary-navy { background-color: var(--primary-navy) !important; }
.bg-neutral-charcoal { background-color: var(--neutral-charcoal) !important; }
.text-gold { color: var(--accent-gold) !important; }
.border-accent-gold { border: 2px solid var(--accent-gold); }

.btn-gold {
  background-color: var(--accent-gold);
  border: none;
  color: var(--primary-navy);
}
.btn-gold:hover {
  background-color: #b08d2d;
  color: #fff;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  /* Add a bit of room for mobile safe area at the bottom */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
}

/* Ensure no clipping at the very edges of the header */
.hero-section { overflow: visible; }

/* Use small viewport units when supported to avoid browser UI cutting content */
@supports (height: 100svh) {
  .hero-section { min-height: 100svh; }
  .hero-carousel,
  .hero-carousel .carousel-inner,
  .hero-carousel .carousel-item,
  .hero-carousel .carousel-item img {
    height: 100svh;
  }

  /* Ensure positioned children (like slide labels) are not clipped */
  .hero-carousel .carousel-inner,
  .hero-carousel .carousel-item {
    overflow: visible;
  }
}

.hero-carousel,

.hero-carousel .carousel-inner,
.hero-carousel .carousel-item,
.hero-carousel .carousel-item img {
  height: 100vh;
}

/* Never clip absolutely positioned children like labels inside carousel wrappers */
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item { overflow: visible; }

.hero-carousel .carousel-item img {
  object-fit: cover;
  object-position: center;
  filter: none;
}

.hero-carousel .carousel-item {
  position: relative;
}
.hero-carousel .slide-label {
  position: absolute;
  /* Keep label away from edges and above progress bar and safe area */
  left: calc(clamp(16px, 2.5vw, 28px) + env(safe-area-inset-left, 0px));
  bottom: calc(clamp(28px, 6vh, 72px) + var(--progress-bar-height) + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.2px;
  z-index: 6; /* Above image, progress bar and indicators */
  display: inline-block;
  max-width: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  pointer-events: auto;
  line-height: 1.2;
}

@media (max-width: 576px) {
  .hero-carousel .slide-label {
    bottom: calc(clamp(36px, 7vh, 80px) + var(--progress-bar-height) + env(safe-area-inset-bottom, 0px));
    left: calc(clamp(12px, 4vw, 20px) + env(safe-area-inset-left, 0px));
    font-size: 0.9rem;
    padding: 6px 12px;
  }
}

/* Very short viewports: push labels higher to avoid OS chrome overlap */
@media (max-height: 680px) {
  .hero-carousel .slide-label {
    bottom: calc(72px + var(--progress-bar-height) + env(safe-area-inset-bottom, 0px));
  }
}

/* Focus styles that don't extend beyond the label's box */
.hero-carousel .slide-label:focus {
  outline: 2px solid rgba(212,175,55,0.9);
  outline-offset: 2px;
}

/* Allow wrapping on more narrow phones to avoid horizontal cutoff */
@media (max-width: 420px) {
  .hero-carousel .slide-label {
    white-space: normal;
    line-height: 1.2;
  }
}

/* Very small screens: allow wrap to avoid clipping */
@media (max-width: 360px) {
  .hero-carousel .slide-label {
    white-space: normal;
    line-height: 1.2;
  }
}

/* Allow absolutely positioned elements to render past image bounds if needed */
.hero-carousel { 
  overflow: visible; 
  /* Provide internal breathing room at the bottom for labels and indicators */
  padding-bottom: calc(var(--progress-bar-height) + 24px + env(safe-area-inset-bottom, 0px));
}

/* Promo ribbon */
.promo-ribbon {
  background: var(--primary-navy);
  padding: 6px 12px;
}

/* Value props */
.value-props .bi { color: var(--accent-gold); }

/* Hero search */
.hero-search { max-width: 560px; }

/* Overlay fade on scroll */
#heroOverlay { transition: opacity 200ms ease; }
.overlay-faded { opacity: 0.95; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

/* Carousel progress bar */
.carousel-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--progress-bar-height);
  background: rgba(255,255,255,0.25);
  z-index: 4;
}
.carousel-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gold);
  transition: width linear;
}

/* Carousel indicators styling */
.hero-carousel .carousel-indicators {
  bottom: calc(8px + var(--progress-bar-height) + env(safe-area-inset-bottom, 0px));
  z-index: 3;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.6);
  border: 2px solid rgba(255,255,255,0.9);
  margin: 0 6px;
}
.hero-carousel .carousel-indicators .active {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.hero-section h1 {
  text-shadow: 0 3px 14px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.3);
}

/* Hero overlay content fit improvements */
.hero-overlay .container {
  max-width: 960px;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (max-width: 576px) {
  .hero-section .display-4 { font-size: 1.8rem; }
  .hero-section .lead { font-size: 1rem; }
}

/* Highlight Banners */
.card-title {
  color: var(--primary-navy);
}

/* About section */
#about .about-values .about-value i { font-size: 1.1rem; }
#about .about-values .about-value .fw-semibold { color: var(--primary-navy); }
#about .about-values .about-value { padding: 8px 0; }

#about .about-stats .about-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10,35,66,0.06);
  color: var(--primary-navy);
}
#about .about-stats .about-stat strong { font-size: 0.95rem; }
#about .about-stats .about-stat span { font-size: 0.8rem; opacity: 0.85; }

#about .about-visual img { border-radius: 8px; }
#about .about-promise i { font-size: 1.1rem; }

@media (max-width: 991.98px) {
  #about .about-visual img { max-height: 300px; }
}

/* Navbar brand logo */
.brand-logo {
  height: 44px;
  width: auto;
  display: inline-block;
}

.navbar.bg-transparent {
  background-color: transparent !important;
  backdrop-filter: saturate(120%) blur(2px);
}

.navbar.navbar-scrolled {
  background-color: rgba(10, 35, 66, 0.9) !important;
  transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Animated nav underline */
.navbar .navbar-nav {
  --underline-height: 2px;
}
.navbar .navbar-nav .nav-underline {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: var(--underline-height);
  width: 0;
  background: var(--accent-gold);
  border-radius: 2px;
  transform: translateX(0);
  transition: transform 200ms ease, width 200ms ease, opacity 150ms ease;
  opacity: 1;
}
.navbar .navbar-nav .nav-underline.hidden { opacity: 0; }
.navbar .navbar-nav .nav-link.active {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Subtle nav link color transitions */
.navbar .navbar-nav .nav-link {
  transition: color 150ms ease, opacity 150ms ease;
  opacity: 0.95;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
  color: var(--accent-gold) !important;
  opacity: 1;
}
.navbar .navbar-nav .nav-link.active { color: #fff !important; }

/* Brand highlight when at top */
.navbar .navbar-brand.brand-highlight {
  filter: drop-shadow(0 0 10px rgba(212,175,55,0.45));
  transform: translateZ(0); /* avoid blurriness */
}

/* Cart count badge */
.cart-count-badge {
  position: absolute;
  top: 2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-gold);
  color: #0A2342;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

/* Featured products */
#featured .card-img-top {
  height: 180px;
  object-fit: cover;
}

/* Offcanvas cart item styles */
#cart-items .list-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
#cart-items img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}
#cart-items .qty-controls button {
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
}

/* Checkout page */
.bg-primary-navy { background-color: var(--primary-navy) !important; }
.checkout .card-header { font-weight: 600; }

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1040; /* above most content */
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(10,35,66,0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  transform: translateY(8px);
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: rgba(10,35,66,0.95); }

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  z-index: 1100;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.skip-link:focus { left: 12px; top: 12px; outline: 2px solid var(--accent-gold); }

/* Focus-visible outlines for keyboard users */
.navbar .nav-link:focus-visible,
.btn:focus-visible,
.btn:focus { outline: 2px solid rgba(212,175,55,0.9); outline-offset: 2px; }

/* Sticky Shop CTA (appears near navbar on scroll) */
.sticky-shop-cta {
  position: fixed;
  top: var(--nav-offset, 72px);
  right: auto;
  left: 16px;
  z-index: 1020; /* below fixed navbar (1030) to avoid overlapping cart */
  background: var(--accent-gold);
  color: var(--primary-navy);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background-color 150ms ease;
}
.sticky-shop-cta.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sticky-shop-cta:hover { background: #b08d2d; color: #fff; }

/* On small screens, dock the sticky Shop CTA to bottom-left to avoid cart/back-to-top */
@media (max-width: 991.98px) {
  .sticky-shop-cta {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: auto;
    z-index: 1040; /* visible above content, away from navbar */
  }
}

/* Testimonials */
#testimonials {
  position: relative;
  /* very light gradient to add depth */
  background: linear-gradient(180deg, rgba(212,175,55,0.03), rgba(10,35,66,0.02));
}
#testimonials::before {
  content: "\201C"; /* opening quote */
  position: absolute;
  top: -8px;
  left: 8px;
  font-size: clamp(120px, 18vw, 260px);
  line-height: 1;
  color: rgba(10,35,66,0.06);
  font-family: Georgia, 'Times New Roman', serif;
  pointer-events: none;
  z-index: 0;
}
#testimonials .container { position: relative; z-index: 1; }
#testimonials .testimonial-card {
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  z-index: 1;
}
#testimonials .testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f3f3f3;
}
#testimonials .testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#testimonials .testimonial-avatar.initials {
  background: var(--primary-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}
#testimonials .testimonial-avatar.initials span {
  font-size: 0.95rem;
  line-height: 1;
}
#testimonials .testimonial-stars .bi {
  color: var(--accent-gold);
  margin-right: 2px;
  font-size: 0.95rem;
}
#testimonials .testimonial-quote {
  position: relative;
}
#testimonials .testimonial-quote::before {
  content: "\201C";
  position: absolute;
  left: -12px;
  top: -6px;
  color: rgba(0,0,0,0.15);
  font-size: 2rem;
  line-height: 1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .carousel-progress-bar { transition: none; }
  .navbar .navbar-nav .nav-underline { transition: none; }
  .navbar .navbar-nav .nav-link { transition: none; }
  .back-to-top, .sticky-shop-cta { transition: none; }
}