/* ============================================
   Ferreterías Ofertón - Premium Storefront Styles
   ============================================ */

:root {
  --bg-page: #FFFFFF;
  --color-primary: #004F8A;
  --color-accent: #FFB800;
  --text-main: #333333;
  
  /* System variables mapped to the above */
  --brand-primary: var(--color-primary);
  --brand-primary-hover: #003F6E;
  --action-buy: var(--color-primary);
  --action-buy-hover: #003F6E;
  --bg-main: var(--bg-page);
  --bg-card: var(--bg-page);
  --text-muted: #666666;
  --text-blue: #004F8A;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.2s ease-in-out;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

/* ============================================
   Header / Navbar
   ============================================ */
.header {
  background: var(--color-primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #FFFFFF;
}

.logo-icon-svg {
  width: 32px;
  height: 32px;
  stroke: #FFFFFF;
}

.logo-text-bold {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 650px;
  display: flex;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px 0 0 5px;
  font-size: 14px;
  outline: none;
  color: var(--text-main);
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--color-accent);
}

.search-btn-icon {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 5px 5px 0;
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
}

.search-btn-icon:hover {
  background: #f3f4f6;
}

.search-btn-icon svg {
  width: 18px;
  height: 18px;
}

.search-clear {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.search-clear.visible {
  opacity: 1;
  visibility: visible;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
  transition: var(--transition);
  text-decoration: none;
}

.header-btn svg {
  width: 24px;
  height: 24px;
}

.header-btn:hover {
  color: var(--color-accent);
}

.whatsapp-header-btn {
  color: #25D366 !important;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.whatsapp-header-btn:hover {
  background: #25D366 !important;
  color: #ffffff !important;
}

.action-badge, .cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-accent);
  color: #333333;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Yellow Navigation / Brand Selector Bar
   ============================================ */
.nav-yellow {
  background: #ffffff;
  padding: 0 20px;
  position: sticky;
  top: 80px;
  z-index: 90;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--border-color);
}

.nav-yellow-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}

.nav-brands-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Dropdown Container */
.brands-dropdown-container {
  position: relative;
}

.btn-all-brands {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-all-brands:hover {
  background: #f8f9fa;
}

.btn-all-brands svg {
  width: 16px;
  height: 16px;
}

/* Brands Dropdown List */
.brands-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  width: 220px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 110;
  max-height: 350px;
  overflow-y: auto;
}

.brands-dropdown-container:hover .brands-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.brand-dropdown-item {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  color: #444444;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.brand-dropdown-item:last-child {
  border-bottom: none;
}

.brand-dropdown-item:hover, .brand-dropdown-item.active {
  background: #fff7df;
  color: var(--text-main);
}

/* Static links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  color: #333333;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(0, 0, 0, 0.08);
}

.nav-links a.btn-offers {
  color: #d93025; /* Red style for ofertas link */
}

.nav-links a.btn-remates {
  color: #d97706; /* Amber style for remates link */
}

.nav-links a.btn-combos {
  color: #2563eb; /* Blue style for combos link */
}

/* Nav Yellow Right */
.nav-yellow-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23333333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-results-badge {
  background: rgba(0, 0, 0, 0.06);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #333333;
}

/* Social icons */
.nav-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
}

.social-icon.facebook {
  background: #3b5998;
}

.social-icon.facebook:hover {
  background: #2d4373;
}

.social-icon.whatsapp {
  background: #25d366;
}

.social-icon.whatsapp:hover {
  background: #128c7e;
}

/* ============================================
   Welcome Banner / Hero
   ============================================ */
