/* ============================================================
   CHOCOLATES XIME — styles.css
   Paleta: café oscuro + crema + dorado + chocolate
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
  --brown-dark:   #2C1A0E;   /* Header / banner oscuro */
  --brown-mid:    #5D3A1A;
  --brown-warm:   #8B5E3C;
  --cream-bg:     #F5EFE6;   /* Fondo general */
  --cream-card:   #FDF9F4;
  --cream-border: #E8DDD0;
  --gold:         #C9993A;
  --gold-light:   #F0C060;
  --text-dark:    #1A0F07;
  --text-body:    #3E2C1F;
  --text-muted:   #7C5F49;
  --success:      #3A7D44;
  --danger:       #C0392B;
  --mp-blue:      #009EE3;
  --white:        #ffffff;
  --shadow-soft:  0 4px 24px rgba(44,26,14,0.10);
  --shadow-card:  0 2px 12px rgba(44,26,14,0.08);
  --radius:       12px;
  --radius-sm:    8px;
  --transition:   0.25s ease;

  /* BUG FIX (corrección 12): --choco se usaba en App.js (avatar de perfil,
     tabs "Mis datos"/"Mis pedidos") y en styles.css pero nunca se había
     definido, por lo que esos elementos quedaban sin color de fondo.
     Se alias a --brown-dark, el mismo café oscuro usado en el header. */
  --choco: var(--brown-dark);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--cream-bg);
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 1.05rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.hidden { display: none !important; }

/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.22; color: var(--brown-dark); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.15rem; }
em { font-style: italic; color: var(--gold); }

.eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown-warm);
  margin-bottom: 0.6rem;
}

/* ── BOTONES ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brown-dark);
  color: var(--white);
  padding: 0.8rem 1.9rem;
  border-radius: 50px;
  font-size: 1.02rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid var(--brown-dark);
}
.btn-primary:hover {
  background: var(--brown-mid);
  border-color: var(--brown-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44,26,14,0.25);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent;
  color: var(--brown-dark);
  padding: 0.8rem 1.9rem;
  border-radius: 50px;
  font-size: 1.02rem;
  font-weight: 500;
  border: 2px solid var(--brown-dark);
  transition: all var(--transition);
}
.btn-outline:hover { background: var(--brown-dark); color: var(--white); }

.btn-mp {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--mp-blue);
  color: var(--white);
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
  border: none;
  width: 100%;
  margin-top: 0.75rem;
}
.btn-mp:hover { background: #0084bd; transform: translateY(-1px); }
.btn-mp img { filter: brightness(10); }

.full-width { width: 100%; }

.close-btn {
  background: none; border: none; font-size: 1.2rem;
  color: var(--text-muted); cursor: pointer;
  transition: color var(--transition);
}
.close-btn:hover { color: var(--brown-dark); }

/* ── HEADER ──────────────────────────────────────────────── */
#main-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--brown-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 68px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.logo-link { display: flex; align-items: center; gap: 0.4rem; }
.logo-header { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon { color: var(--gold); font-size: 1.2rem; }
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  color: var(--cream-bg);
  letter-spacing: 0.02em;
}
.logo-text em { color: var(--gold-light); }

nav { display: flex; gap: 2rem; }
nav a {
  color: rgba(245,239,230,0.75);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
nav a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
nav a:hover { color: var(--gold-light); }
nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.icon-btn {
  display: flex; align-items: center; gap: 0.4rem;
  color: rgba(245,239,230,0.85);
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 50px;
  transition: all var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.icon-btn i { font-size: 1.08rem; }

.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--gold);
  color: var(--brown-dark);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.hamburger { display: none; color: var(--cream-bg); font-size: 1.3rem; padding: 0.4rem; }

.mobile-nav {
  position: fixed; top: 68px; left: 0; right: 0;
  background: var(--brown-dark);
  z-index: 190;
  display: flex; flex-direction: column;
  padding: 1rem 5%;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav a { color: var(--cream-bg); font-size: 1rem; font-weight: 500; }

/* ── OVERLAYS ────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(28,15,7,0.55);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex; align-items: stretch; justify-content: flex-end;
}

/* ── CARRITO PANEL ───────────────────────────────────────── */
.cart-panel {
  background: var(--cream-card);
  width: min(420px, 100vw);
  height: 100vh;
  display: flex; flex-direction: column;
  animation: slideInRight 0.3s ease;
  overflow: hidden;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--cream-border);
  background: var(--brown-dark);
  color: var(--cream-bg);
}
.cart-header h3 { font-family: 'Playfair Display', serif; color: var(--cream-bg); margin: 0; font-size: 1.3rem; }
.cart-header .close-btn { color: var(--cream-border); }

#cart-items-list {
  flex: 1; overflow-y: auto; padding: 1rem 1.5rem;
}

