:root {
  --store-bg: #f3f5f9;
  --store-surface: #ffffff;
  --store-text: #111827;
  --store-muted: #4b5563;
  --store-primary: #0f4c81;
  --store-primary-dark: #0b3a63;
  --store-accent: #ea580c;
  --store-border: #d6dde8;
  --store-danger: #d73f3f;
  --store-success: #1f7a4a;
  --store-info: #0f4c81;
  --store-subtle: #eef2f7;
  --store-subtle-2: #e7edf6;
  --store-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
}

body {
  font-family: "Montserrat", "Segoe UI", Tahoma, sans-serif;
  background: radial-gradient(circle at top right, #eaf2fb 0%, var(--store-bg) 35%, var(--store-bg) 100%);
  color: var(--store-text);
}

a {
  color: var(--store-primary);
  text-decoration: none;
}

a:visited {
  color: var(--store-primary-dark);
}

a:hover {
  color: var(--store-primary-dark);
}

.store-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

#info {
  scroll-margin-top: 150px;
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--store-border);
}

.store-header .logo {
  max-height: 52px;
  width: auto;
}

.store-btn {
  border-radius: 10px;
  border: 1px solid var(--store-border);
  background: #fff;
  color: var(--store-text);
  font-weight: 600;
  padding: 0.5rem 0.8rem;
}

.store-btn:hover {
  border-color: var(--store-primary);
  background: var(--store-subtle);
  color: var(--store-primary-dark);
}

.cart-counter {
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--store-danger);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.search-panel {
  display: none;
  padding: 0.9rem;
  border-bottom: 1px solid var(--store-border);
  background: #fff;
}

.home-hero {
  background: linear-gradient(120deg, #0f4c81 0%, #1764a7 55%, #2b7fc8 100%);
  border-radius: 12px;
  color: #fff;
  padding: 2rem;
  box-shadow: var(--store-shadow);
}

.home-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.home-hero p {
  color: #e8f2ff;
  margin-bottom: 1.25rem;
}

.quick-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.quick-point {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
}

.top-categories {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 10px;
  padding: 0.8rem;
  box-shadow: var(--store-shadow);
}

.top-categories .nav-link {
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--store-border);
  color: var(--store-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.top-categories .nav-link:hover {
  border-color: var(--store-primary);
  background: var(--store-subtle);
  color: var(--store-primary);
}

.sidebar-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 10px;
  box-shadow: var(--store-shadow);
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 126px);
  overflow: auto;
}

.sidebar-title {
  font-weight: 800;
  margin: 0;
}

.category-tree,
.category-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-tree li {
  margin: 0.15rem 0;
}

.category-tree a {
  display: block;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  color: var(--store-text);
  border: 1px solid transparent;
}

.category-tree a:hover {
  background: var(--store-subtle);
  border-color: var(--store-border);
  color: var(--store-primary);
}

.category-tree a.is-active {
  background: var(--store-primary);
  border-color: var(--store-primary-dark);
  color: #ffffff !important;
}

.category-tree .depth-1 a { padding-left: 1.2rem; }
.category-tree .depth-2 a { padding-left: 1.8rem; }
.category-tree .depth-3 a { padding-left: 2.4rem; }

.section-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.product-card {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--store-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-media {
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--store-border);
}

.product-media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.product-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-grow: 1;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  min-height: 2.75rem;
}

.product-meta {
  color: var(--store-muted);
  font-size: 0.85rem;
}

.price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--store-primary);
}

.price-offer {
  color: var(--store-danger);
}

.store-cta {
  border: 0;
  background: linear-gradient(120deg, var(--store-primary) 0%, #1e5f98 100%);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.55rem 0.75rem;
  letter-spacing: 0.01em;
}

.store-cta:hover {
  opacity: 0.92;
  color: #fff;
}

.store-cta,
a.store-cta,
a.store-cta:link,
a.store-cta:visited,
a.store-cta:hover,
a.store-cta:focus {
  color: #ffffff !important;
}

.product-body .store-cta {
  margin-top: auto !important;
}

.product-detail {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 10px;
  box-shadow: var(--store-shadow);
  padding: 1.25rem;
}

.product-detail h1 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
}

