/* ===== Moka Cosmetics — estilos base (mobile-first) ===== */

:root {
  --rose: #D79889;
  --rose-dark: #c17f6f;
  --cream: #FCF8ED;
  --taupe: #D1CEBD;
  --white: #FFFFFF;
  --ink: #1f1a17;
  --ink-soft: #6b6055;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(31, 26, 23, 0.08);
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

h1, h2, h3 {
  font-family: 'Playfair Display', 'Poppins', serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 .5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; font-family: 'Poppins', sans-serif; font-weight: 600; }

p { line-height: 1.6; color: var(--ink-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--taupe); }
.btn-outline:hover { border-color: var(--rose); color: var(--rose-dark); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1ebe5a; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid rgba(209,206,189,0.6);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo-link img { height: 40px; width: auto; }

.nav-desktop {
  display: none;
  gap: 32px;
}
.nav-desktop a {
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-desktop a:hover, .nav-desktop a.active { border-bottom-color: var(--rose); color: var(--rose-dark); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}
.icon-btn svg { width: 24px; height: 24px; stroke: var(--ink); }

.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--rose);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger { display: flex; }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(31,26,23,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: 78%;
  max-width: 320px;
  height: 100%;
  background: var(--white);
  padding: 24px 22px;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-panel a {
  padding: 14px 4px;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--cream);
}
.mobile-nav-close { align-self: flex-end; background: none; border: none; cursor: pointer; padding: 6px; }

/* ===== Hero ===== */
.hero {
  padding: 44px 0 36px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--taupe);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 2.4rem; max-width: 680px; margin: 0 auto .4em; }
.hero p.lead { max-width: 480px; margin: 0 auto 24px; font-size: 1.02rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hero-actions .btn { min-width: 220px; }

/* Category tiles (foto + hover) */
.cat-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 30px 0;
}
.cat-photo-tile {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(209,206,189,0.5);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cat-photo-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(31,26,23,0.15);
}
.cat-photo-tile .photo-wrap {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Tile con una sola imagen estática */
.cat-photo-tile .photo-wrap img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  transition: transform .35s ease;
}
.cat-photo-tile:hover .photo-wrap img { transform: scale(1.08); }

/* Tile-carrusel (varias imágenes apiladas, una activa a la vez) */
.cat-photo-tile[data-carousel] .photo-wrap img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  height: 78%;
  object-fit: contain;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .8s ease, transform .35s ease;
}
.cat-photo-tile[data-carousel] .photo-wrap img.active { opacity: 1; }
.cat-photo-tile[data-carousel]:hover .photo-wrap img.active { transform: translate(-50%, -50%) scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .cat-photo-tile[data-carousel] .photo-wrap img { transition: none; }
}
.cat-photo-tile .label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.cat-photo-tile .label-row h3 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 400; }
.cat-photo-tile .label-row span { color: var(--ink-soft); font-size: .8rem; display: block; margin-top: 2px; }
.cat-photo-tile .arrow { color: var(--rose-dark); font-size: 1.2rem; transition: transform .25s ease; flex-shrink: 0; margin-left: 10px; }
.cat-photo-tile:hover .arrow { transform: translateX(6px); }

/* Bloques de producto agrupados por categoría (sin mezclar filas) */
.cat-section { margin-bottom: 34px; }
.cat-section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--taupe);
}

section.section { padding: 30px 0; }
.section-title { text-align: center; margin-bottom: 22px; }
.section-title h2 { margin-bottom: 6px; }
.section-title p { max-width: 460px; margin: 0 auto; }