.cart-item {
  display: flex; gap: 1rem; align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-border);
}
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; font-family: 'Playfair Display', serif; margin-bottom: 0.2rem; }
.cart-item-info .variant-tag { font-size: 0.75rem; color: var(--text-muted); }
.cart-item-price { font-weight: 600; color: var(--brown-mid); }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.cart-item-qty button {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--cream-border);
  color: var(--brown-dark);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.cart-item-qty button:hover { background: var(--brown-dark); color: var(--white); }
.cart-item-remove { color: var(--text-muted); font-size: 0.8rem; cursor: pointer; transition: color var(--transition); }
.cart-item-remove:hover { color: var(--danger); }

.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.cart-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; color: var(--cream-border); }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cream-border);
  background: var(--white);
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: 1rem;
  color: var(--brown-dark);
}
#cart-total-display { font-family: 'Playfair Display', serif; font-size: 1.4rem; }

/* ── LOGIN PANEL ─────────────────────────────────────────── */
.login-panel {
  background: var(--cream-card);
  width: min(440px, 100vw);
  margin: auto;
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  animation: scaleIn 0.3s ease;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.login-panel .close-btn { position: absolute; top: 1rem; right: 1rem; }
.login-logo { margin-bottom: 1.5rem; }
.login-logo .logo-text { font-size: 1.8rem; color: var(--brown-dark); }
.login-panel h2 { margin-bottom: 0.4rem; }
.login-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--white);
  color: var(--text-dark);
  transition: all var(--transition);
  margin-bottom: 1.2rem;
}
.btn-google:hover { border-color: var(--brown-warm); box-shadow: var(--shadow-card); }

.login-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1rem 0;
  color: var(--text-muted); font-size: 0.85rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--cream-border);
}

.login-input {
  display: block; width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--transition);
}
.login-input:focus { outline: none; border-color: var(--brown-warm); }
.login-register { margin-top: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.login-register a { color: var(--brown-mid); font-weight: 500; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 90vh;
  padding: 6rem 8% 4rem;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(201,153,58,0.08) 0%, transparent 60%),
    var(--cream-bg);
}

.hero-eyebrow { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.hero h1 { margin-bottom: 1.2rem; }
.hero-desc { color: var(--text-body); font-size: 1.15rem; max-width: 460px; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }
.hero-img-wrap {
  position: relative;
  width: 420px; max-width: 100%;
}
.hero-img-wrap img {
  width: 100%; height: 520px;
  object-fit: cover;
  border-radius: 200px 200px 0 0;
  box-shadow: 0 20px 60px rgba(44,26,14,0.25);
}
.hero-badge {
  position: absolute; bottom: -20px; left: -20px;
  background: var(--brown-dark);
  color: var(--white);
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  border: 4px solid var(--gold);
}
.hero-badge strong { font-size: 1.5rem; font-family: 'Playfair Display', serif; }
.hero-badge small { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); }

