:root {
  --catalog-bg: #f7f8fb;
  --catalog-surface: #ffffff;
  --catalog-text: #1f2937;
  --catalog-muted: #6b7280;
}

body {
  background: var(--catalog-bg);
  color: var(--catalog-text);
}

body[data-theme="default"] {
  --catalog-bg: #f8fafc;
  --catalog-surface: #ffffff;
}

body[data-theme="ferreteria"] {
  --catalog-bg: #f3f4f6;
  --catalog-surface: #ffffff;
}

body[data-theme="tecnologia"] {
  --catalog-bg: #eef3ff;
  --catalog-surface: #ffffff;
}

body[data-theme="delivery"] {
  --catalog-bg: #fff9f2;
  --catalog-surface: #ffffff;
}

body[data-theme="medico"] {
  --catalog-bg: #eefaf8;
  --catalog-surface: #ffffff;
}

body[data-theme="moda"] {
  --catalog-bg: #fff3f7;
  --catalog-surface: #ffffff;
}

body[data-theme="gourmet"] {
  --catalog-bg: #fff7ee;
  --catalog-surface: #ffffff;
}

body[data-theme="farmacia"] {
  --catalog-bg: #eff9f1;
  --catalog-surface: #ffffff;
}

body[data-theme="deportes"] {
  --catalog-bg: #edf5ff;
  --catalog-surface: #ffffff;
}

body[data-theme="belleza"] {
  --catalog-bg: #fff0f5;
  --catalog-surface: #ffffff;
}

body[data-theme="automotriz"] {
  --catalog-bg: #f0f2f6;
  --catalog-surface: #ffffff;
}

body[data-theme="hogar"] {
  --catalog-bg: #f7f6f2;
  --catalog-surface: #ffffff;
}

body[data-theme="petshop"] {
  --catalog-bg: #f8f4ff;
  --catalog-surface: #ffffff;
}

body[data-theme="libreria"] {
  --catalog-bg: #f7f1ea;
  --catalog-surface: #ffffff;
}

body[data-theme="minimarket"] {
  --catalog-bg: #f4f7ef;
  --catalog-surface: #ffffff;
}

body[data-theme] .navbar {
  background: var(--catalog-surface) !important;
}

body[data-theme] .card,
body[data-theme] .product-card {
  background: var(--catalog-surface);
}

body[data-theme="ferreteria"] .navbar {
  border-bottom: 3px solid var(--primary);
}

body[data-theme="ferreteria"] .btn-primary,
body[data-theme="ferreteria"] .btn-pro {
  border-radius: 10px;
}