/* ===== Product grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(209,206,189,0.4);
  display: flex;
  flex-direction: column;
}
.product-card .img-wrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--taupe); }
.product-card .star-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--rose);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat-tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rose-dark); font-weight: 700; }
.product-card h3 { font-size: .92rem; margin: 0; line-height: 1.3; min-height: 2.4em; }
.product-card .grml { font-size: .74rem; color: var(--ink-soft); margin-top: -4px; }
.product-card .price { font-weight: 700; font-size: 1rem; margin-top: auto; }
.product-card .price.tbd { color: var(--ink-soft); font-weight: 500; font-size: .82rem; }
.product-card .claims { display: flex; flex-wrap: wrap; gap: 5px; }
.product-card .claim-tag {
  font-size: .65rem;
  font-weight: 600;
  color: var(--rose-dark);
  background: var(--cream);
  border: 1px solid var(--taupe);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.product-card .btn { padding: 9px 14px; font-size: .8rem; }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 18px;
  -webkit-overflow-scrolling: touch;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--taupe);
  background: var(--white);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.filter-tab.active { background: var(--rose); border-color: var(--rose); color: var(--white); }

/* ===== Cart drawer ===== */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(31,26,23,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.cart-drawer.open { opacity: 1; pointer-events: auto; }
.cart-panel {
  position: absolute;
  top: 0; right: 0;
  width: 88%;
  max-width: 400px;
  height: 100%;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.cart-drawer.open .cart-panel { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--taupe);
}
.cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 12px; background: var(--white); border-radius: 10px; padding: 10px; }
#checkoutSummary .cart-item { background: var(--cream); border: 1px solid rgba(209,206,189,0.5); margin-bottom: 10px; }
.cart-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item-info h4 { font-size: .85rem; margin: 0; font-weight: 600; }
.cart-item-info .cat { font-size: .7rem; color: var(--ink-soft); }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--taupe); background: white; cursor: pointer; font-weight: 700; line-height: 1; }
.remove-btn { margin-left: auto; background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: .75rem; text-decoration: underline; }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.cart-footer { padding: 18px 20px 24px; border-top: 1px solid var(--taupe); display: flex; flex-direction: column; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }

/* ===== Footer ===== */
.site-footer { background: #000000; color: var(--cream); padding: 40px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.footer-grid h4 { color: var(--white); margin-bottom: 10px; font-size: .95rem; }
.footer-grid p, .footer-grid a { color: rgba(252,248,237,0.75); font-size: .88rem; line-height: 1.7; }
.footer-grid img.logo-footer { height: 34px; filter: invert(1) brightness(2); margin-bottom: 10px; }
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: var(--cream); transition: background .2s ease, color .2s ease; }
.social-row a:hover { background: var(--rose); color: var(--white); }
.social-row a svg { width: 17px; height: 17px; }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: .78rem; color: rgba(252,248,237,0.5); }

/* ===== Page header (interior pages) ===== */
.page-hero { padding: 36px 0 24px; text-align: center; }
.page-hero h1 { font-size: 2rem; }

/* ===== Contacto page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 12px; align-items: flex-start; }
.contact-row .ic { width: 38px; height: 38px; border-radius: 50%; background: var(--cream); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-row .ic svg { width: 18px; height: 18px; stroke: var(--rose-dark); }
.contact-row h4 { margin: 0 0 2px; font-size: .9rem; }
.contact-row p, .contact-row a { margin: 0; font-size: .88rem; }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 0; width: 100%; height: 280px; }

/* ===== Cursos page ===== */
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
  border: 1.5px dashed var(--taupe);
}
.course-card h3 { margin-bottom: 8px; }
.badge-soon {
  display: inline-block;
  background: var(--rose);
  color: white;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ===== Checkout page ===== */
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.checkout-card { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .82rem; font-weight: 600; }
.form-row input, .form-row textarea, .form-row select {
  border: 1.5px solid var(--taupe);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: .92rem;
  background: var(--cream);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--rose); border-color: var(--rose); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-summary-line { display: flex; justify-content: space-between; font-size: .88rem; padding: 6px 0; border-bottom: 1px solid var(--cream); }
#checkoutDiscountRow { color: var(--rose-dark); font-weight: 600; }

.promo-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.promo-row input {
  flex: 1;
  border: 1.5px solid var(--taupe);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .85rem;
  background: var(--cream);
  text-transform: uppercase;
}
.promo-row input:focus { outline: 2px solid var(--rose); border-color: var(--rose); }
.promo-row .btn { padding: 10px 18px; font-size: .8rem; flex-shrink: 0; }
.promo-message { font-size: .78rem; margin-bottom: 10px; min-height: 1em; }
.promo-message.success { color: #2e7d4f; }
.promo-message.error { color: #b3413a; }
.demo-note { background: var(--cream); border: 1px dashed var(--taupe); border-radius: 10px; padding: 12px 14px; font-size: .8rem; color: var(--ink-soft); }

.shipping-options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.shipping-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--taupe);
  border-radius: 10px;
  cursor: pointer;
  font-size: .88rem;
  background: var(--cream);
  transition: border-color .2s ease, background .2s ease;
}
.shipping-option input[type="radio"] { accent-color: var(--rose); width: 16px; height: 16px; flex-shrink: 0; }
.shipping-option.selected,
.shipping-option:has(input:checked) { border-color: var(--rose); background: var(--white); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  z-index: 200;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Tablet / Desktop ===== */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-photo-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

@media (min-width: 900px) {
  .hamburger { display: none; }
  .nav-desktop { display: flex; align-items: center; }
  .hero h1 { font-size: 3rem; }
  .hero-actions { flex-direction: row; justify-content: center; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
