/* ═══════════════════════════════════════════════
   TIENDA — CAPO'S LUXURY
   css/tienda.css  |  Desktop-First · Luxury E-Commerce
   ═══════════════════════════════════════════════ */

/* ══ VARIABLES ══════════════════════════════════ */
:root {
  --gold:        #d4af37;
  --gold-light:  #e6c355;
  --gold-dark:   #b8891b;
  --dark:        #110d07;
  --dark-2:      #1e1610;
  --cream:       #faf6f0;
  --cream-2:     #f2ebe0;
  --text:        #2c1f0e;
  --muted:       #8a7a68;
  --border:      #e5ddd2;
  --r-card:      8px;
  --ease:        cubic-bezier(.4,0,.2,1);
  --sidebar-width: 280px;
  --max-width:   1440px;
}

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

body {
  font-family: var(--font-body);
  background: #fff;
  color: var(--text);
  line-height: var(--lh-body);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color .2s ease, transform .2s ease;
}

/* ══ LAYOUT PRINCIPAL ═══════════════════════════ */
.tienda-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  min-height: 100vh;
}

/* ══ SIDEBAR ════════════════════════════════════ */
.tienda-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  padding-right: 32px;
  border-right: 1px solid var(--border);
}

.sidebar-block {
  margin-bottom: 40px;
}

.sidebar-block:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  font-size: var(--fs-small);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 4px;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-link:hover {
  color: var(--gold);
  background: var(--cream-2);
  padding-left: 18px;
}

.sidebar-link.active {
  color: var(--gold);
  background: var(--cream);
  font-weight: 600;
  padding-left: 18px;
}

/* Marcas en sidebar */
.brand-list-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-mini-link {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  transition: all .2s ease;
}

.brand-mini-link:hover {
  color: var(--gold);
  padding-left: 8px;
}

/* ══ CONTENIDO PRINCIPAL ════════════════════════ */
.tienda-main {
  min-width: 0;
}

/* Breadcrumb */
.breadcrumb-lux {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb-lux a {
  color: var(--text);
  transition: color .2s;
}

.breadcrumb-lux a:hover {
  color: var(--gold);
}

.breadcrumb-lux .sep {
  color: var(--border);
}

.breadcrumb-lux .current {
  color: var(--gold);
  font-weight: 500;
}

/* Header de contenido */
.content-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.page-title span {
  color: var(--gold);
  font-style: italic;
}

.count-badge {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ══ GRID DE PRODUCTOS ══════════════════════════ */
.products-grid-lux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: all .3s ease;
}

.product-item:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  transform: translateY(-6px);
  border-color: var(--gold-light);
}

.item-img-link {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream-2);
}

.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,13,7,.3) 0%, transparent 40%);
  opacity: 0;
  transition: opacity .3s ease;
}

.product-item:hover .img-overlay {
  opacity: 1;
}

.item-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.product-item:hover .item-img-link img {
  transform: scale(1.08);
}

.item-details {
  padding: 20px;
}

.item-brand {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.item-name {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 10px 0;
  line-height: 1.5;
  font-weight: 500;
}

.item-name a {
  color: inherit;
  transition: color .2s;
}

.item-name a:hover {
  color: var(--gold);
}

.item-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
}

.item-actions {
  margin-top: 16px;
}

.btn-view-more {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border: 1px solid var(--primary);
  border-radius: var(--btn-radius);
  transition: var(--transition);
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.btn-view-more:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

/* ══ MARCAS EN CÍRCULOS ═════════════════════════ */
.brand-circle-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.brand-circle-card {
  flex: 0 1 240px; /* Ancho flexible pero con base de 240px */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 32px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all .3s ease;
  background: #fff;
}

.brand-circle-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(184,149,58,.15);
}

.brand-logo-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.brand-initial {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
}

.brand-circle-name {
  font-size: 14px;
  color: #000; /* Color negro */
  text-align: center;
  font-weight: 400; /* Quitado strong/negrita */
}

/* ══ ESTADO VACÍO ═══════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 100px 40px;
  color: var(--muted);
  background: var(--cream);
  border-radius: var(--r-card);
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 24px;
}

.btn-primary-lux {
  display: inline-block;
  padding: 14px 36px;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: background .2s;
}

.btn-primary-lux:hover {
  background: var(--gold-dark);
}

/* ══ BOTÓN VOLVER ═══════════════════════════════ */
.back-to-brands {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  margin-bottom: 32px;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  transition: all .2s ease;
}

.back-to-brands svg {
  width: 18px;
  height: 18px;
}

.back-to-brands:hover {
  background: var(--gold);
  color: #fff;
}

/* ══ RESPONSIVE DESKTOP ═════════════════════════ */
@media (min-width: 1440px) {
  .products-grid-lux {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .brand-circle-grid {
    gap: 24px;
  }
}

@media (max-width: 1200px) {
  .products-grid-lux {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .brand-circle-grid {
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .tienda-layout {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }
  
  .products-grid-lux {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tienda-layout {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }
  
  .tienda-sidebar {
    display: none;
  }
  
  .products-grid-lux {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .brand-circle-grid {
    gap: 16px;
  }
  
  .page-title {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .products-grid-lux {
    grid-template-columns: 1fr;
  }
  
  .brand-circle-grid {
    gap: 12px;
  }
  
  .brand-circle-card {
    flex: 0 1 calc(50% - 12px); /* Dos por fila en móviles pequeños */
    padding: 20px 10px;
  }
}

/* ══ ACCESIBILIDAD ══════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}