:root {
  --blush-50: #fdf3f1;
  --blush-100: #fbe9e6;
  --blush-200: #f6d4ce;
  --rose-300: #f0b8b9;
  --rose-400: #e8a7ab;
  --rose-gold-500: #cf9e84;
  --rose-gold-600: #c9a27a;
  --gold-500: #c9a227;
  --gold-600: #a9871f;
  --ink-900: #2b2320;
  --ink-700: #4a3c36;
  --ink-500: #6b5a52;
  --ink-300: #a89a92;
  --cream-0: #fffaf8;
  --white: #ffffff;
  --success: #4f8a6a;
  --danger: #c05656;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;

  --shadow-sm: 0 2px 8px rgba(43, 35, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(43, 35, 32, 0.12);
  --shadow-lg: 0 20px 50px rgba(43, 35, 32, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--blush-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0 0 .5em; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--blush-200);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2.5px var(--white), 0 0 0 4px var(--gold-500), var(--shadow-md);
}
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: .5px; color: var(--ink-900); }

.main-nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav-link {
  padding: 10px 14px;
  font-weight: 500;
  font-size: .95rem;
  color: var(--ink-700);
  border-radius: 999px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--blush-100); color: var(--ink-900); }
.caret { font-size: .7em; opacity: .7; }

.nav-dropdown { position: relative; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .9rem;
  color: var(--ink-700);
}
.dropdown-panel a:hover { background: var(--blush-100); color: var(--ink-900); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  position: relative;
  border: none;
  background: var(--blush-100);
  color: var(--ink-900);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}
.icon-btn:hover { background: var(--rose-300); transform: translateY(-1px); }
.lang-btn {
  border: none;
  background: var(--blush-100);
  border-radius: 999px;
  height: 42px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--ink-500);
}
.lang-btn span { padding: 6px 9px; border-radius: 999px; transition: background .2s, color .2s; }
.lang-btn:hover span:not(.active) { color: var(--ink-900); }
.lang-btn span.active { background: var(--ink-900); color: var(--white); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold-500);
  color: var(--white);
  font-size: .68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--white);
}
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
.app-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 70px; min-height: 60vh; }

.breadcrumbs { font-size: .85rem; color: var(--ink-500); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--ink-900); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  border-radius: 24px;
  overflow: hidden;
  padding: 64px 40px;
  background: linear-gradient(135deg, var(--blush-100), var(--rose-300) 60%, var(--rose-gold-600));
  text-align: center;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/assets/logo.jpg') center center / 340px no-repeat;
  opacity: 0.16;
  filter: saturate(1.1);
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: .78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-700);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 14px; color: var(--ink-900); }
.hero p { max-width: 520px; margin: 0 auto 26px; color: var(--ink-700); font-size: 1.05rem; }

/* ---------- Category cards (home) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.category-card {
  position: relative;
  border-radius: var(--radius);
  padding: 46px 30px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .25s, box-shadow .25s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card.cosmeticos { background: linear-gradient(140deg, #f6c9c2, #e6a7ab 70%); }
.category-card.accesorios { background: linear-gradient(140deg, #e9d7c9, #cdae8a 70%); }
.category-card h3 { color: var(--ink-900); font-size: 1.7rem; margin-bottom: 4px; }
.category-card span { color: var(--ink-700); font-size: .9rem; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-title h2 { font-size: 1.5rem; }
.section-title .see-all { font-size: .85rem; color: var(--gold-600); font-weight: 600; }

/* ---------- Subcategory cards ---------- */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.subcat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blush-200);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.subcat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rose-300); }
.subcat-card .subcat-icon {
  width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-300), var(--rose-gold-600));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-family: var(--font-display); font-weight: 700;
}
.subcat-card h4 { font-size: 1rem; margin: 0; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blush-200);
  cursor: pointer;
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.product-card .thumb { aspect-ratio: 1/1; background: var(--blush-100); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .stock-badge { font-size: .7rem; font-weight: 600; color: var(--success); }
.product-card .stock-badge.low { color: var(--gold-600); }
.product-card h4 { font-size: .96rem; margin: 0; line-height: 1.3; }
.product-card .price { margin-top: auto; font-family: var(--font-display); font-weight: 700; color: var(--ink-900); font-size: 1.05rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: .92rem;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--ink-900), #3a2d28);
  color: var(--gold-500);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-gold {
  background: linear-gradient(135deg, var(--rose-gold-600), var(--gold-500));
  color: var(--white);
}
.btn-gold:hover { box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ink-900);
  color: var(--ink-900);
}
.btn-outline:hover { background: var(--ink-900); color: var(--white); }
.btn-ghost { background: var(--blush-100); color: var(--ink-900); }
.btn-ghost:hover { background: var(--rose-300); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 35, 32, 0.55);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn .18s ease-out;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  background: var(--cream-0);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  animation: popIn .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--blush-100);
  color: var(--ink-900);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: background .2s, transform .15s;
}
.modal-close:hover { background: var(--rose-300); transform: rotate(90deg); }