/* ── FEATURES BAR ────────────────────────────────────────── */
.features-bar {
  background: var(--brown-dark);
  display: flex; justify-content: center; gap: 0;
  flex-wrap: wrap;
}
.feature {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  color: var(--cream-bg);
  font-size: 0.98rem;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.feature:last-child { border-right: none; }
.feature i { color: var(--gold); font-size: 1.2rem; }

/* ── SECCIONES ───────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-top: 0.3rem; }

.section-catalog-preview {
  padding: 6rem 8%;
}

/* ── CARDS ───────────────────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--cream-border);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(44,26,14,0.14);
}
.product-card-img{

    width:100%;
    aspect-ratio: 4 / 3; /* corrección 6: proporción uniforme, no se deforma sea horizontal o vertical */

    overflow:hidden;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#fff;

}
.product-card-img img{

    width:100%;
    height:100%;

    object-fit:contain;
    object-position:center;

}
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--brown-dark);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
}
.product-card-badge.sale { background: var(--gold); color: var(--brown-dark); }
.product-card-body { padding: 1.2rem; }
.product-card-body h3 {
  font-size: 1.22rem;
  margin-bottom: 0.4rem;
  font-family: 'Playfair Display', serif;
}
.product-card-body .stock-label {
  font-size: 0.82rem;
  color: var(--success);
  margin-bottom: 0.6rem;
}
.product-card-body .stock-label.low { color: var(--danger); }
.price-row { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1rem; }
.price-main { font-size: 1.32rem; font-weight: 600; color: var(--brown-mid); }
.price-original { font-size: 0.98rem; color: var(--text-muted); text-decoration: line-through; }
.product-card-body .btn-primary { width: 100%; justify-content: center; }

#pd-img{

    width:100%;
    aspect-ratio: 4 / 3;
    max-height:500px;

    object-fit:contain;
    object-position:center;
    background:#fff;
    cursor: zoom-in;

}

/* ── LIGHTBOX: imagen ampliada al hacer clic ─────────────── */
.img-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 12, 8, 0.9);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    cursor: zoom-out;
}
.img-lightbox.open { display: flex; }
.img-lightbox-content {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.img-lightbox-close {
    position: absolute;
    top: 1.2rem; right: 1.8rem;
    color: #fff;
    font-size: 2.6rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
}

/* ── NOSOTROS ────────────────────────────────────────────── */
.nosotros-section {
  padding: 6rem 8%;
  background: var(--white);
}
.nosotros-header { max-width: 720px; margin: 0 0 3rem; }
.nosotros-header h2 { margin-bottom: 0; }
.nosotros-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: center;
}
.nosotros-img { position: relative; }
.nosotros-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  image-rendering: -webkit-optimize-contrast;
}
.nosotros-badge {
  position: absolute; bottom: -16px; right: -16px;
  background: var(--gold);
  color: var(--brown-dark);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(201,153,58,0.35);
}
.nosotros-content p { color: var(--text-body); margin-bottom: 1rem; font-size: 1.05rem; }
.stats-row { display: flex; gap: 2rem; margin-top: 2rem; }
.stat { text-align: center; }
.stat strong { display: block; font-family: 'Playfair Display', serif; font-size: 2.1rem; color: var(--brown-dark); }
.stat small { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

@media (max-width: 600px) {
  .nosotros-img img { height: 280px; }
}

/* ── CONTACTO ────────────────────────────────────────────── */
.contacto-section { padding: 6rem 8%; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: stretch; }
.contacto-grid .card { display: flex; flex-direction: column; }
.contacto-grid .card-body { flex: 1; display: flex; flex-direction: column; width: 100%; }
.contacto-info .card-body { justify-content: center; gap: 1.2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  color: var(--text-body); font-size: 1.05rem;
}
.contact-item i { color: var(--gold); font-size: 1.2rem; width: 20px; }
.contacto-form { display: flex; flex-direction: column; gap: 1rem; }
.contacto-form input, .contacto-form textarea {
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  background: var(--cream-card);
  transition: border-color var(--transition);
}
.contacto-form input:focus, .contacto-form textarea:focus {
  outline: none; border-color: var(--brown-warm);
}
.contacto-form .btn-primary { align-self: flex-start; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--brown-dark);
  color: rgba(245,239,230,0.65);
  text-align: center;
  padding: 3rem 5%;
}
.footer-inner { max-width: 600px; margin: auto; }
.logo-footer { margin-bottom: 0.5rem; font-size: 1.5rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin: 1.2rem 0; font-size: 0.95rem; }
.footer-links a { color: rgba(245,239,230,0.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.85rem; color: rgba(245,239,230,0.45); }
.footer-catalog { margin-top: 4rem; }

/* ── PAGE BANNER ─────────────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-mid) 100%);
  color: var(--white);
  text-align: center;
  padding: 5rem 5% 4rem;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1549007994-cb92caebd54b?auto=format&fit=crop&w=1600&q=30') center/cover;
  opacity: 0.08;
}
.page-banner h1 { color: var(--white); position: relative; }
.page-banner p { color: rgba(255,255,255,0.7); margin-top: 0.5rem; position: relative; }

/* ── CATÁLOGO FULL ───────────────────────────────────────── */
.catalog-container { padding: 3rem 8%; max-width: 1400px; margin: auto; }
.catalog-filters, .filter-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.5rem 1.4rem;
  border-radius: 50px;
  border: 1.5px solid var(--cream-border);
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--white);
  color: var(--text-body);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--brown-dark);
  color: var(--white);
  border-color: var(--brown-dark);
}
.catalog-grid.full { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

/* ── PÁGINA PRODUCTO ─────────────────────────────────────── */
.product-detail-wrap {
  max-width: 1200px; margin: auto;
  padding: 3rem 5%;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.9rem;
  transition: color var(--transition);
  margin-bottom: 2rem;
}
.back-btn:hover { color: var(--brown-mid); }

.product-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; margin-bottom: 3rem;
}

