/* ==========================================================================
   PoolShop Storefront Theme Styles
   Header, Navigation, Search, Hero, Flash Deals, Cards & Filters
   ========================================================================== */

/* --- TOP ANNOUNCEMENT BAR --- */
.announcement-bar {
  background: var(--color-topbar-bg);
  color: #e2e8f0;
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.announcement-highlight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.announcement-highlight span {
  color: var(--color-primary);
  font-weight: 700;
}

.announcement-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.announcement-links a {
  color: #cbd5e1;
  transition: color var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.announcement-links a:hover {
  color: var(--color-primary);
}

/* --- STICKY HEADER & NAV WRAPPER --- */
.sticky-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  background-color: var(--color-header-bg);
}

.main-header {
  background-color: var(--color-header-bg);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 46px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.03);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1;
}

.brand-title span {
  color: var(--color-primary);
}

.brand-subtitle {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-success);
  font-weight: 700;
  margin-top: 2px;
}

/* Header Search Bar with Autocomplete */
.header-search-wrap {
  flex: 1;
  max-width: 560px;
  min-width: 180px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  transition: all var(--trans-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  height: 42px;
}

.search-form:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--text-main);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-btn {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 0 1.35rem;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: background-color var(--trans-fast);
}

.search-btn:hover {
  background-color: var(--color-primary-hover);
}

/* Autocomplete Dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color var(--trans-fast);
}

.search-item:hover {
  background-color: var(--bg-surface-secondary);
}

.search-item-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  padding: 2px;
}

.search-item-info {
  flex: 1;
}

.search-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.search-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  margin-top: 2px;
}

.search-item-price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Header Quick Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  transition: background-color var(--trans-fast);
  position: relative;
  white-space: nowrap;
}

.header-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.header-action-icon {
  font-size: 1.25rem;
  position: relative;
  color: #cbd5e1;
}

.header-action-btn:hover .header-action-icon {
  color: var(--color-primary);
}

.header-badge-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-header-bg);
}

.header-action-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.header-action-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.header-action-value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}

.btn-cms-shortcut {
  background: linear-gradient(135deg, rgba(255, 96, 0, 0.2), rgba(2, 132, 199, 0.2));
  border: 1px solid rgba(255, 96, 0, 0.4);
  color: #ffaa77;
  font-size: 0.8125rem;
  font-weight: 700;
}

.btn-cms-shortcut:hover {
  background: rgba(255, 96, 0, 0.3);
  color: #ffffff;
}

/* --- SECONDARY NAVIGATION / MEGA MENU BAR --- */
.nav-bar {
  background-color: var(--color-header-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-categories-trigger {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: background-color var(--trans-fast);
  border-radius: 0;
}

.nav-categories-trigger:hover {
  background-color: var(--color-primary-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link-item {
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--trans-fast);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.nav-link-item:hover, .nav-link-item.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--color-primary);
}

.nav-link-item.deal {
  color: var(--color-primary);
}

.nav-link-item.deal:hover {
  color: var(--color-primary-hover);
}

/* Dropdown Mega Menu */
.mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  background-color: #ffffff;
  box-shadow: var(--shadow-xl);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-light);
  display: none;
  z-index: 150;
}

.mega-menu-dropdown.active {
  display: block;
}

.mega-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.125rem;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--trans-fast);
  cursor: pointer;
}

.mega-menu-item:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  padding-left: 1.35rem;
}

/* --- HERO SLIDER --- */
.hero-section {
  padding: 1.25rem 0;
}

.hero-slider-wrap {
  position: relative;
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, #0b1329 0%, #16203d 50%, #0f172a 100%);
  min-height: 360px;
}

