/* ============================================================
   DOMIZILIX — Design Tokens & Global Styles
   ============================================================ */
:root {
  --primary-color: #1E3A5F;
  --primary-dark:  #152d4a;
  --primary-light: #2a5080;
  --secondary-color: #F97316;
  --secondary-dark: #ea6500;
  --background-color: #F8FAFC;
  --surface-color: #ffffff;
  --text-color: #111827;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  --success-color: #22C55E;
  --warning-color: #F59E0B;
  --danger-color: #EF4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.14);
  --transition: .2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--secondary-color); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   BOOTSTRAP OVERRIDES
   ============================================================ */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}
.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #fff;
}
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background-color: var(--primary-color);
  color: #fff;
  font-size: .8rem;
  padding: .4rem 0;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--secondary-color); }
.topbar__sep { margin: 0 .75rem; opacity: .4; }

/* ============================================================
   HEADER WRAPPER — fixed, hide on scroll-down / reveal on scroll-up
   ============================================================ */
.site-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  transition: transform .3s ease;
}

.site-header-wrapper.header--hidden {
  transform: translateY(-100%);
}

/* ============================================================
   MAIN HEADER
   ============================================================ */
.site-header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
}

.site-header__logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -.5px;
}
.site-header__logo span { color: var(--secondary-color); }

/* Search */
.search-form { position: relative; flex: 1; max-width: 560px; }
.search-form select {
  border-right: 1px solid var(--border-color);
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--background-color);
  font-size: .85rem;
  color: var(--text-muted);
  min-width: 130px;
}
.search-form input {
  border-left: none;
  border-right: none;
  font-size: .9rem;
}
.search-form input:focus { box-shadow: none; border-color: var(--border-color); }
.search-form .btn-search {
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
  padding: 0 1.1rem;
}
.search-form .btn-search:hover { background-color: var(--secondary-dark); border-color: var(--secondary-dark); }

/* Header icons */
.header-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .72rem;
  color: var(--text-muted);
  gap: 2px;
  cursor: pointer;
  transition: color var(--transition);
}
.header-icon:hover { color: var(--secondary-color); }
.header-icon .badge {
  font-size: .6rem;
  top: -4px;
  right: -6px;
}

/* ============================================================
   CATEGORY NAV
   ============================================================ */
.category-nav {
  background-color: var(--primary-color);
  padding: 0;
}
.category-nav .nav-link {
  color: rgba(255,255,255,.88);
  font-size: .875rem;
  font-weight: 500;
  padding: .65rem 1rem;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.category-nav .nav-link:hover,
.category-nav .nav-link.active {
  background-color: rgba(255,255,255,.12);
  color: #fff;
}

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-slide {
  height: clamp(320px, 50vh, 560px);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,20,45,.88) 0%,
    rgba(10,20,45,.55) 50%,
    rgba(10,20,45,.12) 100%
  );
}

.hero-slide__content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  color: #fff;
  padding: 2rem 0;
}

.hero-slide__badge {
  display: inline-block;
  background: var(--secondary-color);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .85rem;
  border-radius: 20px;
  margin-bottom: .9rem;
}

.hero-slide__title {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .75rem;
}

