/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --primary:       #1e293b;
  --primary-light: #334155;
  --accent:        #16a34a;
  --accent-hover:  #15803d;
  --danger:        #dc2626;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --bg:            #f8fafc;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 30px rgba(0,0,0,.14);
  --radius:        10px;
  --radius-sm:     6px;
  --transition:    .2s ease;
  --header-h:      64px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══════════════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 24px;
}
.site-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: var(--accent); }

/* Search */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 14px;
  border: none;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  color: var(--white);
  font-size: .9rem;
  transition: background var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,.55); }
.header-search input:focus {
  outline: none;
  background: rgba(255,255,255,.2);
}
.header-search button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  padding: 0;
}
.header-search button:hover { color: var(--white); }

/* Nav */
.header-nav { display: flex; gap: 4px; }
.header-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.header-nav a:hover, .header-nav a.active { color: var(--white); background: rgba(255,255,255,.12); }

/* Cart & actions */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.btn-account {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}
.btn-account:hover { background: rgba(255,255,255,.15); border-color: var(--white); }
.btn-account span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn-cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--accent);
  color: var(--white);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-cart:hover { background: var(--accent-hover); }
.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--danger);
  color: var(--white);
  border-radius: 9px;
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  color: var(--white);
}
.btn-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
.btn-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.btn-menu-toggle.open span:nth-child(2) { opacity: 0; }
.btn-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary);
  z-index: 99;
  overflow-y: auto;
  padding: 20px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
  font-size: 1rem;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--white); }

.mobile-nav-section {
  border-bottom: 1px solid rgba(255,255,255,.15);
  padding-bottom: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-account {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 14px !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--white) !important;
  font-weight: 600;
  background: rgba(255,255,255,.07);
  transition: background var(--transition);
}
.mobile-nav-account:hover { background: rgba(255,255,255,.14) !important; }

.mobile-nav-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.4);
  margin-bottom: 4px;
}

/* Ocultar texto del btn-account en pantallas muy pequeñas */
@media (max-width: 480px) {
  .btn-account span { display: none; }
  .btn-account { padding: 7px 10px; }
}

/* ══════════════════════════════════════════════════════════════════════
   PAGE HEADER / BREADCRUMB
══════════════════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.page-hero h1 { font-size: 1.5rem; font-weight: 700; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: .82rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }

/* ══════════════════════════════════════════════════════════════════════
   SHOP LAYOUT
══════════════════════════════════════════════════════════════════════ */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 28px 0 60px;
  align-items: start;
}

/* ── Sidebar ───────────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.sidebar-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sidebar-search { display: flex; gap: 0; }
.sidebar-search input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .875rem;
  outline: none;
  transition: border-color var(--transition);
}
.sidebar-search input:focus { border-color: var(--accent); }
.sidebar-search button {
  padding: 8px 12px;
  background: var(--accent);
  color: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .875rem;
  transition: background var(--transition);
}
.sidebar-search button:hover { background: var(--accent-hover); }

.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.cat-item:hover { background: var(--bg); color: var(--accent); }
.cat-item.active { background: #dcfce7; color: var(--accent); font-weight: 600; }
.cat-count {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 10px;
  padding: 1px 7px;
}
.cat-item.active .cat-count { background: #bbf7d0; color: var(--accent-hover); }

/* Featured in sidebar */
.feat-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.feat-item:last-child { border-bottom: none; padding-bottom: 0; }
.feat-img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.feat-info { flex: 1; min-width: 0; }
.feat-name { font-size: .82rem; font-weight: 500; line-height: 1.3; color: var(--text); display: block; margin-bottom: 4px; }
.feat-name:hover { color: var(--accent); }
.feat-price { font-size: .9rem; font-weight: 700; color: var(--accent); }

/* Mobile filter toggle */
.filter-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  margin-bottom: 16px;
  justify-content: space-between;
  align-items: center;
}
.filter-toggle i { transition: transform var(--transition); }
.filter-toggle.open i { transform: rotate(180deg); }

/* ── Product grid ──────────────────────────────────────────────────── */
.products-area {}
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.sort-count { font-size: .875rem; color: var(--text-muted); }
.sort-count strong { color: var(--text); }
.sort-select {
  padding: 7px 32px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  outline: none;
}

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

