/* ==========================================================================
   INSUMOS ESTÉTICOS KOREA — Hoja de estilos
   Paleta: tinta cálida + hueso + celadón (cerámica coreana) + arcilla suave
   Tipografía: Fraunces (display) + Manrope (interfaz / cuerpo)
   Motivo de firma: retícula de diamantes, tomada de las cajas de producto
   ========================================================================== */

:root {
  /* — Color — */
  --ink: #1c1b17;
  --ink-70: #55534a;
  --ink-45: #8c897c;
  --bone: #f8f4ec;
  --bone-warm: #f2ead9;
  --sand: #efe1c8;
  --sand-line: #e2d3b4;
  --jade: #3f5346;
  --jade-deep: #2c3c33;
  --jade-soft: #e3ebe3;
  --blush: #c99b82;
  --blush-soft: #f1e2d6;
  --gold: #ab8a4c;
  --line: rgba(28, 27, 23, 0.12);
  --white: #fffdf8;

  /* — Type — */
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  /* — Shape / motion — */
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(28,27,23,0.04), 0 12px 28px -14px rgba(28,27,23,0.18);
  --shadow-modal: 0 24px 70px -20px rgba(20,19,15,0.45);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); font-weight: 500; }
p { margin: 0; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
  margin: 0 0 10px;
}

/* ---------- Signature lattice motif ---------- */
.lattice-bg {
  background-image:
    linear-gradient(45deg, rgba(28,27,23,0.05) 25%, transparent 25%, transparent 75%, rgba(28,27,23,0.05) 75%),
    linear-gradient(45deg, rgba(28,27,23,0.05) 25%, transparent 25%, transparent 75%, rgba(28,27,23,0.05) 75%);
  background-size: 44px 44px;
  background-position: 0 0, 22px 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--ink);
  color: var(--bone);
}
.btn-primary:hover { background: var(--jade-deep); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bone); }
.btn-whatsapp {
  background: var(--jade);
  color: var(--white);
}
.btn-whatsapp:hover { background: var(--jade-deep); }
.icon-wa { width: 18px; height: 18px; flex-shrink: 0; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 244, 236, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(20,19,15,0.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 78px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-tagline {
  font-size: 11px;
  color: var(--ink-45);
  letter-spacing: 0.02em;
  display: none;
}
@media (min-width: 560px) { .brand-tagline { display: block; } }

.main-nav {
  display: none;
  align-items: center;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 600;
}
.main-nav a { position: relative; padding: 6px 0; color: var(--ink-70); transition: color 0.2s var(--ease); }
.main-nav a:hover { color: var(--ink); }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--jade); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions .btn-whatsapp { padding: 10px 18px; font-size: 13.5px; }
.header-actions .btn-whatsapp span { display: none; }
@media (min-width: 640px) { .header-actions .btn-whatsapp span { display: inline; } }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); margin: 0 auto; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 899px) {
  .main-nav {
    position: fixed; inset: 78px 0 0 0; z-index: 55;
    background: var(--bone); flex-direction: column; justify-content: flex-start;
    padding: 32px 24px; gap: 4px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
  .main-nav a { width: 100%; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
  background: linear-gradient(180deg, var(--bone-warm) 0%, var(--bone) 100%);
}
.hero-lattice {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(60deg, transparent 48%, rgba(63,83,70,0.07) 49%, rgba(63,83,70,0.07) 51%, transparent 52%),
    linear-gradient(-60deg, transparent 48%, rgba(63,83,70,0.07) 49%, rgba(63,83,70,0.07) 51%, transparent 52%);
  background-size: 84px 145px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 20%, black 0%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; gap: 40px; }
}
.hero-copy { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  animation: rise 0.8s var(--ease) both;
}
.hero-subtitle {
  font-size: 17px;
  color: var(--ink-70);
  max-width: 46ch;
  margin-bottom: 34px;
  animation: rise 0.8s var(--ease) 0.1s both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; animation: rise 0.8s var(--ease) 0.2s both; }

.hero-media { position: relative; display: flex; justify-content: center; animation: rise 1s var(--ease) 0.15s both; }
.hero-media-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: linear-gradient(160deg, var(--sand) 0%, var(--bone-warm) 100%);
  box-shadow: var(--shadow-card);
  position: relative;
  padding: 34px 28px;
}
.hero-media-frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--radius-l);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  pointer-events: none;
}
.hero-media-frame img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   SECTION HEADING (shared)
   ========================================================================== */
.section-heading { margin-bottom: 40px; }
.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 500; }

/* ==========================================================================
   CATEGORIES
   ========================================================================== */
.categories { padding: 76px 0 20px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }

.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 22px 18px;
  border-radius: var(--radius-m);
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: transparent; }
.category-card.is-active { background: var(--jade); border-color: var(--jade); }
.category-card.is-active .category-card-name,
.category-card.is-active .category-card-count { color: var(--white); }

.category-card-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--jade-soft);
  color: var(--jade);
  flex-shrink: 0;
}
.category-card.is-active .category-card-icon { background: rgba(255,255,255,0.18); color: var(--white); }
.category-card-icon svg { width: 18px; height: 18px; }

.category-card-name { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.3; }
.category-card-count { font-size: 12px; color: var(--ink-45); }

/* ==========================================================================
   CATALOG
   ========================================================================== */
.catalog { padding: 84px 0 40px; }

