/* css/style.css */

:root {
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #212529;
  --color-primary: #0d6efd;
  /* bootstrap primary default */
  --color-primary-rgb: 13, 110, 253;
  --color-accent: #dc3545;
  --border-color: #e9ecef;
  /* Add missing border color variable */
  /* Navbar/Footer theme variables */
  --navbar-bg: var(--color-primary);
  --navbar-text: #ffffff;
  --footer-bg: #111827;
  --footer-text: #e5e7eb;
}

/* Ensure payment option toggles are visible in Settings > Payments */
[data-section="payments"] .form-check-input {
  flex-shrink: 0;
  width: 3em;
  height: 1.5em;
  cursor: pointer;
  background-color: #dee2e6;
  border-color: #dee2e6;
}
[data-section="payments"] .form-check-input:checked {
  background-color: var(--color-primary, #0d6efd);
  border-color: var(--color-primary, #0d6efd);
}

/* Disable hover effects in Analytics view */
#analytics-view .card {
  transition: none !important;
}

#analytics-view .card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Theme palettes (will be toggled via JS by setting CSS variables) */
/* default (blue) is defined above */
/* emerald */
[data-theme="emerald"] {
  --color-primary: #10b981;
  --color-primary-rgb: 16, 185, 129;
  --color-accent: #ef4444;
  --border-color: #d1fae5;
  --navbar-bg: #065f46;
  --navbar-text: #ecfdf5;
  --footer-bg: #064e3b;
  --footer-text: #ecfdf5;
}

/* indigo/orange */
[data-theme="indigo"] {
  --color-primary: #6366f1;
  --color-primary-rgb: 99, 102, 241;
  --color-accent: #f59e0b;
  --border-color: #e0e7ff;
  --navbar-bg: #4338ca;
  --navbar-text: #eef2ff;
  --footer-bg: #312e81;
  --footer-text: #eef2ff;
}

/* dark */
[data-theme="dark"] {
  --color-bg: #0f172a;
  --color-surface: #111827;
  --color-text: #e5e7eb;
  --color-primary: #22d3ee;
  --color-primary-rgb: 34, 211, 238;
  --color-accent: #f43f5e;
  --border-color: #1e293b;
  --navbar-bg: #0b1220;
  --navbar-text: #e5e7eb;
  --footer-bg: #0b1220;
  --footer-text: #9ca3af;
}

/* white */
[data-theme="white"] {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-primary: #ffffff;
  --color-primary-rgb: 255, 255, 255;
  --color-accent: #dc3545;
  --border-color: #e5e7eb;
  --navbar-bg: #ffffff;
  --navbar-text: #111827;
  --footer-bg: #ffffff;
  --footer-text: #111827;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky footer: main content grows so footer stays at bottom */
.site-main {
  flex: 1 0 auto;
}

/* Navbar & Footer adopt theme palette */
/* Prevent flash: give navbar/footer base variables immediate priority */
.navbar {
  background-color: var(--navbar-bg, #0d6efd) !important;
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-text {
  color: var(--navbar-text, #ffffff) !important;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  opacity: 0.9;
}

/* Ensure toggler icon visible regardless of bg */
.navbar .navbar-toggler {
  border-color: var(--navbar-text, #ffffff) !important;
}

.navbar .navbar-toggler-icon {
  background-image: none !important;
  position: relative;
}

.navbar .navbar-toggler-icon::before,
.navbar .navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background-color: var(--navbar-text, #ffffff);
}

.navbar .navbar-toggler-icon::before {
  top: 8px;
  box-shadow: 0 6px 0 0 var(--navbar-text, #ffffff);
}

.navbar .navbar-toggler-icon::after {
  top: 20px;
}

/* Center announcement strip (Jumia/Kilimall style): one line, rotating text, no navbar size change */
.navbar .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.navbar .navbar-collapse {
  flex: 0 0 auto;
}
.navbar-announcement {
  flex: 1 1 auto;
  min-width: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.25;
  min-height: 1.25em;
  overflow: hidden;
  color: var(--navbar-text, #fff) !important;
  padding: 0 0.5rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .navbar-announcement {
    display: flex;
  }
}
.navbar-announcement__text {
  display: inline-block;
  transition: opacity 0.35s ease;
}
.navbar-announcement__text.fade-out {
  opacity: 0;
}

footer {
  background-color: var(--footer-bg, #111827) !important;
  color: var(--footer-text, #e5e7eb) !important;
  flex-shrink: 0;
  margin-top: auto;
}

footer a {
  color: var(--footer-text) !important;
}

/* Buttons follow theme primary */
.btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-outline-primary {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-outline-primary:hover {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
}

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

.card {
  background-color: var(--color-surface);
}

.product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card {
  transition: transform .2s;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Disable hover effects on cart page */
#cart-items .card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Cart item removal animation */
.cart-item-removing {
  opacity: 0.5 !important;
  transform: scale(0.95) !important;
  transition: opacity 300ms ease, transform 300ms ease !important;
}

/* Cart item fade in animation */
.cart-item-adding {
  animation: cartItemFadeIn 0.3s ease;
}

@keyframes cartItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checkout button state transitions */
#checkout-btn {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#checkout-btn.disabled {
  opacity: 0.6;
  transform: scale(0.98);
}

.navbar-brand {
  font-weight: bold;
}

/* Modern e-commerce banner carousel styling */
#banner-carousel-wrapper {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-item img {
  height: 400px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.3s ease;
}

.carousel-item:hover img {
  transform: scale(1.02);
}

/* Responsive banner heights following modern e-commerce standards */
@media (max-width: 1200px) {
  .carousel-item img {
    height: 350px;
  }
}

@media (max-width: 992px) {
  .carousel-item img {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .carousel-item img {
    height: 250px;
  }
}

@media (max-width: 576px) {
  .carousel-item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .carousel-item img {
    height: 180px;
  }
}

/* Enhanced carousel controls */
.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.carousel-control-prev {
  left: 15px;
}

.carousel-control-next {
  right: 15px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

/* Banner caption styling */
.carousel-caption {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  text-align: left;
}

.carousel-caption h5 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
  font-size: 1rem;
  margin-bottom: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Mobile banner caption adjustments */
@media (max-width: 768px) {
  .carousel-caption {
    padding: 1rem 0.5rem 0.5rem;
  }

  .carousel-caption h5 {
    font-size: 1.25rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }
}

/* Banner indicators */
.carousel-indicators {
  bottom: 10px;
  margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  transition: all 0.3s ease;
}

.carousel-indicators .active {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
}

/* Banner loading state */
#banner-carousel-wrapper.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  height: 400px;
  border-radius: 12px;
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Banner accessibility improvements */
.carousel-item:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Banner performance optimizations */
.carousel-item img {
  will-change: transform;
}

/* Banner overlay for better text readability */
.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

.carousel-caption {
  z-index: 2;
  position: relative;
}

/* Banner hover effects for desktop */
@media (min-width: 768px) {
  .carousel-item {
    position: relative;
    overflow: hidden;
  }

  .carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
  }

  .carousel-item:hover::after {
    opacity: 1;
  }
}

/* Floating actions */
.fab {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-whatsapp {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  /* moved to left */
  z-index: 1000 !important;
  animation: pulse 2s infinite;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure WhatsApp button is visible on mobile */
@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: 20px !important;
    left: 20px !important;
    z-index: 1001 !important;
    display: block !important;
    visibility: visible !important;
  }
}

@media (max-width: 480px) {
  .floating-whatsapp {
    bottom: 15px !important;
    left: 15px !important;
    width: 50px !important;
    height: 50px !important;
    z-index: 1001 !important;
    display: block !important;
    visibility: visible !important;
  }
}

/* Debug: Make WhatsApp button very visible */
#whatsapp-button {
  background-color: #25d366 !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
}

.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1002;
  min-width: 60px;
  min-height: 60px;
}

.floating-cart .badge {
  transform: translate(30%, -30%);
}

/* Ensure proper spacing between floating elements */
.floating-cart {
  /* Reserve space to prevent overlap with chat support */
  margin-right: 0;
}

/* Chat support should never overlap cart */
.chat-widget {
  /* Ensure minimum distance from cart */
  right: 100px !important;
}

/* Hide floating cart when chat widget is open to prevent overlap with send button */
body.chat-widget-open .floating-cart {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Mobile responsive spacing */
@media (max-width: 768px) {
  .floating-cart {
    right: 20px;
    bottom: 20px;
  }

  .chat-widget {
    right: 100px !important;
    bottom: 20px !important;
  }
}

@media (max-width: 480px) {
  .floating-cart {
    right: 15px;
    bottom: 15px;
    min-width: 50px;
    min-height: 50px;
  }

  .chat-widget {
    right: 80px !important;
    bottom: 15px !important;
  }
}

/* Cart bounce animation triggered on add-to-cart */
@keyframes cart-bounce-keyframes {

  0%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(0);
  }
}

.cart-bounce {
  animation: cart-bounce-keyframes 0.6s ease;
}

/* Wiggle animation for navbar cart icon */
@keyframes cart-wiggle-keyframes {

  0%,
  100% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-12deg);
  }

  40% {
    transform: rotate(12deg);
  }

  60% {
    transform: rotate(-8deg);
  }

  80% {
    transform: rotate(8deg);
  }
}

.cart-wiggle {
  display: inline-block;
  animation: cart-wiggle-keyframes 0.6s ease;
}

/* Pulse used by whatsapp icon */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Countdown badge attention animation */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0.5);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(var(--color-primary-rgb), 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0);
  }
}

.countdown-badge {
  animation: pulse-glow 1.5s infinite;
  font-size: 0.95rem;
  padding: 0.35rem 0.6rem;
}

@media (min-width: 992px) {
  .countdown-badge {
    font-size: 1.05rem;
  }
}

/* Two-line clamp helper for product descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product card: compact grid, clear hierarchy (best practice: bold name, scannable) */
.product-card .card-title {
  font-size: 0.95rem;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.product-card .card-text {
  font-size: 0.85rem;
  line-height: 1.35;
}

.product-card .product-price {
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 2px;
}

.product-card .product-price .original-price,
.product-card .product-price .discounted-price {
  white-space: nowrap;
}

/* Mobile: compact product cards (less elongated), 2-col grid, square image */
@media (max-width: 576px) {
  .product-card .product-price .discounted-price {
    font-size: 1rem;
  }

  .product-card .product-price .original-price {
    font-size: 0.85rem;
  }

  .product-card .card-body {
    padding: 0.5rem 0.5rem 0.6rem;
  }

  .product-card .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-card .card-text {
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.3;
  }

  .product-card .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .product-image {
    height: 100px;
    object-fit: cover;
  }

  #product-list.row,
  #featured-products.row,
  #flash-sale-products.row,
  #search-results.row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }
}

/* Global price display styles to ensure consistency across pages */
.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.original-price {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.9rem;
}

.discounted-price {
  color: var(--color-accent);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Navbar layout: let Bootstrap handle wrapping; avoid forcing nowrap so the toggler only affects the menu content */
.navbar .navbar-brand {
  flex: 0 0 auto;
}

.navbar .navbar-toggler {
  margin-left: 8px;
}

/* Mobile: menu toggle drops a small floating menu (like desktop dropdown, not attached to navbar) */
@media (max-width: 991.98px) {
  .navbar {
    position: relative;
  }

  .navbar .navbar-collapse {
    position: absolute;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    min-width: 200px;
    max-width: 280px;
    margin-top: 0;
    padding: 0.5rem 0;
    background-color: var(--navbar-bg, #0d6efd);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1020;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .navbar .navbar-collapse.show {
    overflow: visible;
  }

  .navbar .navbar-nav {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .navbar .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }

  .navbar .navbar-nav .nav-link {
    padding: 0.6rem 0.75rem;
  }

  .navbar .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    margin: 0 0 0.25rem 0;
    border: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
  }

  .navbar .navbar-nav .dropdown-menu .dropdown-item,
  .navbar .navbar-nav .dropdown-menu .dropdown-header {
    color: var(--navbar-text, #ffffff);
    padding: 0.5rem 1rem;
  }

  .navbar .navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  .navbar .navbar-nav .dropdown-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* Desktop: make admin sidebar sticky */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}


/* Cart responsive layout and spacing */
.cart-item-actions .btn {
  min-width: 36px;
}

.cart-item-actions .quantity-value {
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

@media (max-width: 576px) {
  .cart-item-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .cart-item-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* Category pill slow float animation */
@keyframes category-float-y {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0);
  }
}

.category-pill {
  display: inline-block;
  animation: category-float-y 8s ease-in-out infinite;
  will-change: transform;
}

#category-links .category-pill:nth-child(3n+1) {
  animation-duration: 9s;
}

#category-links .category-pill:nth-child(3n+2) {
  animation-duration: 10s;
}

#category-links .category-pill:nth-child(3n) {
  animation-duration: 11s;
}

#category-links .category-pill:hover {
  transform: translateY(-6px);
}

/* Brand-colored social icons */
.social-icon {
  font-size: 1.4rem;
  margin: 0 8px;
  transition: opacity 0.2s ease;
}

.social-icon:hover {
  opacity: 0.85;
}

.social-icon.facebook {
  color: #1877f2 !important;
}

.social-icon.twitter {
  color: #1da1f2 !important;
}

.social-icon.instagram {
  color: #e1306c !important;
}

.social-icon.whatsapp {
  color: #25d366 !important;
}

/* Compact footer spacing */
/* Footer layout & best practices: clear sections, readable typography, link hierarchy */
footer .container {
  padding-top: 2rem !important;
  padding-bottom: 1.5rem !important;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

footer .row {
  --bs-gutter-x: 2rem;
}

footer h5.site-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  color: var(--footer-text) !important;
}

footer h6 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

footer #site-tagline,
footer .opacity-75 {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.85;
  max-width: 280px;
}

footer .list-unstyled {
  font-size: 0.9375rem;
  line-height: 1.7;
}

footer .list-unstyled li {
  margin-bottom: 0.35rem;
}

footer .list-unstyled a {
  color: var(--footer-text) !important;
  opacity: 0.9;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

footer .list-unstyled a:hover {
  opacity: 1;
  text-decoration: underline;
}

footer #social-links {
  font-size: 1.25rem;
}

footer #social-links .social-icon {
  margin: 0 0.25rem;
}

/* Email and location same size as other footer text (Company links, tagline) */
footer #social-links > div {
  font-size: 0.9375rem;
  line-height: 1.7;
}

footer .text-center.p-3,
footer [style*="background-color: rgba(255,255,255,0.06)"] {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  font-size: 0.8125rem;
  border-top: 1px solid currentColor;
  opacity: 0.85;
  color: var(--footer-text) !important;
}

/* Footer badges: named sections, best practice (clear labels, payment in full color, trust subtle) */
.footer-badges-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.footer-badges-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.footer-badges {
  min-height: 2.5rem;
}

.footer-badges img {
  opacity: 0.95;
}

/* Payment logos: full color (best practice for recognition) */
.footer-badges img[alt="payment-badge"] {
  filter: none;
}

.footer-badges img[alt="trust-badge"] {
  filter: grayscale(15%);
}

.footer-badges img+img {
  margin-left: 8px;
}

/* Horizontal marquee for categories */
#category-links {
  overflow: hidden;
  position: relative;
}