body[data-theme="tecnologia"] .navbar {
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

body[data-theme="tecnologia"] .product-card {
  border: 1px solid rgba(15, 23, 42, .08);
}

body[data-theme="delivery"] .btn-primary,
body[data-theme="delivery"] .btn-pro {
  border-radius: 999px;
  font-weight: 700;
}

body[data-theme="delivery"] .product-card {
  border-radius: 18px;
}

body[data-theme="medico"] .navbar {
  border-bottom: 2px solid rgba(16, 185, 129, .25);
}

body[data-theme="medico"] .product-card,
body[data-theme="medico"] .card {
  border: 1px solid rgba(16, 185, 129, .18);
}

body[data-theme="moda"] .btn-primary,
body[data-theme="moda"] .btn-pro {
  border-radius: 14px;
}

body[data-theme="gourmet"] .navbar {
  border-bottom: 2px solid rgba(217, 119, 6, .24);
}

body[data-theme="gourmet"] .product-card {
  border: 1px solid rgba(180, 83, 9, .15);
}

body[data-theme="farmacia"] .navbar {
  border-bottom: 2px solid rgba(22, 163, 74, .25);
}

body[data-theme="farmacia"] .btn-primary,
body[data-theme="farmacia"] .btn-pro {
  box-shadow: 0 8px 18px rgba(22, 163, 74, .16);
}

body[data-theme="deportes"] .btn-primary,
body[data-theme="deportes"] .btn-pro {
  text-transform: uppercase;
  letter-spacing: .02em;
}

body[data-theme="belleza"] .product-card {
  border-radius: 20px;
}

body[data-theme="automotriz"] .navbar {
  border-bottom: 2px solid rgba(31, 41, 55, .2);
}

body[data-theme="automotriz"] .product-card {
  border: 1px solid rgba(17, 24, 39, .14);
}

/* ===== Theme: Automotriz (estilo industrial, tipo repuestos) ===== */
body[data-theme="automotriz"] {
  --catalog-bg: #0f1318;
  --catalog-surface: #171d24;
  --catalog-text: #e5e7eb;
  --catalog-muted: #9ca3af;
  --auto-accent: var(--primary);
  --auto-accent-2: var(--primary-light);
  --auto-stroke: rgba(229, 231, 235, .16);
  --auto-shadow: 0 16px 34px rgba(0, 0, 0, .34);
  color: var(--catalog-text);
  font-family: "Barlow", system-ui, -apple-system, sans-serif;
  background:
    linear-gradient(180deg, rgba(10, 14, 19, .95), rgba(10, 14, 19, .95)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 1px, transparent 1px 18px),
    var(--catalog-bg);
}

body[data-theme="automotriz"] .container.py-4 {
  max-width: 1320px;
}

body[data-theme="automotriz"] .navbar {
  background: rgba(14, 18, 24, .92) !important;
  border-bottom: 2px solid rgba(var(--primary-rgb), .45);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .32);
}

body[data-theme="automotriz"] #selectedSucursalInfo small,
body[data-theme="automotriz"] #selectedSucursalInfo strong {
  color: #d1d5db !important;
}

body[data-theme="automotriz"] .hero-with-filters {
  border-radius: 16px;
  border: 1px solid var(--auto-stroke);
  box-shadow: var(--auto-shadow);
  background: linear-gradient(180deg, #121821, #151b24);
}

body[data-theme="automotriz"] #heroCarousel,
body[data-theme="automotriz"] #heroCarousel .carousel-inner {
  border-radius: 16px 16px 0 0 !important;
}

body[data-theme="automotriz"] #heroCarousel .hero-banner::before {
  background:
    linear-gradient(90deg, rgba(8, 12, 16, .66) 0%, rgba(8, 12, 16, .25) 60%, rgba(8, 12, 16, .62) 100%),
    linear-gradient(180deg, rgba(8, 12, 16, .22), rgba(8, 12, 16, .44));
}

body[data-theme="automotriz"] #heroCarousel .hero-content {
  width: min(92%, 900px);
  align-items: flex-start;
  text-align: left;
  background: linear-gradient(135deg, rgba(8, 12, 16, .62), rgba(8, 12, 16, .34));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}

body[data-theme="automotriz"] #heroCarousel .hero-content h1 {
  font-family: "Rajdhani", "Barlow", sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
}

body[data-theme="automotriz"] #stickyFilters .category-sticky {
  background: rgba(18, 24, 33, .95);
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(var(--primary-rgb), .34);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}

body[data-theme="automotriz"] .category-brand,
body[data-theme="automotriz"] .search-toggle {
  background: #10161d;
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .26);
}

body[data-theme="automotriz"] .category-pill {
  background: #111720;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .26);
  font-family: "Rajdhani", "Barlow", sans-serif;
  font-weight: 700;
}

body[data-theme="automotriz"] .category-pill.active {
  border-color: rgba(var(--primary-rgb), .65);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), .22), rgba(17, 24, 32, .95));
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .24);
}

body[data-theme="automotriz"] .category-pill.active::after {
  background: linear-gradient(90deg, var(--auto-accent), var(--auto-accent-2));
}