.hero-slide__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-slide__btn-cart {
  background: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.hero-slide__btn-cart:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

.hero-slide__btn-more {
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(255,255,255,.65);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.hero-slide__btn-more:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
}

/* Indicators — round dots */
.hero-carousel .carousel-indicators {
  margin-bottom: 1.25rem;
  gap: .35rem;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border-top: none;
  border-bottom: none;
  background-color: rgba(255,255,255,.5);
  transition: background-color var(--transition), transform var(--transition);
}
.hero-carousel .carousel-indicators .active {
  background-color: var(--secondary-color);
  transform: scale(1.35);
}

/* Narrow the arrow hit-area */
.carousel-control-prev,
.carousel-control-next { width: 52px; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0;
}
.section-title__line {
  display: inline-block;
  width: 48px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
  margin-top: .35rem;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem .5rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--secondary-color);
}
.category-card__icon {
  width: 56px;
  height: 56px;
  background: var(--background-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.6rem;
  transition: background var(--transition);
}
.category-card:hover .category-card__icon { background: #fff3e8; }
.category-card__name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: .2rem;
}
.category-card__count {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ============================================================
   TRUST BADGES
   ============================================================ */
.trust-strip {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.trust-item__icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.trust-item__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: .1rem;
}
.trust-item__sub {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.product-card__img {
  aspect-ratio: 1 / 1;
  background: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}
.product-card__badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: var(--danger-color);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 20px;
}
.product-card__badge--new { background: var(--success-color); }
.product-card__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-card__name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: .4rem;
  line-height: 1.4;
}
.product-card__stars {
  color: var(--warning-color);
  font-size: .8rem;
  margin-bottom: .5rem;
}
.product-card__stars span { color: var(--text-muted); font-size: .75rem; margin-left: .25rem; }
.product-card__price { margin-top: auto; }
.product-card__price-current {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-color);
}
.product-card__price-old {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: .4rem;
}
/* Product card anchor — makes image + body area a block link */
.product-card__anchor {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.product-card__anchor:hover .product-card__name { color: var(--secondary-color); }
.product-card__anchor:hover { color: inherit; }

.product-card__footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border-color);
}
.btn-cart {
  width: 100%;
  background-color: var(--primary-color);
  border: none;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.btn-cart:hover { background-color: var(--secondary-color); color: #fff; }
.btn-cart--out-of-stock {
  background-color: var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ============================================================
   PROMO BANNER
   ============================================================ */
.promo-banner {
  background: linear-gradient(90deg, var(--secondary-color) 0%, #fb923c 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.promo-banner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: .5rem;
}
.promo-banner p { opacity: .9; margin-bottom: 1.5rem; font-size: 1rem; }
.promo-banner .btn {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  font-weight: 700;
  padding: .7rem 2rem;
  border-radius: 30px;
  font-size: .95rem;
}
.promo-banner .btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background: var(--primary-color);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.newsletter h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.newsletter p { opacity: .8; margin-bottom: 1.75rem; font-size: .95rem; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto 1rem;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.newsletter-form input {
  flex: 1;
  border: none;
  padding: .75rem 1.1rem;
  font-size: .9rem;
  outline: none;
}
.newsletter-form button {
  background: var(--secondary-color);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: .75rem 1.4rem;
  font-size: .9rem;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--secondary-dark); }
.newsletter__rgpd { font-size: .75rem; opacity: .55; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f2238;
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 0;
}
.site-footer h5 {
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer ul li a {
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  transition: color var(--transition);
}
.site-footer ul li a:hover { color: var(--secondary-color); }

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
}
.footer-logo span { color: var(--secondary-color); }
.footer-about { font-size: .875rem; line-height: 1.7; }

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 2.5rem;
  padding: 1.1rem 0;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}
.footer-social a {
  color: rgba(255,255,255,.5);
  margin-left: .75rem;
  font-size: 1rem;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--secondary-color); }

/* ============================================================
   MOBILE BOTTOM TABS
   ============================================================ */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  z-index: 1030;
}

.bottom-tabs__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .62rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
  line-height: 1;
}

.bottom-tabs__item i {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-tabs__item.active,
.bottom-tabs__item:hover {
  color: var(--primary-color);
}

/* ============================================================
   MOBILE FULLSCREEN MODALS
   ============================================================ */
.mobile-modal {
  position: fixed;
  inset: 0;
  background: var(--surface-color);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.mobile-modal.is-open {
  transform: translateY(0);
}

.mobile-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--surface-color);
}

.mobile-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.mobile-modal__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: .3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}

.mobile-modal__close:hover {
  background: var(--background-color);
  color: var(--text-color);
}

.mobile-modal__body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.mobile-modal__cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem .25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.mobile-modal__cat-link:hover {
  color: var(--secondary-color);
}