.product-image-main {
  border: 1px solid var(--store-border);
  border-radius: 10px;
  background: #fff;
  padding: 1rem;
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.thumb-strip img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--store-border);
  border-radius: 8px;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-list li {
  border-bottom: 1px dashed var(--store-border);
  padding: 0.42rem 0;
  font-size: 0.95rem;
}

.footer-wrap {
  margin-top: 2.2rem;
  background: #111827;
  color: #cbd5e1;
  border-radius: 10px 10px 0 0;
  padding: 1.5rem;
}

.footer-wrap h2 {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

.footer-wrap a {
  color: #cbd5e1;
}

.footer-wrap a:hover {
  color: #fff;
}

.redes_sociales {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.red_social {
  font-size: 1.2rem;
}

/* Utilities sin inline styles */
.is-hidden {
  display: none !important;
}

.total-strong {
  font-weight: 700;
}

.checkout-panel {
  background-color: var(--store-subtle);
}

.checkout-panel-padded {
  padding: 20px;
}

.select-lang-wide {
  width: 350px;
  max-width: 100%;
}

.icon-arrow-nav {
  font-size: 60px;
  color: var(--store-primary);
}

/* Unificacion de paleta y contraste para elementos legacy */
.btn-info,
.btn-primary {
  background-color: var(--store-info) !important;
  border-color: var(--store-info) !important;
  color: #ffffff !important;
}

.btn-info:hover,
.btn-primary:hover {
  background-color: var(--store-primary-dark) !important;
  border-color: var(--store-primary-dark) !important;
}

.btn-success {
  background-color: var(--store-success) !important;
  border-color: var(--store-success) !important;
}

.btn-success:hover {
  filter: brightness(0.94);
}

.btn-light {
  border-color: var(--store-border) !important;
  color: var(--store-text) !important;
}

.caption,
.x-cat,
.x-tit-destacados,
.x-tit-novedades,
.x-tit-resultado {
  background-color: var(--store-primary) !important;
  color: #ffffff !important;
}

.x-item-cat-vertical,
.element_categorias,
.p-articulo-nombre,
.p-articulo-pv2,
.x-articulo_pv2,
.icono-blue,
.burger-icon {
  color: var(--store-primary) !important;
}

.contorno {
  border: 1px solid var(--store-border) !important;
  box-shadow: var(--store-shadow) !important;
  border-radius: 10px !important;
  background: var(--store-surface);
}

.tab {
  border-color: var(--store-border) !important;
  background-color: var(--store-subtle) !important;
}

.tab button:hover {
  background-color: var(--store-subtle-2) !important;
}

.tab button.active {
  background-color: #dbe6f5 !important;
}

.c-obs,
.product_info_descripcion {
  border-color: var(--store-border) !important;
  background: var(--store-subtle) !important;
}

/* Breadcrumb/category title */
.x-tit-categoria {
  background: transparent !important;
  border: 0 !important;
  margin: 0;
  padding: 0;
  display: inline;
}

.x-tit-categoria a {
  color: var(--store-primary-dark);
}

.x-tit-cat-element {
  display: inline-block;
  background: var(--store-subtle) !important;
  color: var(--store-primary-dark) !important;
  border: 1px solid var(--store-border);
  border-radius: 6px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.2rem 0.45rem;
  margin: 0 0.3rem 0.25rem 0;
}

.x-tit-cat-current {
  background: var(--store-primary) !important;
  color: #ffffff !important;
  border-color: var(--store-primary-dark);
}

.store-breadcrumbs {
  position: sticky;
  top: 74px;
  z-index: 1030;
  background: rgba(243, 245, 249, 0.98);
  border: 1px solid var(--store-border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
}

@media (max-width: 991.98px) {
  #info {
    scroll-margin-top: 132px;
  }

  .sidebar-card {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .home-hero {
    padding: 1.25rem;
  }

  .product-title {
    min-height: auto;
  }

  .store-breadcrumbs {
    top: 68px;
  }
}
