/* ============================================================
   MERCADOMUEBLES — Tienda CSS
   Paleta: Navy #1B2E5E | Burgundy #8B2035 | Crema #F8F5F0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
  --navy:      #1B2E5E;
  --navy-dark: #111E40;
  --burgundy:  #8B2035;
  --burg-lt:   #A8263F;
  --cream:     #F8F5F0;
  --gray-100:  #F3F4F6;
  --gray-200:  #E5E7EB;
  --gray-500:  #6B7280;
  --gray-800:  #1F2937;
  --green:     #10B981;
  --orange:    #F59E0B;
  --radius:    12px;
  --shadow:    0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-800);
  background: var(--cream);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── HEADER ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.site-logo img { height: 64px; max-height: 64px; width: auto; margin-right: 8px; }

.site-nav {
  display: flex;
  gap: 32px;
  flex: 1;
}

.site-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.2px;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--burgundy); }

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

.header-search {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
}

.header-search input {
  border: none;
  background: none;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 180px;
  outline: none;
}

.header-search button {
  background: none;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.cart-btn:hover { background: var(--burgundy); }

.cart-count {
  background: var(--burgundy);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ── SLIDER ── */
.slider {
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
}

.slide { display: none; }
.slide.active { display: block; }

.slide-placeholder {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #2A3F7A 100%);
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
}

.slide-placeholder::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,32,53,0.2) 0%, transparent 70%);
}

.slide-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.slide-badge {
  display: inline-block;
  background: rgba(139,32,53,0.3);
  border: 1px solid rgba(139,32,53,0.5);
  color: #F4A0B0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.slide-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.slide-content h1 em {
  font-style: normal;
  color: #F4A0B0;
}

.slide-content p {
  color: rgba(255,255,255,0.75);
  font-size: 17px;
  margin-bottom: 32px;
}

.slide-ctas { display: flex; gap: 12px; }

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 78px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,0.3); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}

/* ── BOTONES ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(139,32,53,0.3);
}

.btn-primary:hover {
  background: var(--burg-lt);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,32,53,0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ── LAYOUT MAIN ── */
.main-layout {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── SIDEBAR ── */
.sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 20px;
}

.filter-section h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-800);
  user-select: none;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--gray-100);
  border-color: var(--gray-500);
}

.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}

.filter-chip input { display: none; }

.filter-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0;
}

.clear-filters {
  width: 100%;
  padding: 9px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

/* ── PRODUCTS AREA ── */
.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.products-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--navy);
}

.products-header h2 span {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 400;
  margin-left: 8px;
}

.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  background: #fff;
  cursor: pointer;
}

.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(27,46,94,0.1);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(27,46,94,0.1);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.active-filter-tag a { color: var(--burgundy); font-weight: 700; }

.active-filter-clear {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--burgundy);
  background: rgba(139,32,53,0.08);
  text-decoration: none;
  transition: background 0.2s;
}
.active-filter-clear:hover { background: rgba(139,32,53,0.16); }

/* ── GRILLA PRODUCTOS ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(27,46,94,0.15);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-conjunto {
  background: var(--navy);
  color: #fff;
}

.product-img-link { display: block; }

.product-img {
  background: var(--gray-100);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

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

.product-price-block { margin-top: auto; }

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.product-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--gray-100);
  color: var(--gray-500);
  letter-spacing: 0.3px;
}

.tag-espuma  { background: rgba(16,185,129,0.1);  color: #059669; }
.tag-resortes { background: rgba(27,46,94,0.1); color: var(--navy); }
.tag-box     { background: rgba(245,158,11,0.1);  color: #D97706; }
.tag-almohadas { background: rgba(139,32,53,0.1); color: var(--burgundy); }

.product-name {
  flex: 1;
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  line-height: 1.4;
  transition: color 0.2s;
}

.product-name:hover { color: var(--navy); }

.product-medida {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stock-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gray-500);
}

.stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-dot.ok  { background: var(--green); }
.stock-dot.low { background: var(--orange); }
.stock-dot.out { background: #EF4444; }

.btn-add {
  padding: 8px 14px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-add:hover { background: var(--burgundy); }
.btn-sin-stock { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }

/* ── PAGINACIÓN ── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  transition: all 0.15s;
  background: #fff;
}

.page-btn:hover, .page-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ── NO RESULTADOS ── */
.no-resultados {
  text-align: center;
  padding: 64px 24px;
  color: var(--gray-500);
}

