/* EDITORIAL CÁLIDO — Beige + Dorado + Playfair Display */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #2d2d2d;
  --color-accent: #8B7355;
  --color-text: #333333;
  --color-text-light: #999999;
  --color-bg: #FAFAF8;
  --color-bg-alt: #F2F0EC;
  --color-border: #E5E3DF;
  --color-white: #ffffff;
  --color-whatsapp: #25D366;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Playfair Display', serif;
  --container-max: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --transition: 0.3s ease;
}

.placeholder-0 { background: #D4C5A9 }
.placeholder-1 { background: #A8B5A0 }
.placeholder-2 { background: #C4A6A0 }
.placeholder-3 { background: #8E9AAB }
.placeholder-4 { background: #C2956B }
.placeholder-5 { background: #E8DCC8 }
.placeholder-6 { background: #9B9B7A }
.placeholder-7 { background: #B8A9C9 }

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0 }

html { scroll-behavior: smooth }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased
}

a { text-decoration: none; color: inherit }
button { cursor: pointer; border: none; background: none; font-family: inherit }
input { font-family: inherit }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
  white-space: nowrap
}

.btn--primary { background: var(--color-primary); color: var(--color-white) }
.btn--primary:hover { background: var(--color-secondary); transform: translateY(-2px) }
.btn--whatsapp { background: var(--color-whatsapp); color: #fff }
.btn--whatsapp:hover { background: #1ebe57; transform: translateY(-2px) }
.btn--full { width: 100% }

.section__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-primary)
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 248, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition)
}

.header.scrolled { box-shadow: var(--shadow) }

.header__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary)
}

.header__nav {
  display: none;
  align-items: center;
  gap: 32px
}

.header__nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
  position: relative
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition)
}

.header__nav-link:hover { color: var(--color-accent) }
.header__nav-link:hover::after { width: 100% }

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px
}

.header__cart {
  position: relative;
  padding: 6px;
  color: var(--color-text);
  transition: color var(--transition)
}

.header__cart:hover { color: var(--color-accent) }

.header__cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--color-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0);
  transition: all var(--transition)
}

.header__cart-badge.visible { opacity: 1; transform: scale(1) }

.header__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px
}

.header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition)
}

.header__hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px) }
.header__hamburger.active span:nth-child(2) { opacity: 0 }
.header__hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px) }

/* ===== Menú mobile (CORREGIDO) ===== */
@media(max-width:768px) {
  .header__nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1500;
    background: var(--color-white);
    flex-direction: column;
    display: flex;
    align-items: stretch;
    padding: 24px 20px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition)
  }

  .header__nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all
  }

  .header__nav-link { font-size: 1.05rem }

  .header__hamburger {
    position: relative;
    z-index: 1600
  }

  .section__title { font-size: 1.5rem; margin-bottom: 24px }
}

@media(min-width:769px) {
  .header__nav { display: flex }
  .header__hamburger { display: none }
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition)
}

.cart-overlay.active { opacity: 1; pointer-events: all }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--color-white);
  z-index: 1600;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, .12)
}

.cart.active { transform: translateX(0) }

.cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border)
}

.cart__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-primary)
}

.cart__close {
  font-size: 1.8rem;
  color: var(--color-text-light);
  line-height: 1;
  transition: color var(--transition)
}

.cart__close:hover { color: var(--color-primary) }

.cart__body { flex: 1; overflow-y: auto; padding: 16px 24px }
.cart__empty { text-align: center; color: var(--color-text-light); padding: 40px 0 }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  animation: fadeInUp .3s ease
}

.cart-item__color {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center
}

.cart-item__color-name {
  font-size: .55rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
  opacity: .6
}

.cart-item__info { flex: 1; min-width: 0 }

.cart-item__name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.cart-item__price { font-size: .85rem; font-weight: 600; color: var(--color-accent) }

.cart-item__remove {
  align-self: center;
  color: var(--color-text-light);
  font-size: 1.2rem;
  padding: 4px;
  transition: color var(--transition)
}

.cart-item__remove:hover { color: #d44 }

.cart__footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--color-border);
  display: none
}

.cart__footer.visible { display: block }

.cart__total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-primary)
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-primary);
  overflow: hidden
}

.hero__content { position: relative; z-index: 1; padding: 20px; max-width: 700px }

.hero__eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
  animation: fadeInUp .8s ease
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
  animation: fadeInUp .8s ease .15s both
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, .6);
  margin-bottom: 36px;
  animation: fadeInUp .8s ease .3s both
}

.hero .btn { animation: fadeInUp .8s ease .45s both }

.catalog { padding: 80px 20px; background: var(--color-bg) }
.catalog__container { max-width: var(--container-max); margin: 0 auto }
.catalog__controls { margin-bottom: 32px }

.catalog__search {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 24px;
  display: block;
  padding: 14px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none
}

.catalog__search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, .12)
}

/* ===== CATEGORÍAS COMO TARJETAS VERTICALES CON IMAGEN ===== */
.catalog__filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center
}

.filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--color-white);
  box-shadow: var(--shadow);
  transition: all var(--transition)
}

.filter-btn img {
  width: 100%;
  height: 90px;
  object-fit: cover
}

.filter-btn span {
  padding: 10px 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text)
}

.filter-btn:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px)
}

.filter-btn.active {
  border-color: var(--color-primary)
}

.filter-btn.active span {
  color: var(--color-primary)
}

.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px
}

.catalog__no-results {
  display: none;
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  padding: 60px 20px
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  animation: fadeInUp .6s ease both
}

.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg) }

.product-card__placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .5s ease
}

.product-card:hover .product-card__placeholder { transform: scale(1.03) }

.product-card__placeholder-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(0, 0, 0, .35);
  text-align: center;
  padding: 20px
}

.product-card__info { padding: 16px 20px 20px }

.product-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px
}

.product-card__name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-primary);
  flex: 1;
  margin-right: 8px
}

.product-card__price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap
}

.product-card__category { font-size: .75rem; color: var(--color-text-light); margin-bottom: 12px }

.product-card__add {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-white);
  transition: all var(--transition)
}

.product-card__add:hover { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-white) }
.product-card__add.added { border-color: var(--color-whatsapp); background: #e8faf0; color: #1ebe57 }

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease
}

.modal.active { opacity: 1; pointer-events: all }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px)
}

.modal__content {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius);
  max-width: 700px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.92) translateY(16px);
  transition: transform .3s ease
}

.modal.active .modal__content { transform: scale(1) translateY(0) }

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  color: var(--color-white);
  z-index: 2;
  transition: opacity var(--transition);
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .3)
}

.modal__close:hover { opacity: .7 }

.modal__body { display: flex; flex-direction: column }

.modal__image-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal__image-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  color: rgba(0, 0, 0, .25)
}

.modal__info { padding: 28px }

.modal__category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  font-size: .8rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 12px
}

.modal__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 8px
}

.modal__price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px
}

.modal__description {
  color: var(--color-text-light);
  margin-bottom: 24px;
  line-height: 1.7
}

.modal__add-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition)
}

.modal__add-btn.not-in-cart { background: var(--color-primary); color: var(--color-white) }
.modal__add-btn.not-in-cart:hover { background: var(--color-secondary); transform: translateY(-1px) }
.modal__add-btn.in-cart { background: #e8faf0; color: #1ebe57; border: 1px solid var(--color-whatsapp) }

/* ===== UBICACIÓN (mapa, sección propia) ===== */
.ubicacion { padding: 80px 20px; background: var(--color-bg) }
.ubicacion__container { max-width: var(--container-max); margin: 0 auto }
.ubicacion__map { width: 100% }
.ubicacion__map iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow)
}

/* ===== FOOTER (Contacto + marca) ===== */
.footer { background: var(--color-primary); color: rgba(255, 255, 255, .8) }
.footer__container { max-width: var(--container-max); margin: 0 auto }

.footer__sections {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 64px 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .12)
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 16px;
  text-align: center
}

.footer__contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
  text-align: center
}

.footer__contact-item h4 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 6px
}

.footer__contact-item p,
.footer__contact-item a {
  font-size: .95rem;
  color: rgba(255, 255, 255, .8);
  transition: color var(--transition)
}

.footer__contact-item a:hover { color: #fff }

.footer__socials {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 6px
}

.footer__socials a {
  color: rgba(255, 255, 255, .6);
  transition: color var(--transition), transform var(--transition)
}

.footer__socials a:hover {
  color: var(--color-accent);
  transform: translateY(-2px)
}

.footer__bottom {
  padding: 24px 20px;
  text-align: center
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px
}

.footer__copy { font-size: .8rem; color: rgba(255, 255, 255, .35) }

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .4);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: pulse 2s infinite
}

.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37, 211, 102, .5) }

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, .4) }
  50% { box-shadow: 0 4px 28px rgba(37, 211, 102, .6) }
}

@media(min-width:768px) {
  .modal__body { flex-direction: row }
  .modal__image-wrapper { width: 50%; flex-shrink: 0; aspect-ratio: auto; min-height: 350px }
  .modal__info { width: 50%; padding: 32px }
}

@media(min-width:1024px) {
  .catalog__grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) }
  .ubicacion { padding: 80px 20px 0 }
}

/* IMÁGENES DE PRODUCTOS */
.product-card__placeholder { position: relative; overflow: hidden }
.product-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.modal__image-wrapper { position: relative; overflow: hidden }
.modal__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.cart-item__img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm) }

/* MOBILE — footer en columna */
@media(max-width:768px) {
  .footer__sections { gap: 36px; padding: 48px 20px 32px }
  .footer__contact { grid-template-columns: repeat(2, 1fr); gap: 20px }
  .ubicacion { padding: 48px 16px }
  .ubicacion__map iframe { height: 280px }
  .filter-btn { width: 100px }
  .filter-btn img { height: 70px }
}