.mobile-modal__cat-link i {
  font-size: .85rem;
  color: var(--text-muted);
}

.mobile-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.mobile-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.modal-open-mobile { overflow: hidden; }

/* ============================================================
   UTILITIES
   ============================================================ */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }

@media (max-width: 767px) {
  body { padding-bottom: 62px; }
  .hero-slide__overlay {
    background: rgba(10,20,45,.72);
  }
  .hero-slide__btn-cart { font-size: .82rem; padding: .55rem 1rem; }
  .hero-slide__btn-more { display: none; }
  .trust-item { flex-direction: column; text-align: center; }
}

/* ============================================================
   PRODUCT PAGE
   ============================================================ */

/* Breadcrumb */
.product-breadcrumb {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: .7rem 0;
  font-size: .82rem;
}
.product-breadcrumb .breadcrumb-item a { color: var(--text-muted); }
.product-breadcrumb .breadcrumb-item a:hover { color: var(--secondary-color); }
.product-breadcrumb .breadcrumb-item.active { color: var(--text-color); font-weight: 500; }
.product-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */

/* Header */
.category-header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0 1.75rem;
}
.category-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.category-header__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-color);
  margin: 0 0 .4rem;
}
.category-header__desc {
  color: var(--text-muted);
  font-size: .9rem;
  margin: 0;
  max-width: 60ch;
}
.category-header__count {
  background: var(--primary-color);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .3rem .85rem;
  border-radius: 20px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

/* Catalog section */
.catalog-section { padding: 2rem 0 4rem; }

/* Toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.catalog-toolbar__results {
  margin: 0;
  font-size: .875rem;
  color: var(--text-muted);
}
.catalog-toolbar__results strong { color: var(--text-color); }
.catalog-toolbar__sort {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.catalog-toolbar__sort-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin: 0;
}
.catalog-toolbar__sort-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: .35rem .65rem;
  font-size: .82rem;
  color: var(--text-color);
  background: var(--background-color);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.catalog-toolbar__sort-select:focus { border-color: var(--primary-color); }

/* Pagination */
.catalog-pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}
.catalog-pagination .pagination { gap: .25rem; }
.catalog-pagination .page-link {
  border-radius: var(--radius) !important;
  color: var(--primary-color);
  border-color: var(--border-color);
  font-size: .875rem;
  padding: .45rem .75rem;
}
.catalog-pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.catalog-pagination .page-link:hover { background: var(--primary-color); color: #fff; }

/* Empty state */
.catalog-empty {
  text-align: center;
  padding: 5rem 1rem;
}
.catalog-empty__icon {
  font-size: 3.5rem;
  color: var(--border-color);
  display: block;
  margin-bottom: 1.25rem;
}
.catalog-empty__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: .5rem;
}
.catalog-empty__text {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Main layout */
.product-main { padding: 2.5rem 0 3rem; }

/* ── Gallery ── */
.product-gallery__main {
  position: relative;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
}
.product-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .15s ease;
}
.product-gallery__thumbs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .35rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
.product-gallery__thumbs::-webkit-scrollbar { height: 4px; }
.product-gallery__thumbs::-webkit-scrollbar-track { background: transparent; }
.product-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--background-color);
  padding: 0;
  cursor: pointer;
  transition: border-color var(--transition);
  flex-shrink: 0;
  scroll-snap-align: start;
}
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery__thumb:hover,
.product-gallery__thumb.active { border-color: var(--primary-color); }

/* ── Info panel ── */
.product-info__cat {
  display: inline-block;
  background: var(--background-color);
  color: var(--primary-color);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .2rem .8rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.product-info__cat:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.product-info__sku { font-size: .78rem; color: var(--text-muted); }

.product-info__name {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--text-color);
  line-height: 1.2;
  margin: .75rem 0 1rem;
}