.no-resultados p { margin-bottom: 20px; font-size: 16px; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 13px;
  color: var(--gray-500);
  padding: 16px 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a { color: var(--navy); }
.breadcrumb a:hover { color: var(--burgundy); }

/* ── DETALLE ── */
.detalle-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.detalle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 24px;
  margin-bottom: 48px;
}

.detalle-imagen .img-principal {
  background: #fff;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  cursor: zoom-in;
  position: relative;
}

.detalle-imagen .img-principal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.detalle-imagen .img-principal:hover img {
  transform: scale(1.04);
}

.zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 11px;
  color: var(--gray-500);
  background: rgba(255,255,255,0.85);
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.detalle-imagen .img-principal:hover .zoom-hint {
  opacity: 1;
}

.detalle-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.detalle-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 8px;
}

.detalle-medida {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.detalle-precio {
  margin-bottom: 24px;
}

.precio-grande {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}

.precio-cuota {
  font-size: 13px;
  color: var(--gray-500);
}

.medidas-section, .tipo-section {
  margin-bottom: 20px;
}

.medidas-section h4, .tipo-section h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.medidas-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.medida-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  transition: all 0.15s;
  background: #fff;
}

.medida-btn small {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 400;
  margin-top: 2px;
}

.medida-btn:hover, .medida-btn.active {
  border-color: var(--navy);
  background: rgba(27,46,94,0.06);
  color: var(--navy);
}

.tipo-grid {
  display: flex;
  gap: 10px;
}

.tipo-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  transition: all 0.15s;
  background: #fff;
}

.tipo-btn:hover, .tipo-btn.active {
  border-color: var(--navy);
  background: rgba(27,46,94,0.06);
  color: var(--navy);
  font-weight: 600;
}

.detalle-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.detalle-acciones {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.qty-selector button {
  width: 38px;
  height: 46px;
  background: var(--gray-100);
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}

.qty-selector button:hover { background: var(--gray-200); }

.qty-selector span {
  width: 44px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.btn-agregar-grande {
  flex: 1;
  padding: 14px 28px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-agregar-grande:hover { background: var(--burgundy); }

.detalle-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: 10px;
  font-size: 13px;
  color: var(--gray-500);
}

.detalle-descripcion {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--gray-200);
}

.detalle-descripcion h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 16px;
}

.detalle-descripcion p { margin-bottom: 16px; color: var(--gray-500); }
.detalle-descripcion ul { padding-left: 20px; color: var(--gray-500); }
.detalle-descripcion li { margin-bottom: 6px; }

/* ── CARRITO ── */
.carrito-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.carrito-container h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 24px;
}

.carrito-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.carrito-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.carrito-item {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
}

.carrito-img {
  background: var(--gray-100);
  border-radius: 8px;
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carrito-img img { width: 100%; object-fit: contain; padding: 8px; }

.carrito-item-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.carrito-item-precio { font-size: 13px; color: var(--gray-500); }
.carrito-item-qty    { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

.total-item {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
  margin-bottom: 8px;
}

.btn-eliminar {
  background: none;
  border: none;
  color: var(--burgundy);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}

.carrito-resumen {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 24px;
  position: sticky;
  top: 80px;
}

.carrito-resumen h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 20px;
}

.resumen-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.resumen-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.resumen-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 12px 0;
}

.btn-checkout {
  width: 100%;
  padding: 15px;
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 16px;
  margin-bottom: 12px;
}

.btn-checkout:hover { background: var(--burg-lt); }

.btn-seguir {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 16px;
}

.resumen-trust {
  font-size: 12px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
}

.resumen-trust p { margin-bottom: 4px; }

.carrito-vacio {
  text-align: center;
  padding: 80px 24px;
}

.carrito-vacio-icon { font-size: 64px; margin-bottom: 20px; }
.carrito-vacio h2 { font-family: 'Playfair Display', serif; color: var(--navy); margin-bottom: 12px; }
.carrito-vacio p { color: var(--gray-500); margin-bottom: 24px; }