.hero-banner-section {
  max-width: 1400px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.hero-banner-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.hero-banner-info h1 {
  font-size: 22px;
  font-weight: 800;
  color: #333333;
  margin-bottom: 4px;
}

.hero-banner-info p {
  font-size: 14.5px;
  color: var(--text-muted);
}

.hero-banner-download-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-store img {
  height: 40px;
  display: block;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title-wrapper {
  max-width: 1400px;
  margin: 30px auto 0;
  padding: 0 20px;
}

.main-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #333333;
  position: relative;
}

/* ============================================
   Products Grid
   ============================================ */
.products-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 80px;
  min-height: 350px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  background: #ffffff; /* pure white container to blend transparent images perfectly */
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 220px;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

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

.product-image-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

.product-stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-stock-badge.in-stock {
  background: #dcfce7;
  color: #166534;
  border: none;
}

.product-stock-badge.out-of-stock {
  background: #fee2e2;
  color: #991b1b;
  border: none;
}

.product-stock-badge.central-warehouse {
  background: #dbeafe;
  color: #1e40af;
  border: none;
}

.product-stock-badge.remate {
  background: #ef4444; /* Vivid Red */
  color: #ffffff;
  border: none;
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
  height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: uppercase;
}

.product-price-action-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

.product-price-group {
  display: flex;
  flex-direction: column;
}

.product-original-price {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 1px;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.btn-add-product {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  background: var(--color-primary);
  color: var(--color-accent);
  border: none;
  width: 100%;
  padding: 10px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s;
}

.btn-add-product:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 79, 138, 0.3);
}

.btn-add-product:active {
  transform: translateY(0) scale(1);
}

.btn-add-product:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  opacity: 0.8;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.btn-add-product svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 768px) {
  .product-price-action-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0;
  }
  .btn-add-product {
    width: auto;
    padding: 8px 16px;
  }
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-info {
  padding: 16px;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.price { width: 35%; height: 20px; }

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

/* ============================================
   Hero Promocional
   ============================================ */
.hero-promo-section {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
}

.hero-promo-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 120px;
  background: var(--brand-primary);
}

.hero-promo-img {
  display: none; /* Hide image to allow CSS gradient banner to dictate height natively */
}

.hero-promo-fallback {
  position: relative;
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
  color: white;
  padding: 20px;
}

.hero-promo-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.hero-promo-content p {
  font-size: 14px;
  opacity: 0.9;
}

.rounded-xl {
  border-radius: 12px;
}


/* ============================================
   No Results
   ============================================ */
.no-results {
  text-align: center;
  padding: 60px 20px;
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-reset {
  padding: 10px 24px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary-hover);
}

/* ============================================
   Product Detail Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-md);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #ffffff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0,0,0,0.8);
}

.modal-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.modal-image-wrapper {
  position: relative;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-image {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.modal-badges {
  position: absolute;
  top: 15px;
  left: 15px;
}

.modal-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.modal-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary-hover);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.modal-description {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 15px;
}

.modal-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--action-buy);
}

.modal-stock {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
}

.modal-stock.in-stock {
  background: rgba(16, 185, 129, 0.1);
  color: var(--action-buy);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.modal-stock.out-of-stock {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.modal-category {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-category span {
  font-weight: 600;
  color: var(--text-main);
}

.modal-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff;
  padding: 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s;
}

.modal-whatsapp:hover {
  background: #128c7e;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.35);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--brand-primary, #004f8a); /* Header Blue */
  color: #e2e8f0;
  border-top: 4px solid var(--color-accent, #ffb800); /* Yellow top border */
  padding: 50px 0 20px;
  font-family: inherit;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-logo {
  margin-bottom: 15px;
}

.footer-logo .logo-name {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.footer-about {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 90%;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-accent, #ffb800); /* Yellow background */
  color: var(--brand-primary, #004f8a); /* Blue icons inside yellow */
  border-radius: 4px; /* Square with rounded corners */
  transition: opacity 0.2s, transform 0.2s;
}

.footer-socials a:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
  font-size: 14px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Add circles to specific lists */
.footer-icon-links li::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: var(--color-accent, #ffb800);
  border-radius: 50%;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
}

/* Icon for Contacto */
.footer-col:nth-child(2) .footer-icon-links li:nth-child(1)::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23004f8a" viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg>');
}
.footer-col:nth-child(2) .footer-icon-links li:nth-child(2)::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23004f8a" viewBox="0 0 24 24"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></svg>');
}
.footer-col:nth-child(2) .footer-icon-links li:nth-child(3)::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23004f8a" viewBox="0 0 24 24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
}