.catalog-controls {
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: 8px;
}
@media (min-width: 860px) {
  .catalog-controls { flex-direction: row; align-items: center; justify-content: space-between; }
}

.search-box {
  position: relative;
  flex-shrink: 0;
  width: 100%;
}
@media (min-width: 860px) { .search-box { width: 320px; } }
.icon-search { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-45); }
.search-box input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.search-box input:focus { border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-soft); outline: none; }
.search-box input::placeholder { color: var(--ink-45); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 9px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-70);
  transition: all 0.25s var(--ease);
}
.chip:hover { border-color: var(--jade); color: var(--jade); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bone); }

.results-count { margin: 22px 0 18px; font-size: 13px; color: var(--ink-45); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1080px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }

.product-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--sand);
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform 0.6s var(--ease); }
.product-card:hover .product-card-media img { transform: scale(1.05); }

.product-card-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--jade-soft);
  color: var(--jade-deep);
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
  margin-bottom: 8px;
}

.product-card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-type { font-size: 11px; color: var(--ink-45); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.product-card-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.25; }
.product-card-desc { font-size: 13px; color: var(--ink-70); line-height: 1.5; margin: 2px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--jade-deep); margin-top: auto; }

.product-card-actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.product-card-actions .btn { flex: 1; padding: 10px 12px; font-size: 12.5px; }
.product-card-actions .btn-outline { border-width: 1.4px; }
.product-card-actions .icon-wa { width: 15px; height: 15px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-45); font-size: 15px; }

/* ==========================================================================
   SHIPPING
   ========================================================================== */
.shipping { padding: 20px 0 90px; }
.shipping-inner {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  background: var(--jade-deep);
  border-radius: var(--radius-l);
  padding: 40px;
  color: var(--bone);
}
@media (min-width: 720px) { .shipping-inner { grid-template-columns: 1fr 1fr; gap: 40px; padding: 48px; } }
.shipping-card h3 { color: var(--white); font-size: 19px; margin-bottom: 16px; font-weight: 500; }
.shipping-card ul { display: flex; flex-direction: column; gap: 10px; }
.shipping-card li { font-size: 14px; line-height: 1.6; color: rgba(248,244,236,0.82); padding-left: 18px; position: relative; }
.shipping-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--blush); }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 19, 15, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  padding: 0;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
@media (min-width: 760px) {
  .modal-overlay { align-items: center; padding: 24px; }
}

.modal {
  background: var(--bone);
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  position: relative;
  box-shadow: var(--shadow-modal);
  transform: translateY(24px);
  transition: transform 0.35s var(--ease);
}
.modal-overlay.is-open .modal { transform: translateY(0); }
@media (min-width: 760px) { .modal { border-radius: var(--radius-l); } }

.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  font-size: 22px; line-height: 1; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.modal-close:hover { transform: rotate(90deg); }

.modal-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 700px) { .modal-grid { grid-template-columns: 0.85fr 1.15fr; } }

.modal-media { background: var(--sand); }
.modal-media img { width: 100%; height: 100%; max-height: 340px; object-fit: cover; object-position: top center; }
@media (min-width: 700px) {
  .modal-media { border-radius: var(--radius-l) 0 0 var(--radius-l); overflow: hidden; }
  .modal-media img { max-height: none; }
}

.modal-body { padding: 30px 28px 34px; }
.modal-type { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--jade); margin-bottom: 8px; }
#modalTitle { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 12px; }
.modal-description { color: var(--ink-70); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; }

.modal-section { margin-bottom: 20px; }
.modal-section h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-45); margin-bottom: 10px; }
.modal-section ul { display: flex; flex-direction: column; gap: 8px; }
.modal-section li { font-size: 14px; line-height: 1.55; color: var(--ink); padding-left: 18px; position: relative; }
.modal-section li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--jade); }

.modal-presentation { font-size: 13px; color: var(--ink-45); font-style: italic; margin-bottom: 22px; }

.modal-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.modal-price { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--jade-deep); }

.modal-legal { padding: 34px 28px; max-width: 620px; }
.legal-body { color: var(--ink-70); font-size: 14px; line-height: 1.7; margin-top: 16px; }
.legal-body p { margin-bottom: 12px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--ink); color: var(--bone); padding-top: 64px; }
.footer-inner {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  padding-bottom: 48px;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
.footer-brand-name { font-family: var(--font-display); font-size: 18px; margin-bottom: 6px; }
.footer-brand-tagline { font-size: 13px; color: rgba(248,244,236,0.55); max-width: 30ch; }

.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(248,244,236,0.5); margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-col a, .footer-col .link-button { display: block; font-size: 14.5px; color: rgba(248,244,236,0.85); margin-bottom: 10px; text-align: left; transition: color 0.2s var(--ease); }
.footer-col a:hover, .footer-col .link-button:hover { color: var(--white); }

.footer-bottom { border-top: 1px solid rgba(248,244,236,0.12); padding: 20px 0; }
.footer-bottom p { font-size: 12.5px; color: rgba(248,244,236,0.5); }

/* ==========================================================================
   FLOATING WHATSAPP (mobile)
   ========================================================================== */
.fab-whatsapp {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--jade);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(63,83,70,0.55);
  transition: transform 0.3s var(--ease);
}
.fab-whatsapp:hover { transform: scale(1.08); }
.fab-whatsapp svg { width: 28px; height: 28px; }
@media (min-width: 900px) { .fab-whatsapp { display: none; } }

/* ==========================================================================
   REVEAL ON SCROLL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