/* ── Product card ──────────────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card-img-wrap .img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
}
.product-card:hover .card-img-wrap img { transform: scale(1.04); }
.product-card:hover .img-hover { opacity: 1; }

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-new  { background: #16a34a; color: #fff; }
.badge-out  { background: #64748b; color: #fff; }

.card-quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
  transform: translateY(100%);
  transition: transform var(--transition);
}
.product-card:hover .card-quick-add { transform: translateY(0); }
.btn-quick-add {
  width: 100%;
  padding: 8px;
  background: var(--white);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  transition: background var(--transition), color var(--transition);
}
.btn-quick-add:hover { background: var(--accent); color: var(--white); }

.card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-cat { font-size: .72rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.card-name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-name:hover { color: var(--accent); }
.card-price { margin-top: auto; }
.price-main { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.price-novat { font-size: .75rem; color: var(--text-muted); margin-top: 1px; }

.card-footer {
  padding: 0 16px 14px;
}
.btn-add {
  width: 100%;
  padding: 9px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-add:hover { background: var(--accent); }
.btn-add.disabled { background: var(--border); color: var(--text-muted); pointer-events: none; }

/* ── Empty state ───────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty-state svg { margin: 0 auto 16px; }
.empty-state p { font-size: 1rem; margin-bottom: 20px; }

/* ── Pagination ────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-item {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--text);
  background: var(--white);
  transition: all var(--transition);
  cursor: pointer;
}
.page-item:hover { border-color: var(--accent); color: var(--accent); }
.page-item.active { background: var(--accent); border-color: var(--accent); color: var(--white); font-weight: 700; }
.page-item.disabled { opacity: .4; pointer-events: none; }
.page-item.dots { border: none; background: none; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════════
   PRODUCT DETAIL
══════════════════════════════════════════════════════════════════════ */
.product-detail { padding: 36px 0 60px; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* Gallery */
.product-gallery { position: sticky; top: calc(var(--header-h) + 16px); }
.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; cursor: zoom-in; }
.gallery-main img:hover { transform: scale(1.03); }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
  flex-shrink: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--accent); }