.hero-slide {
  display: none;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  min-height: 360px;
  padding: 2.5rem 3.5rem;
  background: linear-gradient(135deg, #0b1329 0%, #16203d 50%, #0f172a 100%);
  color: #ffffff;
  position: relative;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content {
  max-width: 560px;
  z-index: 3;
}

.hero-badge {
  display: inline-block;
  background-color: var(--color-primary, #ff6000);
  color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full, 9999px);
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #e2e8f0 !important;
  margin-bottom: 1.5rem;
  line-height: 1.55;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-slide .btn-primary {
  background-color: var(--color-primary, #ff6000) !important;
  border-color: var(--color-primary, #ff6000) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255, 96, 0, 0.45);
}

.hero-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px);
}

.hero-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.hero-slide:hover .hero-img {
  transform: scale(1.04);
}

.hero-slider-nav {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all var(--trans-fast);
}

.hero-nav-btn:hover {
  background-color: var(--color-primary);
  transform: scale(1.05);
}

/* --- VALUE PROPOSITIONS BAR --- */
.value-props-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  width: 100%;
}

.value-prop-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.value-prop-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.value-prop-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.value-prop-card:nth-child(2) .value-prop-icon {
  background-color: var(--color-success-light);
  color: var(--color-success-dark);
}

.value-prop-card:nth-child(3) .value-prop-icon {
  background-color: #e0f2fe;
  color: #0284c7;
}

.value-prop-card:nth-child(4) .value-prop-icon {
  background-color: #fef3c7;
  color: #d97706;
}

.value-prop-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.value-prop-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- FLASH DEALS SECTION --- */
.flash-deals-section {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  margin: 2.5rem 0;
  color: #ffffff;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 96, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.flash-deals-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.25rem;
}

.flash-deals-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.flash-icon-pulse {
  font-size: 2.25rem;
  color: var(--color-primary);
  animation: pulseGlow 1.5s infinite;
}

.flash-deals-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.flash-deals-sub {
  font-size: 0.875rem;
  color: #cbd5e1;
  max-width: 600px;
}

.countdown-timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.countdown-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-right: 0.35rem;
}

.countdown-box {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 96, 0, 0.4);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  font-weight: 800;
  color: #ffffff;
  min-width: 38px;
  text-align: center;
}

.countdown-sep {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.flash-deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* --- CATEGORIES BROWSER GRID --- */
.categories-section {
  margin: 3.5rem 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.4rem;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  padding-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.section-title::before {
  display: none;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-link {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  transition: gap var(--trans-fast);
}

.section-link:hover {
  gap: 0.65rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  width: 100%;
}

.category-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.15rem 0.75rem;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--trans-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card-hover);
}

.category-card-img-wrap {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background-color: var(--bg-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
  transition: transform var(--trans-normal);
}

.category-card:hover .category-card-img-wrap {
  transform: scale(1.08);
  border-color: var(--color-primary);
}

.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.category-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- CATALOG MAIN LAYOUT (FILTERS + GRID) --- */
.catalog-section {
  width: 100%;
  margin: 2.5rem auto 4rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  width: 100%;
}

/* Sidebar Filters */
.filters-sidebar {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  position: sticky;
  top: 85px;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.filters-title {
  font-size: 1.0625rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-reset-btn {
  font-size: 0.75rem;
  color: var(--color-danger);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.filter-group {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.filter-group-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84375rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color var(--trans-fast);
}

.filter-checkbox-label:hover {
  color: var(--text-main);
}

.filter-checkbox-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.filter-item-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-subtle);
  background-color: var(--bg-surface-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* Price Range Inputs */
.price-inputs-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.price-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-size: 0.84375rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-secondary);
}

/* Toggle Switch Filter (Stock 24h) */
.switch-filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: var(--color-success);
}

input:checked + .slider-switch:before {
  transform: translateX(20px);
}

/* Catalog Main Content */
.catalog-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  flex: 1;
}

/* Catalog Toolbar */
.catalog-toolbar {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.catalog-results-info {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.catalog-results-info strong {
  color: var(--text-main);
  font-weight: 800;
}

.catalog-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-select {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-secondary);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.view-mode-btns {
  display: flex;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-mode-btn {
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  background-color: #ffffff;
  transition: all var(--trans-fast);
}

.view-mode-btn.active {
  background-color: var(--bg-surface-tertiary);
  color: var(--color-primary);
}

/* Active Filter Chips */
.active-filters-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(255, 96, 0, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-chip i {
  cursor: pointer;
}

/* --- PRODUCT CARD STYLES --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.products-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.products-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.products-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.products-grid.cols-auto {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1300px) {
  .products-grid,
  .products-grid.cols-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .products-grid,
  .products-grid.cols-4,
  .products-grid.cols-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .products-grid,
  .products-grid.cols-3,
  .products-grid.cols-4,
  .products-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .products-grid,
  .products-grid.cols-2,
  .products-grid.cols-3,
  .products-grid.cols-4,
  .products-grid.cols-5 {
    grid-template-columns: 1fr;
  }
}

.col-select-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.col-select-btn:hover {
  color: var(--color-primary);
}

.col-select-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
}

.product-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  transition: transform var(--trans-smooth), box-shadow var(--trans-smooth), border-color var(--trans-fast);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(255, 96, 0, 0.4);
}

/* Card Badges Container */
.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

/* Wishlist Toggle Button */
.card-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  z-index: 5;
}

.card-wishlist-btn:hover {
  color: var(--color-danger);
  transform: scale(1.1);
}

.card-wishlist-btn.active {
  color: var(--color-danger);
  background-color: #fee2e2;
}

/* Product Image Box */
.card-image-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.card-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--trans-smooth);
}

.product-card:hover .card-image {
  transform: scale(1.06);
}

/* Quick View Overlay Button */
.card-quick-view-btn {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background-color: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.product-card:hover .card-quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Product Meta & Title */
.card-brand {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  text-align: center;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  text-align: center;
  transition: color var(--trans-fast);
}

.card-title:hover {
  color: var(--color-primary);
}

/* Specs Highlights */
.card-specs-bullets {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.65rem;
  min-height: 2.1em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
}

/* Rating */
.card-rating-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.card-rating-count {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* Price Box */
.card-price-box {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
  margin-bottom: 0.75rem;
  width: 100%;
}

.card-prices-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.card-price-current {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-primary);
}

.card-price-old {
  font-size: 0.875rem;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.card-discount-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  background-color: #fee2e2;
  color: var(--color-danger);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Delivery Badge */
.card-delivery-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-success-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.card-delivery-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-success);
  display: inline-block;
}

/* Add to Cart CTA */
.card-btn-add {
  width: 100%;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--trans-fast);
}

.card-btn-add:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 4px 12px var(--color-primary-glow);
}