.modal-title { margin-bottom: 18px; padding-right: 36px; }

/* Product modal */
.product-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .product-modal-grid { grid-template-columns: 1fr; } }

.gallery-main {
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--blush-100);
  margin-bottom: 10px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
  cursor: pointer; border: 2px solid transparent; opacity: .7;
}
.gallery-thumbs img.active { border-color: var(--gold-500); opacity: 1; }

.product-detail .stock-badge { display: inline-block; margin-bottom: 10px; }
.product-detail h2 { font-size: 1.5rem; margin-bottom: 8px; }
.product-detail .price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink-900); margin: 10px 0 16px; }
.product-detail .description { color: var(--ink-500); font-size: .94rem; margin-bottom: 22px; }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--blush-200); border-radius: 999px; overflow: hidden; }
.qty-control button {
  width: 38px; height: 38px; border: none; background: var(--blush-100);
  font-size: 1.1rem; color: var(--ink-900); display: flex; align-items: center; justify-content: center;
}
.qty-control button:hover { background: var(--rose-300); }
.qty-control span { width: 40px; text-align: center; font-weight: 600; }

.product-actions { display: flex; flex-direction: column; gap: 12px; }

/* Cart modal */
.cart-items { display: grid; gap: 14px; margin-bottom: 20px; }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--blush-200);
}
.cart-item .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--blush-100); }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .meta h5 { margin: 0 0 4px; font-size: .92rem; }
.cart-item .meta .unit { font-size: .78rem; color: var(--ink-500); }
.cart-item .line-total { font-weight: 700; font-family: var(--font-display); white-space: nowrap; }
.cart-item .row-actions { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; justify-content: space-between; }
.cart-item .remove-btn { background: none; border: none; color: var(--danger); font-size: .8rem; font-weight: 600; }

.cart-summary { border-top: 1px dashed var(--blush-200); padding-top: 16px; display: grid; gap: 8px; margin-bottom: 18px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-500); }
.cart-summary .row.total { font-size: 1.15rem; color: var(--ink-900); font-weight: 700; font-family: var(--font-display); }

/* Customer form */
.customer-form { display: grid; gap: 16px; margin-top: 6px; }
.customer-form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink-700); }
.customer-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--blush-200);
  font-family: inherit;
  font-size: .95rem;
  background: var(--white);
}
.customer-form input:focus { outline: none; border-color: var(--rose-gold-600); }
.form-hint { font-size: .85rem; color: var(--ink-500); margin: -6px 0 2px; }

/* Status modal */
.status-modal { max-width: 420px; text-align: center; padding: 40px 30px; }
.status-icon { font-size: 2.4rem; margin-bottom: 14px; }
.status-modal h3 { margin-bottom: 10px; }
.status-modal p { color: var(--ink-500); font-size: .92rem; margin-bottom: 20px; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--blush-200); border-top-color: var(--rose-gold-600);
  margin: 0 auto 16px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--ink-900); color: var(--gold-500);
  padding: 13px 22px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 200;
  animation: toastIn .25s ease-out;
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: var(--blush-100); margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 36px 24px; text-align: center; }
.footer-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 12px;
  box-shadow: 0 0 0 2.5px var(--ink-900), 0 0 0 4px var(--gold-500);
}
.footer-tagline { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 6px; }
.footer-note { font-size: .78rem; color: var(--ink-300); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .main-nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); padding: 10px 16px 18px; box-shadow: var(--shadow-md);
  }
  .main-nav.open .dropdown-panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; }
  .main-nav.open .nav-dropdown.open .dropdown-panel { display: grid; }
  .category-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { gap: 8px; padding: 10px 16px; }
  .brand { gap: 8px; min-width: 0; flex-shrink: 1; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: 1.05rem; }
  .header-actions { gap: 6px; margin-left: auto; }
  .lang-btn { height: 38px; padding: 3px; }
  .lang-btn span { padding: 5px 7px; }
  .icon-btn { width: 38px; height: 38px; }
}
@media (max-width: 340px) {
  .brand-name { display: none; }
}

/* Enlaces legales del pie y aviso de privacidad del formulario */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 14px; font-size: .8rem; }
.footer-legal a { color: var(--blush-100); opacity: .8; }
.footer-legal a:hover { opacity: 1; }
.customer-form label.consent { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .8rem; line-height: 1.45; color: var(--ink-500); }
.customer-form label.consent input { width: auto; margin-top: 3px; flex: none; }
.customer-form label.consent a { color: var(--rose-gold-600); }