/* ── PAGO ── */
.pago-container {
  max-width: 560px;
  margin: 64px auto;
  padding: 0 24px;
}

.pago-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.pago-icon { font-size: 56px; margin-bottom: 20px; }
.pago-card h1 { font-family: 'Playfair Display', serif; color: var(--navy); margin-bottom: 12px; }
.pago-card p { color: var(--gray-500); margin-bottom: 16px; }
.pago-ref { font-size: 13px; color: var(--gray-500); background: var(--gray-100); padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; }
.pago-info { font-size: 14px; }

.pago-acciones {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pago-exito   { border-top: 4px solid var(--green); }
.pago-pendiente { border-top: 4px solid var(--orange); }
.pago-error   { border-top: 4px solid #EF4444; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-dark);
  color: #fff;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
}

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

/* ── FOOTER ── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  margin-top: 64px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  transition: color 0.2s;
}

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

.footer-col p { font-size: 13px; line-height: 1.6; margin-bottom: 16px; }

.footer-wa {
  display: inline-block;
  background: #25D366;
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s !important;
}

.footer-wa:hover { background: #1FB855 !important; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .detalle-grid { grid-template-columns: 1fr; }
  .carrito-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .slide-content h1 { font-size: 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .header-search { display: none; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .trust-bar { gap: 16px; font-size: 12px; }
}

/* ── GALERÍA MINIATURAS ── */
.img-miniaturas {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.miniatura {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 2px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
  background: var(--gray-100);
}

.miniatura img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.miniatura:hover,
.miniatura.active {
  border-color: var(--navy);
}

/* ── FLECHITAS GALERÍA ── */
.product-img { position: relative; }

.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s;
}

.product-card:hover .card-arrow { opacity: 1; }
.card-arrow.prev { left: 6px; }
.card-arrow.next { right: 6px; }
.card-arrow:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

/* Flechitas detalle */
.detalle-imagen { position: relative; }

.detalle-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s;
}

.detalle-imagen:hover .detalle-arrow { opacity: 1; }
.detalle-arrow.prev { left: 10px; }
.detalle-arrow.next { right: 10px; }
.detalle-arrow:hover { background: #fff; }

/* Dots indicadores */
.img-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.img-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gray-300);
  cursor: pointer;
  transition: background 0.2s;
}
.img-dot.active { background: var(--navy); }

/* ── SIN STOCK ── */
.medida-btn.sin-stock {
  opacity: 0.45;
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: default;
  position: relative;
  text-decoration: line-through;
}

.medida-btn.sin-stock:hover {
  border-color: var(--gray-200);
  background: var(--gray-100);
}

.medida-sin-stock-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.product-card.sin-stock {
  opacity: 0.6;
}

.product-card.sin-stock .product-img {
  filter: grayscale(40%);
}

/* ── WHATSAPP FLOTANTE ── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,211,102,0.55);
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ── ENVÍO EN CARRITO ── */
.envio-gratis {
  color: #2e7d32;
  font-weight: 700;
}
.envio-paid {
  color: var(--gray-500);
  font-size: 12px;
  text-align: right;
  max-width: 160px;
}
.envio-badge {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
  text-align: center;
}
.envio-badge.envio-badge-info {
  background: #e3f2fd;
  color: #1565c0;
}

