/* =============================================
   VIRGINIA CIRA - Estilos principales
   Inspirado en Farfetch
   ============================================= */

/* --- VARIABLES (Design Tokens) --- */
:root {
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #FAFAFA;
  --color-text-main: #222222;
  --color-text-muted: #757575;
  --color-border: #E5E5E5;
  --color-accent-gold: #C7B446;
  --color-accent-red: #990000;
  --color-accent-green: #2F3A25;
  --color-success: #4CAF50;
  --color-error: #D32F2F;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 600;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 64px;
  --container-max-width: 1440px;
  --grid-gap-desktop: 24px;
  --grid-gap-mobile: 12px;
  --radius-sm: 0px;
  --radius-md: 2px;
  --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-hover: 0 10px 30px rgba(0,0,0,0.05);
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* --- TIPOGRAFÍA --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-regular);
  letter-spacing: -0.02em;
}
h1 { font-size: 2.2rem; text-transform: uppercase; letter-spacing: 0.08em; }
h2 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-md); }

/* --- BARRA SUPERIOR --- */
.top-bar {
  background-color: var(--color-text-main);
  color: var(--color-bg-primary);
  text-align: center;
  padding: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-heading);
  font-weight: var(--weight-medium);
}

/* --- HEADER --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border);
}

.site-header {
  transition: height 0.3s ease;
}

.header-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  height: 140px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  transition: height 0.3s ease;
}

/* Logo grande a la izquierda */
.logo {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  padding: 12px 0;
  margin-right: auto;
  flex-shrink: 0;
}
.logo-full { height: 100%; width: auto; transition: opacity 0.3s ease; }
.logo-compact { height: 100%; width: auto; position: absolute; left: 0; opacity: 0; transition: opacity 0.3s ease; }

/* Al hacer scroll: header más compacto + cambio de logo */
.site-header.scrolled .header-inner { height: 70px; }
.site-header.scrolled .logo-full { opacity: 0; pointer-events: none; }
.site-header.scrolled .logo-compact { opacity: 1; }

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-text-main);
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-text-main);
  transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: var(--space-md); }

.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--color-text-main);
  color: #fff;
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
}

/* Hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text-main);
  transition: 0.3s;
}

/* --- BOTONES --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-text-main);
  color: var(--color-bg-primary);
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  padding: 16px 32px;
  border: 1px solid var(--color-text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn-primary:hover {
  background-color: var(--color-bg-primary);
  color: var(--color-text-main);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--color-text-main); }

/* --- HERO --- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--color-bg-secondary);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 600px;
  padding: var(--space-lg);
}
.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: var(--space-md);
  letter-spacing: 0.12em;
  font-weight: var(--weight-light);
}
.hero-content p {
  font-size: 1rem;
  margin-bottom: var(--space-xl);
  font-weight: var(--weight-light);
  letter-spacing: 0.05em;
}
.hero .btn-primary {
  background: transparent;
  border-color: #fff;
  color: #fff;
}
.hero .btn-primary:hover {
  background: #fff;
  color: var(--color-text-main);
}

/* --- SECCIONES --- */
.section {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg);
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-header h2 { margin-bottom: var(--space-sm); }
.section-header p { color: var(--color-text-muted); font-size: 0.95rem; }

/* --- GRID DE PRODUCTOS --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap-desktop);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* --- TARJETA DE PRODUCTO --- */
.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--color-bg-secondary);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

/* Efecto hover: mostrar segunda foto */
.product-image-wrapper .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.product-card:hover .img-hover {
  opacity: 1;
}
.product-card:hover .img-main {
  opacity: 0;
}

.product-info { text-align: center; }

.product-brand {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.product-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-main);
  margin-bottom: 8px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: 1rem;
}

/* Badge nuevo/destacado */
.product-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--color-text-main);
  color: #fff;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  z-index: 2;
}

/* --- BANNER SECCIÓN (Novias/Flamenca) --- */
.section-banner {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-bottom: var(--space-xxl);
}
.section-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.section-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}
.section-banner-content {
  position: relative;
  z-index: 2;
  color: #fff;
}
.section-banner-content h2 {
  font-size: 2rem;
  letter-spacing: 0.1em;
  font-weight: var(--weight-light);
  margin-bottom: var(--space-md);
}

/* --- PÁGINA DE PRODUCTO --- */
.product-detail {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxl);
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.product-gallery img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--color-bg-secondary);
}