/* Rating row */
.product-info__rating {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .85rem;
  margin-bottom: 1.25rem;
}
.product-info__stars { color: var(--warning-color); display: flex; gap: 1px; }
.product-info__rating-val { font-weight: 700; }
.product-info__rating-link { color: var(--secondary-color); text-decoration: underline; font-size: .82rem; }
.product-info__rating-link:hover { color: var(--secondary-dark); }
.product-info__sep { color: var(--text-muted); }
.product-info__sold { color: var(--text-muted); font-size: .82rem; }

/* Price */
.product-info__price-block {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.product-info__price {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
}

/* Stock badge */
.product-info__stock {
  display: inline-flex;
  align-items: center;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 20px;
  margin-bottom: 1.1rem;
}
.product-info__stock--in  { color: #15803d; background: #f0fdf4; }
.product-info__stock--low { color: #b45309; background: #fffbeb; }
.product-info__stock--out { color: #dc2626; background: #fef2f2; }

/* Short description */
.product-info__short-desc {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Actions row */
.product-info__actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* Quantity stepper */
.product-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  height: 48px;
}
.product-qty__btn {
  width: 40px;
  height: 100%;
  background: var(--background-color);
  border: none;
  font-size: 1.1rem;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.product-qty__btn:hover { background: var(--border-color); }
.product-qty__input {
  width: 50px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: .95rem;
  font-weight: 600;
  outline: none;
  color: var(--text-color);
  -moz-appearance: textfield;
}
.product-qty__input::-webkit-outer-spin-button,
.product-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Cart button */
.product-info__btn-cart {
  flex: 1;
  min-width: 160px;
  height: 48px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  font-size: .92rem;
  font-weight: 700;
  padding: 0 1.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.product-info__btn-cart:hover:not(:disabled) { background: var(--secondary-color); }
.product-info__btn-cart:disabled { opacity: .5; cursor: not-allowed; }

/* Wishlist button */
.product-info__btn-wish {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-color);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.product-info__btn-wish:hover,
.product-info__btn-wish--active { color: #e11d48; border-color: #e11d48; }

/* Divider */
.product-info__divider { border-color: var(--border-color); margin: 1.25rem 0; }

/* Meta grid */
.product-info__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem 1.25rem;
  font-size: .82rem;
  margin-bottom: 1.25rem;
}
.product-info__meta dt { color: var(--text-muted); font-weight: 500; }
.product-info__meta dd { margin: 0; color: var(--text-color); }

/* Delivery strip */
.product-info__delivery {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1rem 1.1rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.product-info__delivery-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .82rem;
}
.product-info__delivery-item > i {
  font-size: 1.15rem;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: .1rem;
}
.product-info__delivery-item strong { display: block; font-size: .85rem; }
.product-info__delivery-item small { color: var(--text-muted); }

/* ── Tabs ── */
.product-tabs {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0 3rem;
}
.product-tabs__nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  border-bottom: 2px solid var(--border-color);
  gap: 0;
}
.product-tabs__btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .75rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.product-tabs__btn:hover { color: var(--primary-color); }
.product-tabs__btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.product-description {
  max-width: 760px;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text-color);
  word-break: break-all;
}
.product-description p { margin-bottom: 1rem; }
.product-description ul,
.product-description ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.product-description h2,
.product-description h3,
.product-description h4 {
  margin: 1.5rem 0 .75rem;
  font-weight: 600;
  line-height: 1.35;
}
.product-description h2 { font-size: 1.25rem; }
.product-description h3 { font-size: 1.1rem; }
.product-description h4 { font-size: 1rem; }
.product-description img {
  max-width: 80%;
  height: auto;
  border-radius: 12px;
  margin: .5rem 0 1rem;
}
.product-description a {
  color: var(--primary-color);
  text-decoration: underline;
}
.product-description blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary-color);
  color: var(--text-muted, #6b7280);
}
.product-description .ql-align-center { text-align: center; }
.product-description .ql-align-right { text-align: right; }
.product-description .ql-align-justify { text-align: justify; }
.product-description .ql-indent-1 { padding-left: 3rem; }
.product-description .ql-indent-2 { padding-left: 4.5rem; }
.product-description .ql-indent-3 { padding-left: 6rem; }
.product-description .ql-indent-4 { padding-left: 7.5rem; }

.product-specs {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  font-size: .88rem;
}
.product-specs tr { border-bottom: 1px solid var(--border-color); }
.product-specs th {
  width: 40%;
  padding: .7rem 1rem .7rem 0;
  color: var(--text-muted);
  font-weight: 500;
  text-align: left;
  vertical-align: top;
}
.product-specs td { padding: .7rem 0; color: var(--text-color); }

.product-reviews-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.product-reviews-empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; opacity: .4; }
.product-reviews-empty p { margin: 0; line-height: 1.6; }

/* ── Mobile adjustments ── */
@media (max-width: 767px) {
  .product-main { padding: 1.5rem 0 2rem; }
  .product-tabs { padding: 1.75rem 0 2rem; }
  .product-tabs__btn { padding: .65rem .9rem; font-size: .82rem; }
  .product-info__btn-cart { min-width: 0; }
  .product-info__price { font-size: 1.7rem; }
  .product-description img { max-width: 100%; }
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
}
.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.auth-link { color: var(--secondary-color); }
.auth-link:hover { color: var(--secondary-dark); }
.auth-footer {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: .875rem;
  color: var(--text-muted);
}

/* ============================================================
   SEARCH — AUTOCOMPLETE
   ============================================================ */
.search-suggest-wrap { position: relative; }
.search-suggest {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1080;
  max-height: 380px;
  overflow-y: auto;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.search-suggest.is-open { display: block; }
.search-suggest__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}
.search-suggest__item:hover,
.search-suggest__item.is-active { background: var(--background-color); }
.search-suggest__img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--background-color);
  border-radius: 6px;
}
.search-suggest__name {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-suggest__price {
  margin-left: auto;
  font-size: .85rem;
  font-weight: 700;
  color: var(--secondary-color);
  white-space: nowrap;
}
.search-suggest__all {
  display: block;
  text-align: center;
  padding: .6rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--background-color);
  transition: background var(--transition);
}
.search-suggest__all:hover,
.search-suggest__all.is-active {
  background: var(--primary-color);
  color: #fff;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-refine {
  margin-top: 1.5rem;
  max-width: 720px;
}
.search-refine__category {
  max-width: 190px;
  background: var(--background-color);
  border-color: var(--border-color);
  font-size: .875rem;
  color: var(--text-muted);
}
.search-refine__input { font-size: .9rem; }
.search-refine__input:focus {
  box-shadow: none;
  border-color: var(--border-color);
}
/* the category select is hidden below sm, so the input keeps its own left border there */
@media (min-width: 576px) {
  .search-refine__input { border-left: none; }
}
.search-refine .btn-search {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.search-refine .btn-search:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #fff;
}

/* Notices ("did you mean", relaxed results) */
.search-notice {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--secondary-color);
  border-radius: var(--radius);
  background: var(--surface-color);
  font-size: .9rem;
  color: var(--text-color);
}
.search-notice--soft { border-left-color: var(--primary-color); }
.search-notice__icon {
  color: var(--secondary-color);
  font-size: 1.05rem;
  line-height: 1.5;
}
.search-notice--soft .search-notice__icon { color: var(--primary-color); }
.search-notice a {
  color: var(--secondary-color);
  font-weight: 700;
  text-decoration: underline;
}

/* Category shortcuts in the empty state */
.search-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.search-shortcuts__link {
  padding: .4rem .9rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--surface-color);
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.search-shortcuts__link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */

/* Order summary sticks next to the scrolling address form (desktop only) */
@media (min-width: 992px) {
  .checkout-summary {
    top: 120px; /* clears the fixed site header when it is revealed */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  /* Keep totals + pay button in view even with a long item list */
  .checkout-summary__items {
    max-height: 260px;
    overflow-y: auto;
  }
}