/* Icon for Horarios */
.footer-col:nth-child(3) .footer-icon-links li::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23004f8a" viewBox="0 0 24 24"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>');
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  text-align: left;
  font-size: 13px;
  color: #94a3b8;
}

/* ============================================
   WhatsApp FAB
   ============================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  z-index: 100;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s;
}

.whatsapp-fab:hover {
  background: #128c7e;
  color: #ffffff;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333333;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  z-index: 300;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   Responsive Design & Mobile-First
   ============================================ */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal {
    max-width: 550px;
  }
}

@media (max-width: 768px) {
  .hero-promo-section {
    padding: 0 16px;
    margin: 20px auto 10px auto;
  }
  .hero-promo-img {
    display: none;
  }
  .hero-promo-fallback {
    padding: 15px;
    min-height: 80px;
  }
  .hero-promo-content h2 {
    font-size: 16px;
    margin-bottom: 4px;
  }
  .hero-promo-content p {
    font-size: 11px;
    display: block; /* Show text again */
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .header-inner {
    height: auto;
    flex-direction: column;
    padding: 15px 0;
    gap: 12px;
  }
  .search-wrapper {
    max-width: 100%;
    width: 100%;
  }
  .sucursales-group {
    width: 100%;
  }
  .btn-sucursales {
    flex: 1;
  }
  .nav-yellow {
    top: 0;
    position: relative;
    padding: 10px;
    height: auto;
  }
  .nav-yellow-inner {
    flex-direction: column;
    height: auto;
    gap: 10px;
  }
  .nav-brands-selector-wrapper {
    width: 100%;
    justify-content: space-between;
  }
  .nav-yellow-right {
    width: 100%;
    justify-content: space-between;
  }
  .hero-banner-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-image-wrapper {
    height: 150px;
    padding: 10px;
  }
  .product-name {
    font-size: 13px; /* Slightly larger for legibility */
    height: 38px;
    margin-bottom: 8px;
  }

  .product-price {
    font-size: 18px; /* Larger, bolder price */
    font-weight: 800;
  }
  .product-original-price {
    font-size: 10.5px;
  }
  .btn-add-product {
    padding: 6px 8px;
    font-size: 11px;
  }
}

body.modal-open {
  overflow: hidden;
}

/* ============================================
   Cart & Checkout Drawer Modal
   ============================================ */
.cart-modal {
  max-width: 500px;
  padding: 30px;
}

.cart-title, .checkout-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--brand-primary);
  padding-bottom: 8px;
}

.cart-items-container {
  max-height: 380px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 5px;
}

.cart-empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-weight: 500;
}

.cart-item-row {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-row:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
  padding: 4px;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--action-buy);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--border-light);
}

.qty-val {
  font-size: 13px;
  font-weight: 700;
  width: 24px;
  text-align: center;
  color: var(--text-main);
}

.btn-remove-cart-item {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: var(--transition);
}

.btn-remove-cart-item:hover {
  color: #b91c1c;
  transform: scale(1.1);
}

.btn-remove-cart-item svg {
  width: 18px;
  height: 18px;
}

.cart-summary-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.cart-total-row strong {
  font-size: 20px;
  color: var(--action-buy);
  font-weight: 800;
}

.btn-checkout, .btn-confirm-order {
  width: 100%;
  background: var(--action-buy);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, box-shadow 0.2s;
}

.btn-checkout:hover, .btn-confirm-order:hover {
  background: var(--action-buy-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.35);
}

.btn-checkout:active, .btn-confirm-order:active {
  transform: translateY(0);
}

/* Checkout Form Styles */
.btn-back-to-cart {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
}

.btn-back-to-cart:hover {
  color: var(--text-main);
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--brand-primary);
}

.checkout-confidence-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #ffe8a3;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 5px;
}

.checkout-confidence-card svg {
  color: var(--brand-primary-hover);
  flex-shrink: 0;
  margin-top: 2px;
}