/* List View variant */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.products-grid.list-view .card-image-wrap {
  width: 180px;
  height: 160px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.products-grid.list-view .card-details {
  flex: 1;
}

.products-grid.list-view .card-actions-col {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  padding-left: 1.5rem;
}

/* --- FOOTER --- */
.main-footer {
  background-color: var(--color-header-bg);
  color: #cbd5e1;
  padding-top: 4rem;
  border-top: 4px solid var(--color-primary);
  margin-top: 4rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-info p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1rem 0 1.5rem;
  color: #94a3b8;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: color var(--trans-fast);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-brands-bar {
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-logo-img {
  height: 38px;
  opacity: 0.75;
  filter: grayscale(100%) brightness(150%);
  transition: all var(--trans-fast);
}

.footer-brand-logo-img:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(100%);
}

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Media Queries
   ========================================================================== */

/* --- LAPTOPS & DESKTOPS WITH LOW/MEDIUM RESOLUTIONS (1025px - 1400px) --- */
@media (max-width: 1366px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .header-inner {
    gap: 0.75rem;
  }
  .brand-logo-img {
    height: 42px;
    max-width: 165px;
  }
  .header-search-wrap {
    max-width: 460px;
  }
  .header-action-btn {
    padding: 0.4rem 0.55rem;
    gap: 0.4rem;
  }
  .header-action-value {
    font-size: 0.8125rem;
  }
}

@media (max-width: 1250px) {
  .header-action-label {
    display: none !important; /* Hide secondary tiny label to save space gracefully */
  }
  .header-action-value {
    font-size: 0.8125rem;
  }
  .brand-logo-img {
    height: 40px;
    max-width: 150px;
  }
  .header-search-wrap {
    max-width: 380px;
  }
  .nav-categories-trigger {
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
  }
  .nav-link-item {
    padding: 0.65rem 0.65rem;
    font-size: 0.8125rem;
  }
  .hero-slide {
    padding: 2rem 2.5rem;
    min-height: 320px;
    grid-template-columns: 1.2fr 0.8fr;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
  }
  .hero-img-wrap {
    height: 240px;
  }
}

@media (max-width: 1100px) {
  .btn-cms-shortcut .header-action-text {
    display: none !important; /* Keep only wrench icon for CMS shortcut */
  }
  .header-search-wrap {
    max-width: 300px;
  }
}

/* Hide mobile-only buttons on desktop */
/* --- TABLETS & SMALL LAPTOPS (<= 1024px) --- */
@media (max-width: 1024px) {
  .header-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem 0.25rem !important;
    padding: 0.5rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .brand-logo {
    order: 1 !important;
    flex: 0 0 auto !important;
  }

  .brand-logo-img {
    height: 34px !important;
    max-width: 130px !important;
  }

  .header-actions {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    gap: 0.35rem !important;
  }

  .header-action-text {
    display: none !important; /* Hide text labels, keep icons & badges */
  }

  .header-action-btn {
    padding: 0.35rem 0.45rem !important;
  }

  .header-search-wrap {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0.35rem 0 0.15rem 0 !important;
    box-sizing: border-box !important;
  }

  .search-form {
    width: 100% !important;
    max-width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
  }

  .search-input {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 0.875rem !important;
    padding: 0 0.75rem !important;
    box-sizing: border-box !important;
  }

  .search-btn {
    padding: 0 1.25rem !important;
    flex-shrink: 0 !important;
  }

  .catalog-layout {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
    width: 100%;
  }

  /* Ocultar completamente la barra lateral de filtros en móvil para ir directo a los productos */
  .filters-sidebar,
  #filtersSidebar {
    display: none !important;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 2.5rem 2rem;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-img-wrap {
    height: 240px;
  }

  .value-props-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* --- SMARTPHONES & SMALL TABLETS (<= 768px) --- */
@media (max-width: 768px) {
  /* 1. Remove Top Announcement Bar on mobile */
  .announcement-bar,
  #topAnnouncementBar {
    display: none !important;
  }

  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Sticky Header stays fixed at top */
  .sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .main-header {
    padding: 0;
  }

  .header-logo-img,
  .brand-logo-img {
    height: 28px !important;
    max-width: 110px !important;
  }

  .header-actions {
    gap: 0.25rem !important;
  }

  .header-action-btn {
    padding: 0.3rem 0.35rem !important;
    border-radius: var(--radius-sm);
  }

  .search-form {
    height: 38px !important;
  }

  .search-input {
    font-size: 0.8125rem !important;
    padding: 0 0.65rem !important;
  }

  .search-btn {
    padding: 0 1rem !important;
  }

  /* 3. On Mobile: Only show 'Todas las Categorías' button full-width! Hide the horizontal links */
  .nav-bar {
    background-color: var(--color-header-nav);
    padding: 0.35rem 0.75rem 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  }

  .nav-inner {
    width: 100%;
    padding: 0;
    display: flex;
  }

  .nav-categories-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-md);
  }

  .nav-links {
    display: none !important; /* Hide secondary horizontal nav links on mobile */
  }

  .mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 65vh;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-light);
  }

  .mega-menu-item {
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
  }

  .hero-slide {
    padding: 2rem 1.25rem;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .hero-img-wrap {
    height: 180px;
  }

  .hero-slider-nav {
    display: none;
  }

  .flash-deals-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .flash-deals-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
  }

  .category-card {
    padding: 0.75rem 0.5rem;
  }

  .category-card-img-wrap {
    height: 60px;
  }

  .category-card-name {
    font-size: 0.75rem;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .catalog-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .grid-cols-btns {
    display: none; /* Auto-balanced on mobile */
  }

  .products-grid,
  .products-grid.cols-2,
  .products-grid.cols-3,
  .products-grid.cols-4,
  .products-grid.cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .product-card {
    padding: 0.65rem;
  }

  .card-image-wrap {
    height: 135px;
  }

  .card-title {
    font-size: 0.8125rem;
    min-height: 2.4em;
    margin-bottom: 0.35rem;
  }

  .card-specs-bullets {
    display: none; /* Clean uncluttered cards on mobile */
  }

  .card-price-current {
    font-size: 1.15rem;
  }

  .card-price-old {
    font-size: 0.75rem;
  }

  .card-delivery-badge {
    font-size: 0.6875rem;
    margin-bottom: 0.5rem;
  }

  .card-btn-add {
    font-size: 0.75rem;
    padding: 0.45rem;
  }
}

/* --- SMALL MOBILE PHONES (<= 480px) --- */
@media (max-width: 480px) {
  .value-props-bar {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .value-prop-card {
    padding: 0.85rem 1rem;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.85rem;
  }

  .value-prop-icon-wrap {
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    flex-shrink: 0;
  }

  .flash-deals-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}