/* ── CARRITO MEJORAS ─────────────────────────────────────────────── */
.carrito-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.carrito-item-count { color: #888; font-size: 14px; }
.btn-vaciar {
  background: none;
  border: 1px solid #ccc;
  color: #888;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-vaciar:hover { border-color: #c0392b; color: #c0392b; }

/* Controles qty en carrito */
.carrito-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.qty-btn-sm {
  width: 26px; height: 26px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn-sm:hover { border-color: #8B0000; color: #8B0000; }
.qty-num-sm { font-weight: 600; min-width: 20px; text-align: center; }

/* Controles qty en home card */
.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 28px; height: 28px;
  border: 1.5px solid #8B0000;
  background: #fff;
  color: #8B0000;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #8B0000; color: #fff; }
.qty-num { font-weight: 700; min-width: 22px; text-align: center; font-size: 15px; }

/* Botón "En carrito" */
.btn-en-carrito {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
  border: 1.5px solid #2e7d32 !important;
  cursor: default !important;
  font-size: 12px !important;
}

/* ═══════════════════════════════════════════════════════
   MOBILE IMPROVEMENTS
   ═══════════════════════════════════════════════════════ */

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Mobile nav drawer ── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  pointer-events: none;
}
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-nav-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  padding: 24px 20px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { visibility: visible; pointer-events: auto; }
.mobile-nav.open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }
.mobile-nav-drawer a {
  display: block;
  padding: 12px 16px;
  color: var(--navy);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
}
.mobile-nav-drawer a:hover { background: var(--gray-100); }
.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy);
  margin-bottom: 8px;
}
.mobile-search {
  display: none;
  padding: 0 16px 10px;
  background: #fff;
}
.mobile-search form {
  display: flex;
  gap: 8px;
}
.mobile-search input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  font-size: 0.9rem;
}
.mobile-search button {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  cursor: pointer;
}

/* ── Filtros colapsables en mobile ── */
.filtros-toggle {
  display: none;
  width: 100%;
  padding: 11px 16px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(27,46,94,0.2);
}
.filtros-toggle:active { background: var(--navy-dark); }
.filtros-toggle-arrow { transition: transform 0.3s; }
.filtros-toggle.open .filtros-toggle-arrow { transform: rotate(180deg); }

/* ── Carrusel touch-swipeable ── */
.carousel-track-outer {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel-track-outer::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex;
  gap: 16px;
  transition: none;
  width: max-content;
}
.carousel-track .product-card {
  flex: 0 0 280px;
  min-width: 280px;
}

@media (max-width: 768px) {
  /* Header mobile */
  .hamburger { display: flex; }
  .site-nav { display: none !important; }
  .header-search { display: none !important; }
  .mobile-search { display: block; }
  .header-inner { gap: 0; justify-content: space-between; }

  /* Filtros colapsables - el botón toggle siempre visible */
  .filtros-toggle { display: flex; }
  .sidebar {
    position: static !important;
    padding: 0;
  }
  /* Ocultar todo EXCEPTO el botón toggle */
  .sidebar > *:not(.filtros-toggle) { display: none; }
  .sidebar.open > *:not(.filtros-toggle) { display: block; }
  .sidebar h3 { display: none !important; }
  /* En mobile open: chips en horizontal wrap */
  .sidebar.open .filter-options {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 4px;
  }
  .sidebar.open .filter-chip {
    padding: 5px 12px;
    font-size: 12px;
  }
  .sidebar.open {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    padding: 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 8px;
  }
  .sidebar.open .filter-divider { margin: 10px 0; }
  .sidebar.open .filter-section h4 { margin-bottom: 8px; }

  /* Cards catálogo: footer en columna para que no se corte el botón */
  .product-footer {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .product-footer .btn-add,
  .product-footer .btn-sin-stock,
  .product-footer .btn-en-carrito {
    width: 100% !important;
    text-align: center !important;
  }
  .qty-control {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Cards carrusel en mobile */
  .carousel-track .product-card {
    flex: 0 0 75vw;
    min-width: 75vw;
  }

  /* Cat cards: 1 columna */
  .cat-section { grid-template-columns: 1fr !important; }
  .cat-card { height: 180px !important; }

  /* Trust banner: 2 columnas */
  .trust-banner-inner { grid-template-columns: repeat(2,1fr) !important; }

  /* Carrito mobile - stack vertical */
  .carrito-grid { grid-template-columns: 1fr !important; }

  /* Detalle mobile */
  .detalle-grid { grid-template-columns: 1fr !important; }
  .detalle-descripcion > div { grid-template-columns: 1fr !important; }

  /* Footer: 1 columna */
  .footer-inner { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  /* Catálogo: 2 columnas ajustadas */
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .product-name { font-size: 0.82rem !important; }
  .product-price { font-size: 1rem !important; }
  
  /* Carrusel más ancho */
  .carousel-track .product-card {
    flex: 0 0 82vw;
    min-width: 82vw;
  }

  /* Padding derecho en el track para que el último item no quede pegado */
  .carousel-track { padding-right: 16px; }
}