/* Product info */
.product-info {}
.product-cat-link { font-size: .8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 8px; }
.product-cat-link:hover { text-decoration: underline; }
.product-title { font-size: 1.75rem; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.product-price-block { margin-bottom: 16px; }
.product-price-main { font-size: 2rem; font-weight: 800; color: var(--accent); }
.product-price-novat { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }
.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 20px;
}
.stock-status.in  { background: #dcfce7; color: #16a34a; }
.stock-status.out { background: #fee2e2; color: #dc2626; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty-label { font-size: .875rem; font-weight: 600; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-control button {
  width: 36px;
  height: 38px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  transition: background var(--transition);
  border: none;
}
.qty-control button:hover { background: var(--border); }
.qty-control input {
  width: 52px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.btn-add-cart {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
  margin-bottom: 16px;
}
.btn-add-cart:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-add-cart:disabled { background: var(--border); color: var(--text-muted); transform: none; pointer-events: none; }
.product-desc { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.product-desc h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.product-desc p { font-size: .925rem; line-height: 1.8; color: var(--text-muted); }

.product-specs { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.product-specs h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.specs-list { display: flex; flex-direction: column; gap: 0; }
.spec-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .925rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt {
  width: 140px;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text);
}
.spec-row dd { flex: 1; color: var(--text-muted); }

/* Success message */
.alert-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success a { font-weight: 700; text-decoration: underline; }

/* Related */
.related-section { padding: 48px 0; border-top: 1px solid var(--border); margin-top: 48px; }
.section-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 24px; }

/* ══════════════════════════════════════════════════════════════════════
   CART
══════════════════════════════════════════════════════════════════════ */
.cart-page { padding: 36px 0 60px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
}
.cart-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-product-name { font-size: .9rem; font-weight: 600; color: var(--text); }
.cart-product-name:hover { color: var(--accent); }
.cart-price { font-size: 1rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.cart-subtotal { font-size: 1rem; font-weight: 800; white-space: nowrap; }

.qty-mini { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-mini button { width: 30px; height: 30px; background: var(--bg); font-size: 1rem; transition: background var(--transition); }
.qty-mini button:hover { background: var(--border); }
.qty-mini input { width: 40px; height: 30px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: .875rem; font-family: inherit; outline: none; }

.btn-remove {
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.btn-remove:hover { color: var(--danger); background: #fee2e2; }

.cart-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn-outline {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Summary box */
.cart-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.summary-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; font-size: .875rem; margin-bottom: 10px; }
.summary-row.total { font-size: 1.25rem; font-weight: 800; color: var(--accent); border-top: 2px solid var(--border); padding-top: 14px; margin-top: 8px; }
.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-top: 20px;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-checkout:hover { background: var(--accent-hover); }
.secure-note { text-align: center; font-size: .75rem; color: var(--text-muted); margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 4px; }

.cart-empty { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.cart-empty svg { margin: 0 auto 20px; }
.cart-empty p { font-size: 1.1rem; margin-bottom: 24px; }

/* Cart mobile cards */
.cart-mobile { display: none; }
.cart-mobile-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
}
.cart-mobile-body { flex: 1; min-width: 0; }
.cart-mobile-name { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.cart-mobile-price { color: var(--accent); font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.cart-mobile-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ══════════════════════════════════════════════════════════════════════
   AUTH PAGES (login / registro / cuenta)
══════════════════════════════════════════════════════════════════════ */
.auth-page { padding: 48px 0 80px; }
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 40px;
  max-width: 460px;
  margin: 0 auto;
}
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.auth-subtitle { font-size: .875rem; color: var(--text-muted); margin-bottom: 28px; }
.auth-subtitle a { color: var(--accent); font-weight: 600; }
.auth-subtitle a:hover { text-decoration: underline; }

.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.auth-field label { font-size: .85rem; font-weight: 600; }
.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .925rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.auth-field input.error { border-color: var(--danger); }

.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-row .auth-field { min-width: 0; }

.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 8px;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-auth:hover { background: var(--accent-hover); }

.auth-alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-alert.danger { background: #fee2e2; border: 1px solid #fecaca; color: var(--danger); }
.auth-alert.success { background: #dcfce7; border: 1px solid #bbf7d0; color: #15803d; }

.auth-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Account page */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 36px 0 60px; align-items: start; }
.account-nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover { background: var(--bg); color: var(--accent); }
.account-nav a.active { background: #dcfce7; color: var(--accent); font-weight: 700; }
.account-nav a svg { flex-shrink: 0; }

.account-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 20px; }
.account-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.account-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-form-full { grid-column: 1 / -1; }
.account-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.btn-save {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  transition: background var(--transition);
}
.btn-save:hover { background: var(--accent-hover); }

@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-nav { position: static; display: flex; overflow-x: auto; }
  .account-nav a { white-space: nowrap; border-bottom: none; border-right: 1px solid var(--border); }
  .account-nav a:last-child { border-right: none; }
  .auth-card { padding: 28px 20px; }
  .auth-row { grid-template-columns: 1fr; }
  .account-form-grid { grid-template-columns: 1fr; }
  .account-form-full { grid-column: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  padding: 48px 0 0;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-logo span { color: var(--accent); }
.footer-desc { font-size: .875rem; line-height: 1.7; }
.footer-col h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-newsletter { display: flex; gap: 0; margin-top: 4px; }
.footer-newsletter input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-right: none;
  background: rgba(255,255,255,.07);
  color: var(--white);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .875rem;
  outline: none;
}
.footer-newsletter input::placeholder { color: rgba(255,255,255,.35); }
.footer-newsletter input:focus { border-color: var(--accent); }
.footer-newsletter button {
  padding: 9px 16px;
  background: var(--accent);
  color: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .875rem;
  font-weight: 600;
  transition: background var(--transition);
}
.footer-newsletter button:hover { background: var(--accent-hover); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.4); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .header-nav { display: none; }
  .btn-menu-toggle { display: flex; }
}

@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.open { display: block; }
  .filter-toggle { display: flex; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .product-gallery { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 1280px) and (min-width: 641px) {
  .container { padding: 0 40px; }
}
@media (max-width: 1024px) and (min-width: 641px) {
  .product-detail-grid { max-width: 680px; }
  .cart-layout { max-width: 680px; }
}

@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .header-search { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px; }
  .card-footer { padding: 0 12px 12px; }
  .card-name { font-size: .85rem; }
  .price-main { font-size: 1rem; }
  .cart-table { display: none; }
  .cart-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero h1 { font-size: 1.2rem; }
  .product-title { font-size: 1.35rem; }
  .product-price-main { font-size: 1.6rem; }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── Utilities ─────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-auto { margin-top: auto; }
