/* Google Fonts loaded asynchronously via <link> in index.tpl – not here */

:root {
  /* Colors */
  --c-blue-950: #0f243f;
  --c-slate-800: #253254;
  --c-slate-500: #767e9c;
  --c-gray-400: #99a1af;
  --c-slate-200: #e5e7eb;
  --c-bg: #f9f9ff;
  --c-white: #ffffff;
  --c-amber-400: #fdca33;
  --c-amber-500: #f79e1b;
  --c-red-600: #eb001b;
  --c-orange-600: #ff5f00;

  /* Typography */
  --font-main: "Montserrat", sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--c-bg);
  color: var(--c-slate-800);
  line-height: 1.5;
  overflow-x: hidden;
}

.container {
  margin: 0 auto;
  max-width: 1280px;
  padding: 0 20px;
}

/* Accordion Panel - smooth open/close animation */
.accordion-panel {
  overflow: hidden;
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .accordion-panel {
    transition: none;
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: none; /* 'none' is treated as translateY(0) for transitions but removes the stacking context */
}
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--c-slate-800);
  margin-bottom: 16px;
  line-height: 1.2;
  text-align: center;
}
h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-slate-800);
  margin-bottom: 24px;
  line-height: 1.3;
}
.subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--c-slate-800);
  text-align: center;
  margin-bottom: 40px;
}

