﻿/* Dormicentro: mejoras UX Home (fase 1) */

/* Ocultar lista raw del menú mobile ANTES de que meanmenu.js cargue (defer flash) */
#mobile-menu > ul { display: none; }

.dc-home-hero {
  padding: 14px 0 8px;
  min-height: 120px;
}

.dc-home-hero__inner {
  border: 1px solid #eadfe3;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #fdf8fa 100%);
  padding: 18px 16px;
}

.dc-home-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a1b45;
  font-weight: 700;
}

.dc-home-hero__title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.2;
  color: #1f1f1f;
}

.dc-home-hero__copy {
  margin: 0;
  color: #505050;
  max-width: 820px;
}

.dc-home-hero__actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dc-home-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: #1f1f1f;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.dc-home-hero__btn:hover,
.dc-home-hero__btn:focus {
  text-decoration: none;
  color: #1f1f1f;
  border-color: #c8c8c8;
}

.dc-home-hero__btn--primary {
  background: #c51751;
  border-color: #c51751;
  color: #fff;
}

.dc-home-hero__btn--primary:hover,
.dc-home-hero__btn--primary:focus {
  color: #fff;
  background: #a81243;
  border-color: #a81243;
}

@media (max-width: 767px) {
  .dc-home-hero {
    padding: 10px 0 4px;
  }

  .dc-home-hero__inner {
    padding: 14px 12px;
  }

  .dc-home-hero__title {
    font-size: 20px;
  }

  .dc-home-hero__actions {
    gap: 6px;
  }

  .dc-home-hero__btn {
    width: 100%;
    min-height: 44px;
  }
}

.dc-home-intent {
  padding: 4px 0 20px;
}

.dc-home-intent__head h3 {
  margin: 0 0 4px;
  font-size: 24px;
  color: #1f1f1f;
}

.dc-home-intent__head p {
  margin: 0 0 12px;
  color: #5d5d5d;
}

.dc-home-intent__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dc-home-intent__card {
  display: block;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  text-decoration: none;
  min-height: 115px;
}

.dc-home-intent__card strong {
  display: block;
  margin: 0 0 6px;
  color: #1f1f1f;
  font-size: 16px;
}

.dc-home-intent__card span {
  display: block;
  color: #5d5d5d;
  font-size: 13px;
  line-height: 1.35;
}

.dc-home-intent__card:hover,
.dc-home-intent__card:focus {
  text-decoration: none;
  border-color: #d4c2c8;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
}

@media (max-width: 991px) {
  .dc-home-intent__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .dc-home-intent {
    padding-bottom: 14px;
  }

  .dc-home-intent__head h3 {
    font-size: 20px;
  }

  .dc-home-intent__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dc-home-intent__card {
    min-height: 0;
  }
}

/* ============================================================
   MOBILE HOME REDESIGN — max-width: 768px
   ============================================================ */

/* Ocultar secciones desktop en mobile */
@media (max-width: 768px) {
  .slider-area-2,
  .dc-home-hero,
  .dc-home-intent,
  .dc-desktop-prods { display: none !important; }

  /* WhatsApp float — posición fija a la derecha, sobre nav */
  .whatsapp-float {
    bottom: 70px !important;
    right: 16px !important;
    z-index: 1099 !important;
  }

  /* Asesor virtual — posición fija a la izquierda, mismo nivel que WA */
  #virtual-advisor-widget {
    bottom: 70px !important;
    right: auto !important;
    left: 16px !important;
  }

  /* Ocultar header desktop en mobile */
  .header-top-area { display: none !important; }
  .header-bottom-right { display: none !important; }
  .top-interesting-area.marcas-portada { display: none !important; }

  /* Fix 1 — reducir margen del logo en mobile */
  .header-bottom-area { padding: 8px 0 !important; }

  /* Espacio para nav inferior fija */
  body { padding-bottom: 64px; }
}

/* Contenedor mobile: oculto por defecto, visible solo en mobile */
.dc-m-home { display: none; }

