/* ═══════════════════════════════════════════════════
   SIFRINA · main.css — Estilos globales
   ═══════════════════════════════════════════════════ */

:root {
  --purple-darkest: #0f0514;
  --purple-dark:    #1a0a1e;
  --purple-main:    #7a3fa0;
  --purple-mid:     #a855d8;
  --purple-light:   #c77dff;
  --purple-pale:    #f5eef9;
  --purple-border:  #e0c6f0;
  --purple-muted:   #9b72b0;

  --text-dark:   #1a0a1e;
  --text-mid:    #4a3d52;
  --text-muted:  #8a7a92;
  --text-light:  #c0b0c8;

  --success: #2e9e5b;
  --error:   #c0392b;
  --warning: #e67e22;

  --white:   #ffffff;
  --bg-soft: #faf7fd;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(106,47,160,0.08);
  --shadow-md: 0 6px 24px rgba(106,47,160,0.13);
  --shadow-lg: 0 16px 48px rgba(106,47,160,0.18);

  --transition: .22s ease;
  --container:  1200px;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Utilidades ──────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section    { padding: 64px 0; }
.section-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 32px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--purple-main);
  transition: color var(--transition);
}
.section-link:hover { color: var(--purple-mid); }

/* ── Botones globales ────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--purple-main), var(--purple-mid));
  color: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  letter-spacing: 0.02em;
}
.btn-primary:hover  { opacity: .9; }
.btn-primary:active { transform: scale(.97); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: var(--radius-xl);
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.8);
}

/* ── Header ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--purple-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.site-logo {
  font-size: 22px;
  font-weight: 700;
  color: #e8c8f5;
  letter-spacing: .14em;
  flex-shrink: 0;
}
.site-logo span { color: var(--purple-light); }

.site-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.site-nav a {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.site-nav a:hover   { color: var(--white); background: rgba(199,125,255,.15); }
.site-nav .nav-oferta { color: var(--purple-light); }

/* Búsqueda */
.header-search {
  position: relative;
  flex: 0 1 320px;
}
.header-search input {
  width: 100%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(199,125,255,.25);
  border-radius: 20px;
  padding: 8px 40px 8px 16px;
  font-size: 13px;
  color: var(--white);
  outline: none;
  transition: background var(--transition), border-color var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,.45); }
.header-search input:focus {
  background: rgba(255,255,255,.14);
  border-color: rgba(199,125,255,.6);
}
.header-search button {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,.5);
  padding: 0;
  transition: color var(--transition);
}
.header-search button:hover { color: var(--purple-light); }

/* Dropdown búsqueda */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 340px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.search-dropdown.visible { display: block; }
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--purple-pale);
}
.search-item:hover { background: var(--purple-pale); }
.search-item img   { width: 40px; height: 44px; object-fit: cover; border-radius: 6px; }
.search-item-name  { font-size: 13px; font-weight: 500; }
.search-item-price { font-size: 12px; color: var(--purple-main); font-weight: 600; }

/* Acciones header */
.header-actions { display: flex; align-items: center; gap: 4px; }
.action-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
}
.action-btn:hover { color: var(--white); background: rgba(199,125,255,.15); }
.cart-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 9px; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* Menú mobile */
.menu-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  padding: 6px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.75);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #140820;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(199,125,255,.15);
}
.mobile-nav a {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 0;
  border-bottom: 1px solid rgba(199,125,255,.1);
}

/* ── Trust bar ───────────────────────────────────── */
.trust-bar { background: var(--purple-pale); border-bottom: 1px solid var(--purple-border); }
.trust-items {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--purple-main);
}

/* ── Hero ────────────────────────────────────────── */
.hero-slider { background: linear-gradient(135deg, var(--purple-darkest) 0%, #3d1060 60%, #1a0a1e 100%); }
.hero-slide  { padding: 80px 0; }
.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
}
.hero-tag {
  display: inline-block;
  background: rgba(199,125,255,.2);
  color: var(--purple-light);
  border: 1px solid rgba(199,125,255,.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-text h1 {
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.12;
  margin-bottom: 16px;
}
.hero-text h1 strong {
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple-light), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text p  { color: rgba(255,255,255,.72); font-size: 16px; margin-bottom: 28px; max-width: 420px; }
.hero-ctas    { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img img { border-radius: var(--radius-lg); max-height: 520px; object-fit: cover; }

/* ── Categorías ──────────────────────────────────── */
.categories-section { background: var(--bg-soft); }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.category-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--purple-border);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-img { aspect-ratio: 1 / 1.1; overflow: hidden; }
.category-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.category-card:hover .category-img img { transform: scale(1.05); }
.category-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--purple-pale), #edd8f8);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700;
  color: var(--purple-main);
}
.category-info { padding: 12px; }
.category-name  { display: block; font-size: 13px; font-weight: 600; color: var(--text-dark); }
.category-count { font-size: 11px; color: var(--text-muted); }

/* ── Grilla de productos ─────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── Tarjeta de producto ─────────────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--purple-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card.out-of-stock { opacity: .7; }

.product-img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--purple-pale);
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700;
  color: var(--purple-main);
  background: linear-gradient(135deg, var(--purple-pale), #edd8f8);
}

/* Badges */
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; }
.badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: .04em;
}
.badge-sale  { background: var(--purple-main); color: var(--white); }
.badge-new   { background: var(--success); color: var(--white); }
.badge-stock { background: var(--error); color: var(--white); }