.product-gallery img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-thumbs { display: flex; gap: 0.75rem; margin-top: 1rem; }
.gallery-thumb {
  width: 70px; height: 70px; border-radius: var(--radius-sm);
  object-fit: cover; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.gallery-thumb.active { border-color: var(--gold); }

.product-tag {
  display: inline-block;
  background: var(--cream-border);
  color: var(--brown-warm);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}
.product-info h1 { font-size: 2rem; margin-bottom: 0.6rem; }

.product-rating { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }
.product-rating i { color: var(--gold); font-size: 0.9rem; }
.product-rating span { font-size: 0.85rem; color: var(--text-muted); }

.product-price-row { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; }
.pd-price { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--brown-mid); font-weight: 700; }
.pd-original { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; }

.pd-desc { color: var(--text-body); margin-bottom: 1.5rem; line-height: 1.75; }

.variants-section { margin-bottom: 1.5rem; }
.variants-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.6rem; }
.variants-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.variant-chip {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  border: 1.5px solid var(--cream-border);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  color: var(--text-body);
}
.variant-chip.active { border-color: var(--brown-dark); background: var(--brown-dark); color: var(--white); }
.variant-chip:hover:not(.active) { border-color: var(--brown-warm); }

.stock-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--text-body); }
.stock-indicator { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }
.stock-indicator.low { background: var(--danger); }
.stock-indicator.out { background: var(--text-muted); }

.qty-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.qty-ctrl {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--cream-border);
  border-radius: 50px; overflow: hidden;
}
.qty-ctrl button {
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  color: var(--brown-dark);
  background: var(--white);
  transition: background var(--transition);
}
.qty-ctrl button:hover { background: var(--cream-border); }
.qty-ctrl span { padding: 0 0.75rem; font-weight: 600; }

.product-extras { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--cream-border); }
.extra-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); }
.extra-item i { color: var(--gold); }

/* ============================================================
   PÁGINA DE PRODUCTO — clases REALES usadas en index.html/App.js
   (el bloque de arriba con .product-detail-grid, .qty-ctrl,
   .variants-section, .add-comment, etc. quedó de una versión
   anterior del HTML y ya no se usa; lo dejamos sin tocar)
============================================================ */
.card {
  background: var(--cream-card);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-body { padding: 1.5rem; }

#page-product { max-width: 1200px; margin: 0 auto; padding: 3rem 5%; }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin: 2rem 0 3rem;
}

.product-info h2 { margin-bottom: 0.6rem; }

.product-price {
  display: flex; align-items: baseline; gap: 0.8rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 1rem;
}
.product-price .price-original {
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
}

.product-short-desc { color: var(--text-body); margin-bottom: 1.2rem; }

.stock-line {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-body);
}
.stock-indicator { display: inline-block; }