/* Top Bar */
.top-bar {
  background-color: var(--c-blue-950);
  color: var(--c-white);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header */
.main-header {
  background-color: var(--c-white);
  padding: 16px 0;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-blue-950);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-bar {
  flex: 1;
  max-width: 520px;
  display: flex;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.search-input {
  flex: 1;
  background: var(--c-slate-200);
  border: none;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.search-bar:focus-within {
  outline: 2px solid var(--c-amber-400);
  outline-offset: 2px;
}
.search-btn {
  background: var(--c-amber-400);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
}
.action-btn {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  background: none;
  border: none;
  color: var(--c-slate-800);
  cursor: pointer;
}

/* Nav */
.nav-bar {
  background-color: var(--c-slate-200);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Hero Widgets */
.hero {
  padding: 20px 0;
  position: relative;
  z-index: 10;
  overflow: visible;        /* allow Choices dropdown to escape hero bounds */
}
.search-widget {
  max-width: 1244px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.widget-tabs {
  display: flex;
  justify-content: center;
  background: var(--c-white);
  padding: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: fit-content;
  margin: 0 auto;
  z-index: 1;
  position: relative;
}
.tab {
  padding: 12px 64px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .tab {
    padding: 6px 16px;
    font-size: 12px;
    flex: 1;
  }
  .widget-tabs {
    width: 100%;
  }
  .widget-body {
    padding: 20px 16px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
  }
  .selectors {
    gap: 10px;
  }
  .select-box {
    background: var(--c-slate-200);
    border-radius: 999px;
    padding: 0 12px;
    height: 28px;
    font-size: 10px;
    font-weight: 500;
  }
  .select-wrapper::after {
    right: 12px;
    width: 8px;
    height: 5px;
  }
}
.tab.active {
  background: var(--c-slate-800);
  color: var(--c-white);
}
.tab.inactive {
  color: var(--c-blue-950);
  background: transparent;
}
.widget-body {
  padding: 48px;
  background: var(--c-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  width: 100%;
  position: relative;
  z-index: 1;
}
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  position: relative;
}
.step {
  position: relative;
  z-index: 2;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-slate-200);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step-num.active {
  background: var(--c-slate-800);
}
.step-separator {
  height: 2px;
  background: var(--c-slate-200);
  width: 120px;
  margin: 0 -2px;
  z-index: 1;
}
.selectors {
  display: flex;
  gap: 24px;
  width: 100%;
}
.select-wrapper {
  flex: 1;
  position: relative;
}
.select-wrapper::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2399A1AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.select-box {
  background: #f0f1f5;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-slate-500);
  width: 100%;
  border: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.select-wrapper {
  flex: 1;
  position: relative;
}
.select-wrapper::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2399A1AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.select-box {
  background: #f0f1f5;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-slate-500);
  width: 100%;
  border: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

/* ── Choices.js overrides ───────────────────────────────────── */
.choices {
  width: 100%;
  margin-bottom: 0;
  font-family: var(--font-main);
  position: relative;
  z-index: 1;               /* establish stacking context for each select */
}

/* Raise the open dropdown above its flex siblings */
.choices.is-open {
  z-index: 200 !important;
}

/* The visible button/container */
.choices__inner {
  background: #f0f1f5 !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 14px 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--c-slate-500) !important;
  min-height: unset !important;
}

/* Selected item text */
.choices__list--single .choices__item {
  padding: 0 !important;
  color: var(--c-slate-500);
  font-weight: 700;
  font-size: 14px;
}

/* Dropdown list */
.choices__list--dropdown,
.choices__list[aria-expanded] {
  border: none !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  margin-top: 6px !important;
  font-family: var(--font-main) !important;
  font-size: 14px !important;
  overflow: hidden;
  z-index: 200 !important;   /* must be ≥ .choices.is-open to clear siblings */
  width: 100% !important;
  min-width: 100% !important;
}

/* Search input inside dropdown */
.choices__list--dropdown .choices__input,
.choices[data-type*="select-one"] .choices__input {
  background: var(--c-slate-200) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  margin: 8px !important;
  width: calc(100% - 16px) !important;
  padding: 8px 12px !important;
  font-family: var(--font-main) !important;
  font-size: 13px !important;
}

/* Dropdown item */
.choices__list--dropdown .choices__item {
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--c-slate-800) !important;
}

/* Dropdown item hover/highlighted */
.choices__list--dropdown .choices__item--highlighted,
.choices__list[aria-expanded] .choices__item--highlighted {
  background: var(--c-amber-400) !important;
  color: var(--c-blue-950) !important;
}

/* Remove the default arrow since Choices adds its own */
.choices[data-type*="select-one"]::after {
  border-color: var(--c-slate-500) transparent transparent !important;
  right: 20px !important;
}
.choices[data-type*="select-one"].is-open::after {
  border-color: transparent transparent var(--c-slate-500) !important;
}

/* Disabled state */
.choices.is-disabled .choices__inner {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

/* Hide the wrapper's pseudo-element arrow we had before */
.select-wrapper::after {
  display: none;
}

/* Section Grid */
.section {
  padding: 40px 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.title-bar {
  width: 48px;
  height: 4px;
  background: var(--c-amber-400);
}

@media (max-width: 767px) {
  .title-bar {
    width: 4px;
    height: 24px;
  }
}

/* Offers */
.offers-grid {
  /* display: grid; */
  display: grid;
  /* grid-template-columns: repeat(4, 1fr); */
  gap: 24px;
}
.product-card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Equal-height cards inside a flex slot (e.g. offers carousel) */
.product-slot {
  display: flex;
  flex-direction: column;
}
.product-slot .product-card {
  flex: 1;
}
.product-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  overflow: hidden;
}
@media (max-width: 767px) {
  .product-img-wrap {
    height: 160px;
  }
}
.product-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding-top: 36px;
}
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--c-amber-400);
  color: var(--c-blue-950);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.recommended-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #16a34a;
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
  white-space: nowrap;
}
.product-brand-logo {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  /*background: rgba(255, 255, 255, 0.88);*/
  border-radius: 8px;
  /*box-shadow: 0 1px 4px rgba(0,0,0,0.10);*/
  pointer-events: none;
}
.product-brand-logo img {
  max-height: 22px;
  max-width: 72px;
  width: auto;
  object-fit: contain;
  filter: grayscale(10%);
  opacity: 0.90;
  transition: opacity 0.2s;
}
.product-img-wrap:hover .product-brand-logo img {
  opacity: 1;
  filter: none;
}
@media (max-width: 767px) {
  .product-brand-logo {
    bottom: 5px;
    right: 5px;
    padding: 3px 6px;
    border-radius: 6px;
  }
  .product-brand-logo img {
    max-height: 18px;
    max-width: 58px;
  }
}
.product-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.product-title {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  flex: 1;
}
.product-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}
.price-current {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-blue-950);
}
.price-old {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-gray-400);
  text-decoration: line-through;
}
.btn-cart {
  background: var(--c-amber-400);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-blue-950);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn-cart i {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* Categories & Brands */
.categories-grid {
  display: grid;
  /* grid-template-columns: repeat(4, 1fr); */
  gap: 16px;
}
.cat-card {
  background: var(--c-white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.cat-img {
  width: 64px;
  height: 64px;
  background: var(--c-slate-200);
  border-radius: var(--radius-sm);
}
.cat-text h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cat-text p {
  font-size: 12px;
  color: var(--c-slate-500);
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
}

/* Features Block */
.features-block {
  background: var(--c-white);
  padding: 40px 0;
  margin-top: 40px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--c-slate-200);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--c-blue-950);
  flex-shrink: 0;
}
.feature-text h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.feature-text p {
  font-size: 12px;
  color: var(--c-slate-800);
}

/* Footer */
.footer {
  background: var(--c-blue-950);
  padding: 60px 0 20px;
  color: var(--c-white);
}
.footer-col {
  background: rgba(255,255,255,0.05);
  padding: 32px;
  border-radius: var(--radius-md);
}
.footer-col h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-list .icon {
  color: var(--c-amber-400);
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-list .label {
  font-size: 12px;
  color: var(--c-slate-500);
  margin-bottom: 4px;
}
.contact-list .val {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.footer-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 0.2s;
}
.footer-social-btn:hover {
  background: rgba(255,255,255,0.22);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.info-list li {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-info-icon {
  color: var(--c-amber-400);
  font-size: 20px;
  flex-shrink: 0;
}
.info-list .val {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-white);
  text-decoration: none;
}

.pay-icon {
  width: 40px;
  height: 24px;
  background: var(--c-white);
  border-radius: 4px;
}

.subcat-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.subcat-card:hover {
  box-shadow: 0px 8px 24px 0px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}
.subcat-card .subcat-img-wrap {
  width: 100%;
  height: 160px; /* h-72 */
  overflow: hidden;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .subcat-card .subcat-img-wrap {
    height: 100px;
  }
}
.subcat-card .subcat-img-wrap img {
  width: auto;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: auto;
  padding-top:16px
}
.subcat-card .subcat-title {
  padding: 12px 24px 24px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--c-slate-800);
  line-height: 1.25rem;
}

.brand-filter-check { accent-color: var(--c-blue-950); cursor: pointer; }
.brand-filter-check:checked ~ span { color: var(--c-blue-950); font-weight: 700; }
/* Active filter tag */
#activeFiltersBar { display: none; }
#activeFiltersBar.active { display: flex; }
.price-range-wrap {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
}
.price-range-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--c-slate-200);
  border-radius: 2px;
  pointer-events: none;
}
.price-range-fill {
  position: absolute;
  height: 4px;
  background: var(--c-slate-800);
  border-radius: 2px;
  pointer-events: none;
}
.price-slider {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  outline: none;
  cursor: pointer;
  pointer-events: none;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1.5px solid var(--c-slate-800);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.10);
  pointer-events: all;
}
.price-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1.5px solid var(--c-slate-800);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.10);
  pointer-events: all;
}
.price-slider::-moz-range-track { background: transparent; }
/* Custom checkbox */
.filter-check {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  background: var(--c-slate-200);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.15s, border-color 0.15s;
}
.filter-check:checked {
  background: var(--c-slate-800);
  border-color: var(--c-slate-800);
}
.filter-check:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
/* Sort radio buttons */
.filter-radio {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  background: var(--c-slate-200);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.15s, border-color 0.15s;
}
.filter-radio:checked {
  background: var(--c-slate-800);
  border-color: var(--c-slate-800);
}
.filter-radio:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}
/* Search form inputs */
.param-input {
  height: 40px;
  padding: 0 12px;
  background: white;
  border-radius: 16px;
  outline: 0.8px solid #d1d5db;
  outline-offset: -0.8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  border: none;
  width: 100%;
  color: var(--c-slate-800);
  transition: outline-color 0.15s;
}
.param-input:focus {
  outline: 1.5px solid var(--c-slate-800);
  outline-offset: -1.5px;
}

.filter-list__list {
  max-height: 400px;
  overflow-y: auto;
}

/* Subtle scrollbar for all filter lists */
.filter-list__list,
.filter-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.filter-list__list::-webkit-scrollbar,
.filter-scroll::-webkit-scrollbar { width: 4px; }
.filter-list__list::-webkit-scrollbar-track,
.filter-scroll::-webkit-scrollbar-track { background: transparent; }
.filter-list__list::-webkit-scrollbar-thumb,
.filter-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.filter-list__list::-webkit-scrollbar-thumb:hover,
.filter-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