/* Acciones rápidas */
.product-quick-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.product-card:hover .product-quick-actions { opacity: 1; transform: translateX(0); }
.quick-action {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--purple-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-main);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition);
}
.quick-action:hover { background: var(--purple-main); color: var(--white); }
.quick-action.active { background: var(--purple-main); color: var(--white); }

/* Info producto */
.product-info { padding: 14px; }
.product-category { font-size: 10px; font-weight: 600; color: var(--purple-muted); text-transform: uppercase; letter-spacing: .06em; }
.product-name { font-size: 14px; font-weight: 500; color: var(--text-dark); margin: 4px 0 6px; line-height: 1.35; }
.product-name a:hover { color: var(--purple-main); }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.star-on  { color: var(--purple-light); font-size: 12px; }
.star-off { color: var(--text-light); font-size: 12px; }
.rating-count { font-size: 11px; color: var(--text-muted); }

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-prices { display: flex; flex-direction: column; }
.price-current  { font-size: 16px; font-weight: 700; color: var(--purple-main); }
.price-original { font-size: 12px; text-decoration: line-through; color: var(--text-muted); }

.btn-add-cart {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--purple-pale);
  border: 1px solid var(--purple-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-main);
  transition: background var(--transition), color var(--transition);
}
.btn-add-cart:hover { background: var(--purple-main); color: var(--white); }

/* ── Banner promo ────────────────────────────────── */
.promo-banner {
  background: linear-gradient(135deg, #3d1060, var(--purple-dark));
  padding: 64px 0;
}
.promo-tag {
  display: inline-block;
  background: rgba(199,125,255,.2);
  color: var(--purple-light);
  border: 1px solid rgba(199,125,255,.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.promo-text h2 { font-size: clamp(24px, 3vw, 38px); font-weight: 300; color: var(--white); margin-bottom: 24px; }
.promo-text h2 strong { font-weight: 700; color: var(--purple-light); }

/* ── Reseñas ─────────────────────────────────────── */
.reviews-section { background: var(--bg-soft); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.review-card {
  background: var(--white);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 24px;
}
.review-stars  { color: var(--purple-light); font-size: 18px; margin-bottom: 10px; }
.review-card p { font-size: 14px; color: var(--text-mid); line-height: 1.65; font-style: italic; margin-bottom: 16px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.review-author span { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────── */
.site-footer    { background: var(--purple-dark); color: rgba(255,255,255,.75); margin-top: 40px; }
.footer-grid    { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 40px; padding: 56px 20px; }
.footer-logo    { font-size: 22px; font-weight: 700; color: #e8c8f5; letter-spacing: .14em; margin-bottom: 12px; }
.footer-logo span { color: var(--purple-light); }
.footer-brand p { font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.footer-social  { display: flex; gap: 12px; }
.footer-social a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-social a:hover { color: var(--purple-light); }

.footer-col h4  { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 14px; letter-spacing: .04em; }
.footer-col ul  { display: flex; flex-direction: column; gap: 8px; }
.footer-col a   { font-size: 13px; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col a:hover { color: var(--purple-light); }
.footer-col p   { font-size: 13px; margin-bottom: 12px; }

.newsletter-form { display: flex; gap: 8px; margin-bottom: 20px; }
.newsletter-form input {
  flex: 1; background: rgba(255,255,255,.08);
  border: 1px solid rgba(199,125,255,.25);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--white);
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form button {
  background: var(--purple-main);
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.newsletter-form button:hover { opacity: .85; }
.footer-badges { display: flex; gap: 8px; align-items: center; opacity: .6; }

.footer-bottom {
  border-top: 1px solid rgba(199,125,255,.15);
  padding: 16px 20px;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: rgba(255,255,255,.45); transition: color var(--transition); }
.footer-links a:hover { color: var(--purple-light); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav   { display: none; }
  .menu-toggle { display: flex; }
  .header-search { flex: 0 1 200px; }

  .hero-content { grid-template-columns: 1fr; }
  .hero-img     { display: none; }
  .hero-slide   { padding: 48px 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .trust-items  { gap: 16px; }
  .trust-item span { display: none; }
  .footer-grid  { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}