.product-detail-info {
  position: sticky;
  top: 160px;
  align-self: start;
  padding-top: var(--space-xl);
}
.product-detail-info .product-brand {
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
}
.product-detail-info h1 {
  font-size: 1.6rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--weight-regular);
  margin-bottom: var(--space-md);
}
.product-detail-info .price {
  font-size: 1.4rem;
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-xl);
}
.product-detail-info .description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-xl);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-lg);
}
.product-detail-info .ref {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-detail-info .btn-primary {
  width: 100%;
  margin-bottom: var(--space-md);
}

/* Selector cantidad */
.qty-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.qty-selector button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  background: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-selector input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--color-border);
  padding: 8px;
  font-size: 0.9rem;
  font-family: var(--font-body);
}

/* --- PÁGINA CATEGORÍA/TIENDA --- */
.page-header {
  text-align: center;
  padding: var(--space-xxl) var(--space-lg) var(--space-xl);
  max-width: var(--container-max-width);
  margin: 0 auto;
}
.page-header h1 { margin-bottom: var(--space-sm); }
.page-header p { color: var(--color-text-muted); }

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--container-max-width);
  margin: 0 auto;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}
.filter-bar .count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.filter-bar select {
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: none;
}

/* Colecciones nav */
.collections-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: 0 var(--space-lg);
  flex-wrap: wrap;
}
.collections-nav a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}
.collections-nav a:hover,
.collections-nav a.active {
  background: var(--color-text-main);
  color: #fff;
  border-color: var(--color-text-main);
}

/* --- CARRITO --- */
.cart-page {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}
.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.cart-item img {
  width: 100px;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--color-bg-secondary);
}
.cart-item-info h3 {
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  margin-bottom: 4px;
}
.cart-item-info .ref {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.cart-item-price {
  font-weight: var(--weight-bold);
  text-align: right;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  margin-top: var(--space-sm);
}
.cart-summary {
  padding: var(--space-xl) 0;
  text-align: right;
}
.cart-total {
  font-size: 1.3rem;
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-lg);
}
.cart-empty {
  text-align: center;
  padding: var(--space-xxl);
  color: var(--color-text-muted);
}

/* --- CHECKOUT --- */
.checkout-page {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}
.form-group {
  margin-bottom: var(--space-lg);
}
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-text-main);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* --- ATELIER (About) --- */
.atelier-hero {
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
}
.atelier-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg);
}
.atelier-content p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 2;
  margin-bottom: var(--space-lg);
}

/* Cita previa */
.cita-section {
  background: var(--color-bg-secondary);
  padding: var(--space-xxl) var(--space-lg);
  text-align: center;
}
.cita-section h2 { margin-bottom: var(--space-md); }
.cita-section p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- FOOTER --- */
.site-footer {
  background-color: var(--color-text-main);
  color: var(--color-bg-primary);
  padding: var(--space-xxl) var(--space-lg) var(--space-lg);
}
.footer-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.footer-logo {
  height: 80px;
  width: auto;
  filter: invert(1);
  margin-bottom: var(--space-md);
}
.footer-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}
.footer-col a, .footer-col p {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* --- MENSAJES --- */
.msg-success {
  background: #e8f5e9;
  color: var(--color-success);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  text-align: center;
}
.msg-error {
  background: #fbe9e7;
  color: var(--color-error);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .product-detail { gap: var(--space-xl); }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap-mobile);
    padding: 0 var(--space-sm);
  }

  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 80px var(--space-lg) var(--space-lg);
    gap: 0;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  .main-nav.open { left: 0; }
  .main-nav .nav-link {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-overlay.open { opacity: 1; pointer-events: auto; }

  .logo-full { height: 100%; }
  .logo-compact { height: 100%; }

  .hero-content h1 { font-size: 1.8rem; }
  .hero { height: 60vh; min-height: 400px; }

  .product-detail {
    grid-template-columns: 1fr;
    padding: var(--space-md);
    gap: var(--space-lg);
  }
  .product-detail-info { position: static; }

  .cart-item { grid-template-columns: 80px 1fr; }
  .cart-item-price { grid-column: 2; }

  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .section { padding: var(--space-xl) var(--space-md); }
  .page-header { padding: var(--space-xl) var(--space-md) var(--space-lg); }
}