.product-actions {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.qty-stepper {
  display: flex; align-items: center;
  border: 1.5px solid var(--cream-border);
  border-radius: 50px;
  overflow: hidden;
}
.qty-stepper button {
  padding: 0.55rem 1.05rem;
  font-size: 1.1rem;
  color: var(--brown-dark);
  background: var(--white);
  transition: background var(--transition);
}
.qty-stepper button:hover { background: var(--cream-border); }
.qty-stepper span {
  padding: 0 0.9rem;
  font-weight: 600;
  min-width: 1.4rem;
  text-align: center;
}

.product-actions .btn-primary { flex: 1; min-width: 220px; justify-content: center; }

.variant-box { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.product-tabs-card { margin-bottom: 3rem; }
.tabs-row {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--cream-border);
  margin-bottom: 1.5rem;
}

.product-full-desc { color: var(--text-body); line-height: 1.75; margin-bottom: 0.75rem; }
.muted-line { color: var(--text-muted); font-size: 0.85rem; }

.comment-form {
  background: var(--cream-bg);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.comment-form input, .comment-form textarea {
  display: block; width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  background: var(--white);
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--brown-warm);
}

/* ── TABS ────────────────────────────────────────────────── */
.product-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--cream-border); margin-bottom: 2rem; }
.tab-btn {
  padding: 0.75rem 2rem;
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--brown-dark); border-bottom-color: var(--brown-dark); }

.tab-content { padding: 1rem 0 3rem; }

.details-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 3rem; }
.details-grid h4 { margin-bottom: 0.75rem; font-size: 1rem; color: var(--brown-mid); }
.details-grid p { color: var(--text-body); }

.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--cream-border); }
.info-table td { padding: 0.6rem 0.5rem; font-size: 0.88rem; }
.info-table td:first-child { color: var(--text-muted); width: 40%; }
.info-table td:last-child { font-weight: 500; color: var(--brown-mid); }

/* ── COMENTARIOS ─────────────────────────────────────────── */
#comments-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.comment-card {
  background: var(--cream-card);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}
.comment-card .comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.comment-card .comment-author { font-weight: 600; font-size: 0.95rem; }
.comment-card .comment-stars i { color: var(--gold); font-size: 0.8rem; }
.comment-card .comment-text { color: var(--text-body); font-size: 0.9rem; font-style: italic; }

.add-comment { background: var(--cream-card); border: 1px solid var(--cream-border); border-radius: var(--radius); padding: 1.5rem; }
.add-comment h4 { margin-bottom: 1rem; }
.star-select { display: flex; gap: 0.3rem; margin-bottom: 1rem; cursor: pointer; }
.star-select i { font-size: 1.4rem; color: var(--cream-border); transition: color var(--transition); }
.star-select i.active { color: var(--gold); }
.add-comment input, .add-comment textarea {
  display: block; width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  background: var(--white);
}
.add-comment input:focus, .add-comment textarea:focus { outline: none; border-color: var(--brown-warm); }

/* ── WHATSAPP BTN ────────────────────────────────────────── */
.wsp-btn {
  position: fixed; bottom: 24px; right: 24px;
  background: #25D366;
  color: var(--white);
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  z-index: 100;
  transition: transform var(--transition), box-shadow var(--transition);
}
.wsp-btn:hover { transform: scale(1.12); box-shadow: 0 8px 28px rgba(37,211,102,0.5); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 100px; right: 24px;
  background: var(--brown-dark);
  color: var(--cream-bg);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 400;
  box-shadow: var(--shadow-soft);
  animation: toastIn 0.3s ease;
  max-width: 280px;
  border-left: 4px solid var(--gold);
}
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  html { font-size: 16.5px; }
  nav { display: none; }
  .hamburger { display: block; }
  .hero { grid-template-columns: 1fr; padding: 5rem 6% 3rem; text-align: center; }
  .hero-visual { display: none; }
  .hero-cta { justify-content: center; }
  .nosotros-body { grid-template-columns: 1fr; gap: 2.5rem; }
  .contacto-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contacto-info, .contacto-form { min-height: 0; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .catalog-container { padding: 2rem 5%; }
  .section-catalog-preview { padding: 4rem 5%; }
}

