/* ========== VARIABLES & RESET ========== */
:root {
  --brand: #701625;
  --brand2: #8b2034;
  --brand-light: #f9e6ea;
  --ink: #1a1a1a;
  --muted: #6f6666;
  --soft: #f7f2ef;
  --line: #e9dfdc;
  --white: #fff;
  --success: #25d366;
  --shadow: 0 18px 45px rgba(50,20,20,.1);
  --radius: 24px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; height: auto; }

.container { width: min(1180px, 92%); margin: auto; }

/* ========== UTILIDADES ========== */
.btn,
.btn-outline,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(112,22,37,.25);
}
.btn:hover {
  background: var(--brand2);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(112,22,37,.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand-light);
  border-color: var(--brand);
}

.btn-light {
  background: #fff;
  color: var(--brand);
}
.btn-light:hover {
  background: #f9f9f9;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* ========== TOPBAR ========== */
.topbar {
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== HEADER & NAV ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}
.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}

.logo img { width: 160px; min-width: 120px; }

.menu {
  display: flex;
  gap: 24px;
  align-items: center;
  font-weight: 600;
  color: #332;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a {
  position: relative;
  padding: 6px 0;
}
.menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width var(--transition);
}
.menu a:hover { color: var(--brand); }
.menu a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-btn {
  position: relative;
  padding: 10px 16px;
}
.cart-count {
  position: absolute;
  right: -4px;
  top: -6px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
  padding: 8px;
}

@media (max-width: 900px) {
  .menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    font-size: 1.3rem;
    z-index: 200;
  }
  .menu.open {
    display: flex;
  }
  .hamburger {
    display: block;
    z-index: 210;
  }
}

/* ========== HERO ========== */
.hero {
  background: radial-gradient(circle at 70% 20%, #fff 0, #fff6f4 35%, #f5eee9 100%);
  padding: clamp(50px, 10vw, 90px) 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.05;
  margin: 8px 0 18px;
  color: #251b1b;
}
.hero h1 span { color: var(--brand); }

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-logo { margin: auto; width: min(400px, 100%); }

.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #4d4141;
  transition: var(--transition);
}
.pill:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-pills { justify-content: center; }
  .hero-card { max-width: 360px; margin: auto; }
}

/* ========== SECCIONES ========== */
.section {
  padding: clamp(50px, 8vw, 80px) 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 4px;
  color: #241919;
}

.section p { color: var(--muted); }

/* ========== CATEGORÍAS ========== */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
}
.cat-card:hover {
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.cat-card b {
  font-size: 1.2rem;
  color: var(--ink);
}
.cat-card span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* ========== FILTROS ========== */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.search {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 0.95rem;
  background: #fff;
  transition: var(--transition);
}
.search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(112,22,37,0.1);
}

/* ========== GRILLA DE PRODUCTOS ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}
.product-card.visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
.product-card:hover {
  box-shadow: 0 14px 36px rgba(0,0,0,.08);
  transform: translateY(-6px);
}

.product-img {
  aspect-ratio: 1.2;
  background: #f7f2ef;
  object-fit: cover;
  width: 100%;
  transition: var(--transition);
}
.product-card:hover .product-img { transform: scale(1.04); }

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 4px 10px;
  background: #f2e2e5;
  color: var(--brand);
  letter-spacing: 0.04em;
}
.badge.gray { background: #f2f2f2; color: #555; }
.badge.discount { background: #ffe0b2; color: #b45309; }

.product-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  font-size: 1.5rem;
  color: var(--brand);
  font-weight: 900;
}
.old-price {
  text-decoration: line-through;
  color: #918888;
  font-size: 0.9rem;
  margin-left: 8px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

@media (max-width: 560px) {
  .product-actions { grid-template-columns: 1fr; }
}

/* ========== SECCIÓN ABOUT / CONFIANZA ========== */
.about {
  background: var(--soft);
  border-radius: 30px;
  margin: 0 4%;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
}

.checklist {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #493f3f;
  font-weight: 500;
}
.check::before {
  content: '✓';
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about { margin: 0; border-radius: 0; }
}

/* ========== MAYOREO ========== */
.wholesale {
  background: #1f1718;
  color: #fff;
  border-radius: 34px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.wholesale h2 { color: #fff; }
.wholesale p { color: #ddd; }
.wholesale .btn-light { margin-top: 12px; }

.form {
  display: grid;
  gap: 14px;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: rgba(255,255,255,.95);
  color: #1a1a1a;
  transition: var(--transition);
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}
.form textarea { min-height: 120px; resize: vertical; }

@media (max-width: 700px) {
  .wholesale { grid-template-columns: 1fr; padding: 28px; }
}

/* ========== FOOTER ========== */
.footer {
  background: #130e0f;
  color: #fff;
  padding: 50px 0 30px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}
.footer p, .footer a { color: #d8cccc; font-size: 0.9rem; }
.footer a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* ========== BOTONES FLOTANTES ========== */
.float-wa {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 50;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 30px;
  box-shadow: 0 10px 28px rgba(37,211,102,.45);
  transition: var(--transition);
  text-decoration: none;
}
.float-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 34px rgba(37,211,102,.6);
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 170px;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: none;
  place-items: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  transition: var(--transition);
}
.scroll-top.visible { display: grid; }

/* ========== CHAT ========== */
.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
}

.chat-toggle {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}
.chat-toggle:hover {
  background: var(--brand2);
  transform: translateY(-2px);
}

.chat-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(380px, calc(100vw - 30px));
  height: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  overflow: hidden;
  flex-direction: column;
}
.chat-panel.open {
  display: flex;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-head {
  background: var(--brand);
  color: #fff;
  padding: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-messages {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #fffaf8;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 0.88rem;
  animation: msgPop 0.2s ease;
}
@keyframes msgPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.bot {
  background: #fff;
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.user {
  background: var(--brand);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 12px 16px;
  font-size: 0.9rem;
}
.chat-form button {
  border: none;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

/* ========== CARRITO DRAWER ========== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.drawer.open { display: block; }

.drawer-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(440px, 92vw);
  background: #fff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: -20px 0 60px rgba(0,0,0,.15);
  animation: slideRight 0.3s ease;
}
@keyframes slideRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.close {
  border: none;
  background: #f2eeee;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  cursor: pointer;
}

.cart-items { flex: 1; overflow-y: auto; display: grid; gap: 16px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cart-item img {
  width: 64px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  background: #eee;
}

.qty {
  display: flex;
  gap: 8px;
  align-items: center;
}
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.cart-total {
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
}

/* ========== RESPONSIVE GLOBAL ========== */
@media (max-width: 560px) {
  .container { width: 94%; }
  .product-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f1718;
  color: #fff;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
}
.toast.hide {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}