body[data-theme="automotriz"] .category-search-input input,
body[data-theme="automotriz"] .pro-input {
  background: #0f151d;
  border-color: rgba(255, 255, 255, .2);
  color: #f3f4f6;
}

body[data-theme="automotriz"] .category-search-input input::placeholder,
body[data-theme="automotriz"] .pro-input::placeholder {
  color: rgba(209, 213, 219, .72);
}

body[data-theme="automotriz"] .pro-input:focus,
body[data-theme="automotriz"] .category-search-input input:focus {
  border-color: rgba(var(--primary-rgb), .68);
  box-shadow: 0 12px 22px rgba(var(--primary-rgb), .18);
}

body[data-theme="automotriz"] #productsGrid .product-card {
  border-radius: 14px;
  border: 1px solid var(--auto-stroke);
  background: linear-gradient(180deg, #151c25 0%, #121821 100%);
  box-shadow: var(--auto-shadow);
}

body[data-theme="automotriz"] #productsGrid .product-card:hover {
  border-color: rgba(var(--primary-rgb), .52);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .36);
}

body[data-theme="automotriz"] .product-image-wrapper {
  background: #0f141b;
}

body[data-theme="automotriz"] .product-card .card-title {
  color: #f3f4f6;
  font-family: "Rajdhani", "Barlow", sans-serif;
  font-size: 1.12rem;
  text-transform: uppercase;
}

body[data-theme="automotriz"] .product-summary {
  color: #c3c8d0;
}

body[data-theme="automotriz"] .price,
body[data-theme="automotriz"] .price-old {
  color: #f9fafb;
}

body[data-theme="automotriz"] .price-old {
  color: rgba(209, 213, 219, .66);
}

body[data-theme="automotriz"] .badge-preparado {
  background: rgba(11, 15, 20, .84);
  border-color: rgba(var(--primary-rgb), .45);
  color: var(--primary);
}

body[data-theme="automotriz"] .btn-primary,
body[data-theme="automotriz"] .btn-pro,
body[data-theme="automotriz"] .qty-controls .btn-increase {
  background: var(--primary) !important;
  border-color: rgba(var(--primary-rgb), .72) !important;
  color: var(--on-primary) !important;
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), .24);
}

body[data-theme="automotriz"] .btn-outline-primary,
body[data-theme="automotriz"] .qty-controls .btn-decrease {
  border-color: rgba(255, 255, 255, .28);
  color: #f3f4f6;
  background: rgba(13, 18, 24, .62);
}

body[data-theme="automotriz"] .btn-detail {
  background: #0f141b;
  border-color: rgba(255, 255, 255, .18);
}

body[data-theme="automotriz"] .btn-detail .material-symbols-rounded {
  color: #f3f4f6;
}

body[data-theme="automotriz"] .checkout-slide,
body[data-theme="automotriz"] .modal-content {
  background: linear-gradient(180deg, #171d24, #111720);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, .14);
}

@media (max-width: 768px) {
  body[data-theme="automotriz"] .hero-with-filters,
  body[data-theme="automotriz"] #heroCarousel,
  body[data-theme="automotriz"] #heroCarousel .carousel-inner {
    border-radius: 14px 14px 0 0 !important;
  }
  body[data-theme="automotriz"] #heroCarousel .hero-content {
    padding: .8rem .85rem;
    border-radius: 12px;
  }
  body[data-theme="automotriz"] #heroCarousel .hero-content h1 {
    font-size: clamp(1.14rem, 5.5vw, 1.8rem);
  }
}

body[data-theme="hogar"] .card,
body[data-theme="hogar"] .product-card {
  border-radius: 14px;
}

body[data-theme="petshop"] .btn-primary,
body[data-theme="petshop"] .btn-pro {
  border-radius: 999px;
}

body[data-theme="libreria"] .navbar {
  border-bottom: 2px solid rgba(120, 53, 15, .2);
}

body[data-theme="minimarket"] .navbar {
  border-bottom: 2px solid rgba(77, 124, 15, .2);
}