#category-links.scroll-marquee {
  white-space: nowrap;
}

#category-links.scroll-marquee .category-track {
  display: inline-block;
  transform: translateX(-50%);
  animation: marquee-x 20s linear infinite;
}

@keyframes marquee-x {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

/* Product gallery thumbnails */
#product-detail .img-thumbnail {
  border: 2px solid transparent;
}

#product-detail .img-thumbnail:hover {
  border-color: var(--color-primary);
  opacity: 0.9;
}

#product-detail .img-thumbnail.border-primary {
  border-color: var(--color-primary) !important;
}

/* Footer badges sizing tweaks (ecommerce-standard larger, responsive) */
.footer-badges img[alt="payment-badge"] {
  height: 44px !important;
}

.footer-badges img[alt="trust-badge"] {
  height: 36px !important;
}

@media (max-width: 576px) {
  .footer-badges img[alt="payment-badge"] {
    height: 36px !important;
  }

  .footer-badges img[alt="trust-badge"] {
    height: 32px !important;
  }
}

/* Flash sale headline should always be red */
#flash-sale-section>h3 {
  color: #dc3545 !important;
}

/* Storefront page content: About, Help, FAQs, Returns, Shipping, Payments – readable typography and layout */
.page-content-prose,
#page-content.page-content-prose {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  color: var(--color-text);
}

/* Main page title on static content pages */
.page-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-primary);
}

.page-content-prose h2,
.page-content-prose h3,
.page-content-prose h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.page-content-prose h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.page-content-prose h3 {
  font-size: 1.25rem;
  color: var(--color-accent);
}

.page-content-prose h4 {
  font-size: 1.1rem;
  color: #6c757d;
}

/* Treat first paragraph after a heading as a subheading */
.page-content-prose h2 + p,
.page-content-prose h3 + p,
.page-content-prose h4 + p {
  text-align: center;
  font-size: 0.95rem;
  color: #6c757d;
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.page-content-prose p {
  margin-bottom: 1rem;
}

.page-content-prose ul,
.page-content-prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content-prose li {
  margin-bottom: 0.35rem;
}

.page-content-prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

.page-content-prose a:hover {
  opacity: 0.9;
}

.page-content-prose hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-color, #dee2e6);
}

.page-content-prose > *:first-child {
  margin-top: 0;
}