@media (max-width: 480px) {
  .features-bar { flex-direction: column; }
  .feature { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .stats-row { gap: 1rem; }
  .product-detail-wrap { padding: 2rem 4%; }
}
/* ============================================================
   CHOCOLATES XIME — Banner promocional (agrega al final de styles.css)
   ============================================================ */

.promo-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1a0f07;
  /* Altura responsive: más alto en desktop, más compacto en móvil */
  height: clamp(160px, 32vw, 480px);
}

/* Track que contiene todas las imágenes en fila */
.promo-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
}

/* Cada slide ocupa el 100% del banner */
.promo-slide {
  min-width: 100%;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Flechas de navegación */
.promo-prev,
.promo-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(44, 26, 14, 0.55);
  color: #f5efe6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
  z-index: 10;
  opacity: 0.7;
}
.promo-prev { left: 14px; }
.promo-next { right: 14px; }
.promo-prev:hover,
.promo-next:hover { background: rgba(44, 26, 14, 0.85); opacity: 1; }

/* Dots indicadores */
.promo-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(245, 239, 230, 0.45);
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  padding: 0;
}
.promo-dot.active {
  background: #C9993A;
  transform: scale(1.3);
}

/* Ocultar flechas si solo hay 1 slide */
.promo-banner.single .promo-prev,
.promo-banner.single .promo-next,
.promo-banner.single .promo-dots { display: none; }

/* ============================================================
   CHOCOLATES XIME — Estilos perfil y login (agrega al final de styles.css)
   ============================================================ */

.login-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted, #888);
}
.login-switch a {
  color: var(--choco, #7b3f00);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================================
   CHOCOLATES XIME — Página "Buscar productos"
   Corrección 1 (barra + categorías dinámicas), 8 (autocompletado)
   ============================================================ */
.search-bar-wrap {
  position: relative;
  max-width: 620px;
  margin: 0 0 1.4rem;
}
.search-bar-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.search-brand-logo {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brown-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(44,26,14,0.25);
  border: 2px solid var(--gold);
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  background: var(--white);
  border: 1.5px solid var(--cream-border);
  border-radius: 50px;
  padding: 0.85rem 1.3rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,153,58,0.15);
}
.search-bar-icon { color: var(--text-muted); font-size: 1.02rem; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.08rem;
  color: var(--text-dark);
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.2rem;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}
.search-clear:hover { color: var(--danger); background: rgba(192,57,43,0.08); }

/* Dropdown de sugerencias (autocompletado) */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
  animation: fadeSlideDown 0.15s ease;
}
@keyframes fadeSlideDown { from { opacity:0; transform: translateY(-6px);} to { opacity:1; transform: translateY(0);} }
.search-suggestion-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.search-suggestion-item:hover { background: var(--cream-bg); }
.search-suggestion-item img {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  object-fit: cover; object-position: center; flex-shrink: 0;
}
.suggestion-name { font-size: 0.92rem; font-weight: 600; color: var(--text-dark); }
.suggestion-cat { font-size: 0.75rem; color: var(--text-muted); }

.search-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 3rem 1rem;
}

/* ============================================================
   Skeleton loading (corrección 10)
   ============================================================ */
.skeleton-shimmer {
  position: relative;
  background: #e9e0d3;
  overflow: hidden;
}
.skeleton-shimmer::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton-card { cursor: default; pointer-events: none; }
.skeleton-line { border-radius: 4px; }

/* ============================================================
   Feedback visual / transiciones adicionales (corrección 10)
   ============================================================ */
.filter-btn, .search-clear, .promo-dot, .icon-btn, .tab-btn {
  transition: all var(--transition);
}
.product-card-body .btn-primary:active { transform: scale(0.97); }

/* ============================================================
   Responsive: buscador, categorías y grid en móvil (corrección 11)
   ============================================================ */
@media (max-width: 900px) {
  .search-bar-wrap { max-width: 100%; }
  #search-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.4rem; -webkit-overflow-scrolling: touch; }
  #search-categories .filter-btn { flex-shrink: 0; }
  .product-card-img { aspect-ratio: 1 / 1; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .search-bar { padding: 0.7rem 1.05rem; }
  .search-input { font-size: 1rem; }
  .search-brand-logo { width: 40px; height: 40px; font-size: 1.2rem; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
  .product-card-body { padding: 0.8rem; }
}
.login-switch a:hover { text-decoration: underline; }