/* ========================================================
   1. VARIABLES & RESET (EDITORIAL BOUTIQUE)
   ======================================================== */
:root {
  --bg-main: #fbf9f5;
  --bg-card: #ffffff;
  --text-main: #141416;
  --text-muted: #5e5f67;
  --text-subtle: #8e9099;

  --border-subtle: #eae7e1;
  --accent-red: #d92d20;
  --accent-soft: #f4f0ec;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 6px 24px rgba(20, 20, 22, 0.04);
  --shadow-hover: 0 16px 36px rgba(217, 45, 32, 0.09), 0 4px 16px rgba(20, 20, 22, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

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

button, input, select, textarea {
  font-family: inherit;
}

/* ========================================================
   2. HEADER
   ======================================================== */
header, .header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem 0.85rem;
}

header .header-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span {
  font-weight: 400;
  color: var(--accent-red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 440px;
}

.search-bar {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-bar i.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  height: 40px;
  padding: 0 2.2rem 0 2.4rem;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  background: #f2eee8;
  border: 1px solid transparent;
  outline: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.search-bar input:focus {
  background: #ffffff;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.btn-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.btn-cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cart:hover {
  background: var(--text-main);
  color: #ffffff;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* ========================================================
   3. HERO COMPACTO
   ======================================================== */
.brand-hero-compact {
  padding: 2.2rem 1.5rem 1.2rem;
  text-align: center;
}

.brand-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-tagline-badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-red);
  background: #fff3f2;
  border: 1px solid rgba(217, 45, 32, 0.2);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.brand-headline {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.headline-italic {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-red);
}

/* ========================================================
   4. FILTROS & CATÁLOGO
   ======================================================== */
.catalog-anchor-section {
  padding-top: 0.5rem;
}

.filters-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.4rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.categories-bar, .sizes-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.categories-bar button, .sizes-bar button {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.categories-bar button:hover, .sizes-bar button:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

.categories-bar button.active, .sizes-bar button.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.filter-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-subtle);
  margin-right: 0.25rem;
}

.catalog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

#no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
  will-change: opacity, transform;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.product-card.card-revealed {
  opacity: 1;
  transform: translateY(0);
}

.product-card.card-revealed:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(217, 45, 32, 0.3);
  z-index: 5;
}

.product-card.card-revealed:active {
  transform: translateY(-4px) scale(0.98);
  box-shadow: 0 10px 25px rgba(217, 45, 32, 0.2);
  border-color: var(--accent-red);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.product-card .img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f2eee8;
  overflow: hidden;
}

.product-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .img-wrapper img {
  transform: scale(1.06);
}

.product-card .tag-brand {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.product-card .info {
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .info .title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.product-card:hover .info .title {
  color: var(--accent-red);
}

.product-card .info .meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.85rem;
}

.product-card .info .meta .dot {
  font-size: 0.45rem;
}

.product-card .info .price-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card .info .price-action .price {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-card .info .price-action .btn-add {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f2eee8;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card .info .price-action .btn-add:hover {
  background: var(--text-main);
  color: #ffffff;
  transform: scale(1.1);
}

/* ========================================================
   5. BENEFICIOS & FOOTER
   ======================================================== */
.features-section {
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 3.2rem 1.5rem;
  margin-top: 2rem;
  display: block;
}

.features-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-item i {
  font-size: 1.35rem;
  color: var(--accent-red);
  background: #fff3f2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 0.85rem;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 280px;
}

footer.footer {
  background: var(--bg-main);
  padding: 2.6rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-inner p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner small {
  font-size: 0.74rem;
  color: var(--text-subtle);
  margin-top: 0.35rem;
}

/* ========================================================
   6. MODAL DETALLE
   ======================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal .modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal .btn-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.modal-gallery-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 48%;
  padding: 1.4rem;
  background: #fbf9f5;
}

.modal-main-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f2eee8;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.2s ease;
}

.modal-main-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-thumbnails {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.modal-thumb {
  width: 58px;
  height: 76px;
  min-width: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.2s ease;
  background: #e5e7eb;
}

.modal-thumb.active,
.modal-thumb:hover {
  opacity: 1;
  border-color: var(--accent-red);
  box-shadow: 0 0 8px rgba(217, 45, 32, 0.3);
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-thumb.thumb-video {
  background: #141416;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-thumb.thumb-video i {
  font-size: 1.25rem;
  color: var(--accent-red);
}

.modal-thumb.thumb-video.active,
.modal-thumb.thumb-video:hover {
  background: var(--accent-red);
  color: #ffffff;
}

.modal-thumb.thumb-video.active i,
.modal-thumb.thumb-video:hover i {
  color: #ffffff;
}

.modal .modal-info {
  width: 52%;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#modal-marca {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-red);
  margin-bottom: 0.2rem;
}

#modal-titulo {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.2rem 0 0.5rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.modal-meta span {
  background: #f4f0ec;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

#modal-precio {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

#modal-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

#modal-btn-add {
  margin-top: auto;
  width: 100%;
  padding: 0.95rem;
  border-radius: var(--radius-full);
  background: var(--text-main);
  color: #ffffff;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ========================================================
   7. BOLSA / CARRITO DRAWER
   ======================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100%;
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-header button {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  margin-top: 3.5rem;
  font-size: 0.9rem;
}

.cart-item {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.cart-item img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #f2eee8;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cart-item-title {
  font-size: 0.84rem;
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
}

.btn-remove:hover {
  color: #ef4444;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-checkout {
  width: 100%;
  padding: 0.95rem;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #ffffff;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================================
   8. MEDIA QUERIES (RESPONSIVE MÓVIL)
   ======================================================== */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }
}

@media (max-width: 768px) {
  .brand-headline {
    font-size: 1.9rem;
  }
}

@media (max-width: 650px) {
  header, .header {
    padding: 0.85rem 1rem 0.75rem;
  }
  .brand-hero-compact {
    padding: 1.6rem 1rem 0.8rem;
  }
  .brand-headline {
    font-size: 1.65rem;
  }
  .header-actions {
    gap: 0.5rem;
    width: 100%;
  }
  .search-bar input {
    height: 38px;
    font-size: 0.82rem;
  }
  .btn-cart {
    width: 38px;
    height: 38px;
  }
  .categories-bar, .sizes-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .categories-bar::-webkit-scrollbar, .sizes-bar::-webkit-scrollbar {
    display: none;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .features-container {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .modal {
    padding: 0.75rem;
  }
  .modal .modal-content {
    flex-direction: column;
    max-height: 94vh;
    border-radius: 20px;
    overflow-y: auto;
  }
  .modal-gallery-wrapper {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    gap: 0.6rem;
  }
  .modal-main-image {
    width: 100%;
    max-height: 340px;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
  }
  .modal-main-image img {
    object-fit: contain;
    background: #eceef2;
  }
  .modal-thumbnails {
    gap: 0.45rem;
    padding-bottom: 2px;
  }
  .modal-thumb {
    width: 50px;
    height: 66px;
    min-width: 50px;
  }
  .modal .modal-info {
    width: 100%;
    padding: 1.1rem 1.25rem 1.5rem;
  }
  #modal-titulo {
    font-size: 1.2rem;
  }
  #modal-precio {
    font-size: 1.3rem;
  }
  .cart-drawer {
    width: 100%;
  }
}