@media (max-width: 768px) {
  .dc-m-home { display: block; }

  /* Variables de color */
  .dc-m-home {
    --dc-purple-dark: #2d1b69;
    --dc-purple:      #5b21b6;
    --dc-purple-mid:  #7c3aed;
    --dc-purple-light:#c4b5fd;
    --dc-purple-bg:   #f0ebff;
    --dc-border:      #e8e4f0;
  }

  /* ---------- 2. HERO ---------- */
  .dc-m-hero {
    background: #650e7d;
    padding: 32px 20px 28px;
    text-align: center;
    color: #fff;
  }

  .dc-m-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 14px;
  }

  .dc-m-hero__title {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
  }

  .dc-m-hero__sub {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,.85);
  }

  .dc-m-hero__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
  }

  .dc-m-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,.5);
    color: #fff;
    background: transparent;
    min-width: 120px;
  }

  .dc-m-hero__btn--primary {
    background: #fff;
    border-color: #fff;
    color: #2d1b69;
  }

  .dc-m-hero__btn:hover,
  .dc-m-hero__btn:focus { text-decoration: none; }

  /* ---------- 3. TRUST BAR ---------- */
  .dc-m-trust {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #f0ebff;
    border-bottom: 1px solid #e8e4f0;
  }

  .dc-m-trust__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 4px;
    text-align: center;
    gap: 2px;
  }

  .dc-m-trust__icon { font-size: 22px; }

  .dc-m-trust__item strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #2d1b69;
    line-height: 1.2;
  }

  .dc-m-trust__item span {
    font-size: 10px;
    color: #5d5d5d;
  }

  /* ---------- 4. CATEGORÍAS ---------- */
  .dc-m-cats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 14px;
    background: #fff;
  }

  .dc-m-cats__card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f0ebff;
    border: 1px solid #e8e4f0;
    border-radius: 14px;
    padding: 14px 12px;
    text-decoration: none;
    position: relative;
    min-height: 110px;
  }

  .dc-m-cats__card:hover,
  .dc-m-cats__card:focus { text-decoration: none; border-color: #c4b5fd; }

  .dc-m-cats__icon { font-size: 28px; margin-bottom: 2px; }

  .dc-m-cats__card strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2d1b69;
  }

  .dc-m-cats__card span {
    font-size: 11px;
    color: #5d5d5d;
    line-height: 1.35;
  }

  .dc-m-cats__badge {
    display: inline-block;
    margin-top: 6px;
    background: #2d1b69;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-style: normal;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 20px;
    align-self: flex-start;
  }

  /* ---------- 5. OFERTA DESTACADA ---------- */
  .dc-m-oferta { padding: 0 14px 16px; background: #fff; }

  .dc-m-oferta__card {
    background: #2d1b69;
    border-radius: 16px;
    padding: 20px 18px;
    color: #fff;
  }

  .dc-m-oferta__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c4b5fd;
    margin-bottom: 6px;
  }

  .dc-m-oferta__name {
    display: block;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
  }

  .dc-m-oferta__desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
  }

  .dc-m-oferta__discount {
    display: inline-block;
    background: #7c3aed;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
  }

  .dc-m-oferta__pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
  }

  .dc-m-oferta__price {
    font-size: 26px;
    font-weight: 800;
  }

  .dc-m-oferta__old {
    font-size: 14px;
    color: rgba(255,255,255,.5);
    text-decoration: line-through;
  }

  .dc-m-oferta__btn {
    display: block;
    text-align: center;
    background: #fff;
    color: #2d1b69;
    font-weight: 700;
    font-size: 14px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
  }

  .dc-m-oferta__btn:hover,
  .dc-m-oferta__btn:focus { text-decoration: none; }

  /* ---------- 6. MARCAS ---------- */
  .dc-m-marcas {
    padding: 16px 0 16px 14px;
    background: #fff;
    border-top: 1px solid #e8e4f0;
  }

  .dc-m-marcas__title {
    font-size: 13px;
    font-weight: 700;
    color: #5d5d5d;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 10px;
  }

  .dc-m-marcas__scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-right: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .dc-m-marcas__scroll::-webkit-scrollbar { display: none; }

  .dc-m-marcas__chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 7px 14px;
    background: #f0ebff;
    border: 1px solid #e8e4f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #2d1b69;
    text-decoration: none;
    white-space: nowrap;
  }

  .dc-m-marcas__chip:hover,
  .dc-m-marcas__chip:focus { text-decoration: none; background: #e0d7f8; }

  /* ---------- 7. RESEÑA ---------- */
  .dc-m-review {
    padding: 16px 14px;
    background: #f0ebff;
    border-top: 1px solid #e8e4f0;
  }

  .dc-m-review__quote {
    margin: 0 0 12px;
    padding: 0;
    border: none;
    font-size: 14px;
    font-style: italic;
    color: #2d1b69;
    line-height: 1.5;
  }

  .dc-m-review__quote cite {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    color: #5b21b6;
  }

  .dc-m-review__rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #2d1b69;
    font-size: 13px;
    font-weight: 600;
  }

  .dc-m-review__rating:hover,
  .dc-m-review__rating:focus { text-decoration: underline; }

  .dc-m-review__stars { font-size: 16px; color: #f59e0b; }

  /* ---------- 8. WHATSAPP FAB ---------- */
  .dc-m-wa-fab {
    position: fixed !important;
    right: 16px !important;
    bottom: 70px !important;
    z-index: 9999 !important;
    width: 52px;
    height: 52px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37,211,102,.45);
    text-decoration: none;
  }

  .dc-m-wa-fab:hover,
  .dc-m-wa-fab:focus { text-decoration: none; background: #1ebe5a; }

  /* ---------- 9. NAV INFERIOR ---------- */
  .dc-m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    height: 60px;
    background: #fff;
    border-top: 1px solid #e8e4f0;
    display: flex;
    align-items: stretch;
  }

  .dc-m-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #9d9d9d;
    font-size: 10px;
    font-weight: 500;
  }

  .dc-m-bottom-nav__item--active { color: #5b21b6; }

  .dc-m-bottom-nav__item:hover,
  .dc-m-bottom-nav__item:focus { text-decoration: none; color: #5b21b6; }

  .dc-m-bottom-nav__icon { font-size: 20px; }

  /* Ocultar título desktop en mobile */
  .page-title-wrapper { display: none !important; }
}

/* ---------- DRAWER CATEGORÍAS MOBILE ---------- */
@media (max-width: 768px) {
  .dc-drawer-handle {
    width: 36px; height: 4px; background: #ddd;
    border-radius: 2px; margin: 12px auto 16px;
  }
  .dc-drawer-title {
    font-size: 14px; font-weight: 500; color: #2d1b69;
    padding: 0 20px 12px;
    border-bottom: 0.5px solid #e8e4f0;
  }
  .dc-drawer-item {
    display: block;
    padding: 14px 20px;
    border-bottom: 0.5px solid #f0edf8;
    cursor: pointer;
    text-decoration: none;
  }
  .dc-drawer-row {
    display: flex; justify-content: space-between; align-items: center;
  }
  .dc-drawer-name {
    font-size: 14px; font-weight: 500; color: #2d1b69;
  }
  .dc-drawer-arrow {
    font-size: 18px; color: #7c3aed;
    transition: transform 0.2s; display: inline-block;
  }
  .dc-drawer-arrow.open { transform: rotate(90deg); }
  .dc-drawer-sub {
    display: none; padding: 8px 0 0 24px;
  }
  .dc-drawer-sub.visible { display: block; }
  .dc-drawer-sub-link {
    display: block; font-size: 13px; color: #444;
    padding: 7px 0;
    border-bottom: 0.5px solid #f7f5fc;
    text-decoration: none;
  }
  .dc-drawer-sub-link:last-child { border-bottom: none; }
  .dc-drawer-sub-all { color: #7c3aed; font-weight: 500; margin-top: 4px; }
}

/* Botón mobile de filtros — fuera del bloque home, aplica en páginas de categoría/marca */
@media (max-width: 768px) {
  .dc-filter-btn-mobile {
    width: 100%;
    background: #5b21b6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    cursor: pointer;
  }
}