.confidence-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #856404;
  line-height: 1.4;
  margin: 0;
}

/* ============================================
   Image Carousel & Zoom (Lupa) & Lightbox
   ============================================ */
.carousel-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}

.carousel-thumbnails {
  display: none; /* toggled by JS if images.length > 1 */
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  width: 65px;
  flex-shrink: 0;
  padding-right: 4px;
}

/* Hide scrollbar for thumbnails but keep scroll functional */
.carousel-thumbnails::-webkit-scrollbar {
  width: 4px;
}
.carousel-thumbnails::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.carousel-main-image-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  height: 380px;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-in;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.active-carousel-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.1s ease-out;
  transform-origin: center center;
}

/* Zoom Indicator (floating magnifier icon) */
.zoom-indicator-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  z-index: 3;
  color: var(--brand-primary);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.carousel-main-image-wrapper:hover .zoom-indicator-icon {
  opacity: 1;
}

.zoom-indicator-icon svg {
  width: 18px;
  height: 18px;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  display: none; /* toggled by JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.carousel-arrow:hover {
  background: #ffffff;
  color: var(--brand-primary);
  transform: translateY(-50%) scale(1.05);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

.carousel-thumbnail {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 2px;
  background: #fff;
  transition: border-color 0.2s, transform 0.2s;
}

.carousel-thumbnail:hover {
  border-color: var(--brand-primary-hover);
  transform: scale(1.05);
}

.carousel-thumbnail.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px var(--brand-primary);
}

/* Carousel Mobile Dots */
.carousel-dots {
  display: none; /* hidden on desktop */
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* Fullscreen Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1010;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 90%;
  height: 85%;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  user-select: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

.lightbox-arrow {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.lightbox-arrow:active {
  transform: scale(0.95);
}

.lightbox-arrow.prev {
  margin-right: 20px;
}

.lightbox-arrow.next {
  margin-left: 20px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .carousel-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .carousel-thumbnails {
    display: none !important; /* Hide vertical thumbnails on mobile */
  }
  .carousel-main-image-wrapper {
    height: 280px;
    width: 100%;
  }
  .carousel-dots {
    display: flex; /* Show paginator dots on mobile */
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
  }
  .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1005;
  }
  .lightbox-arrow.prev {
    left: 10px;
    margin-right: 0;
  }
  .lightbox-arrow.next {
    right: 10px;
    margin-left: 0;
  }
  .lightbox-image {
    max-width: 100%;
    max-height: 80%;
  }
}

/* ============================================
   App-like Mobile Experience Styles
   ============================================ */

/* Mobile Components Default Hidden */
.mobile-header-btn,
.bottom-nav-bar,
.mobile-search-overlay,
.bottom-sheet-handle {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-top: 130px !important; /* Ensure enough space for the wrapping header */
    overscroll-behavior-y: none;
    padding-bottom: 75px !important; /* Space for bottom tab bar */
  }

  /* Tap Highlight and Touch Targets */
  a, button, select, input, .product-card, .brand-sheet-item {
    -webkit-tap-highlight-color: transparent !important;
    min-height: 44px;
  }

  /* Minimal Top Bar (Header) */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .header.hidden {
    transform: translateY(-100%);
  }
  .header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 16px 16px 16px !important;
    position: relative;
    gap: 0;
    width: 100%;
  }
  
  .mobile-header-btn.back-btn {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin: 0;
  }

  .header-inner .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    position: static;
    transform: none;
    margin: 0;
  }
  
  .mobile-header-btn.filter-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin: 0;
  }
  
  /* Make search visible on mobile in header */
  .header-inner .search-wrapper {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    width: 100%;
    margin-top: 14px; /* Breathing room */
    height: 44px;
  }
  .header-inner .search-wrapper input {
    height: 100%;
    border-radius: 8px;
  }
  
  /* Hide right actions (desktop) because mobile uses bottom nav */
  .header-inner .header-actions {
    display: none !important;
  }
  
  /* Show mobile header buttons */
  .mobile-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 2;
  }
  .mobile-header-btn:active {
    opacity: 0.6;
  }

  /* Pill button for brand selection (Glassmorphism) */
  .brand-selector-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03rem;
    height: 32px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
  }
  .brand-selector-btn svg {
    opacity: 0.8;
  }
  .brand-selector-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.96);
  }
  
  .mobile-header-btn.filter-btn, .brand-selector-btn.filter-btn {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin: 0;
  }

  /* Hide original yellow navbar filter section */
  .nav-yellow {
    display: none !important;
  }

  /* Adjust spacing for section title wrapper on mobile */
  .section-title-wrapper {
    margin: 15px auto 0 !important;
    padding: 0 16px !important;
  }

  .main-section-title {
    font-size: 18px !important;
  }

  /* Optimize banner margin in mobile */
  .hero-banner-section {
    margin: 12px auto 0 !important;
    padding: 0 16px !important;
  }

  /* Adjust main container top spacing */
  main {
    margin-top: 0 !important;
    padding-top: 10px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 40px !important;
  }

  /* Bottom Sheets for Modals */
  .modal-overlay {
    align-items: flex-end; /* Align sheet to bottom */
    padding: 0;
  }
  .modal {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    max-height: 85vh !important;
    border: none !important;
  }
  .modal-overlay.active .modal {
    transform: translateY(0) !important;
  }
  
  /* Drag handle */
  .bottom-sheet-handle {
    display: block !important;
    width: 40px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 3px;
    margin: 12px auto 8px auto;
    cursor: pointer;
  }

  /* Adjust modal body padding and close button */
  .modal-close {
    top: 10px !important;
    right: 15px !important;
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-secondary) !important;
  }

  /* Bottom Tab Bar styling */
  .bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 150;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary, #64748b);
    flex: 1;
    height: 100%;
    cursor: pointer;
    gap: 4px;
    transition: color 0.2s ease;
  }
  .bottom-nav-item.active {
    color: var(--primary-color, #f59e0b);
  }
  .bottom-nav-icon {
    width: 22px;
    height: 22px;
  }
  .bottom-nav-label {
    font-size: 10px;
    font-weight: 600;
  }

  /* Badge counts in bottom nav */
  .bottom-nav-cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: none;
    align-items: center;
    justify-content: center;
  }
  .bottom-nav-cart-badge.visible {
    display: flex;
  }

  /* Mobile Search Overlay */
  .mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card, #ffffff);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .mobile-search-overlay.active {
    transform: translateX(0);
  }
  .mobile-search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    gap: 12px;
  }
  .mobile-search-back-btn,
  .mobile-search-clear-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-search-clear-btn {
    font-size: 24px;
    color: var(--text-secondary);
    display: none;
  }
  .mobile-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    background: none;
  }
  .mobile-search-results-info {
    padding: 20px;
    color: var(--text-muted, #94a3b8);
    text-align: center;
    font-size: 14px;
  }

  .whatsapp-fab {
    bottom: 80px !important; /* Move Whatsapp FAB up slightly */
  }

  .carousel-dots {
    display: flex !important;
  }
}


/* ---------- BANNERS DINÁMICOS ---------- */
#banner-container {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
  max-width: 1200px;
  margin: 1rem auto;
  border-radius: 12px;
  overflow-y: hidden;
}

#banner-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.banner-carousel-item {
  display: block;
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  text-decoration: none;
  height: 120px; /* Default móvil */
}

.banner-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5%;
}

.banner-content {
  width: 100%;
}

.banner-content h2 {
  color: #FFFFFF;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
  font-size: 1.1rem; /* Móvil */
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-content p {
  color: #F3F4F6;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
  font-size: 0.8rem; /* Móvil */
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .banner-carousel-item {
    height: 180px; /* PC Slim Design */
  }
  .banner-content h2 {
    font-size: 1.5rem; /* PC */
    -webkit-line-clamp: 1; /* PC: One line preferable */
  }
  .banner-content p {
    font-size: 1rem; /* PC */
  }
}
