/**
 * Cromo + layout móvil 375 — Figma demo-b · m · (Mobile Header / Footer / Menú).
 * Breakpoint 768px (paridad demo-a-mobile.css / FR-046 / HU 22).
 */

html {
  overflow-x: clip;
}

body.dpy-demo-b {
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body.dpy-demo-b *,
body.dpy-demo-b *::before,
body.dpy-demo-b *::after {
  box-sizing: border-box;
}

/* Desktop: hamburger oculto */
.dpy-mobile-menu-btn {
  display: none;
}

.dpy-mobile-drawer[hidden] {
  display: none !important;
}

/* ——— Drawer (paridad demo-a; marca magenta demo-b) ——— */
.dpy-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  pointer-events: none;
}

.dpy-mobile-drawer.is-open {
  pointer-events: auto;
}

.dpy-mobile-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 28, 0.45);
}

.dpy-mobile-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 16px 24px;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(17, 18, 28, 0.18);
  transform: translateX(-104%);
  transition: transform 0.22s ease;
}

.dpy-mobile-drawer.is-open .dpy-mobile-drawer__panel {
  transform: translateX(0);
}

.dpy-mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dpy-mobile-drawer__title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
}

.dpy-mobile-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #1a1a1a;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.dpy-mobile-drawer__close .material-icons {
  font-size: 22px;
}

.dpy-mobile-drawer__section-label {
  margin: 12px 0 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7380;
}

.dpy-mobile-drawer__cats,
.dpy-mobile-drawer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dpy-mobile-drawer__links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  min-height: 44px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 1px solid #eef0f3;
  text-decoration: none;
}

.dpy-mobile-drawer__links .material-icons {
  font-size: 20px;
  color: var(--dpy-magenta, #e91e8c);
}

.dpy-mobile-drawer__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  min-height: 44px;
  background: var(--dpy-magenta, #e91e8c);
  color: #fff !important;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.dpy-mobile-drawer__wa .material-icons {
  font-size: 18px;
}

body.dpy-mobile-nav-open {
  overflow: hidden;
}

body.dpy-mobile-nav-open #main-header,
body.dpy-mobile-nav-open #top-bar {
  padding-right: var(--dpy-scrollbar-comp, 0px);
}

@media (min-width: 769px) {
  .dpy-mobile-drawer {
    display: none !important;
  }
}

/* ——— Breakpoint móvil ——— */
@media (max-width: 768px) {
  .dpy-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #1a1a1a;
    background: transparent;
    border: 0;
    cursor: pointer;
    order: 1;
  }

  .dpy-mobile-menu-btn .material-icons {
    font-size: 26px;
    line-height: 1;
  }

  body.dpy-demo-b #main-header .hdr-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 0 8px;
  }

  body.dpy-demo-b #main-header .site-logo {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 140px);
  }

  body.dpy-demo-b #main-header .logo-sub {
    display: none;
  }

  body.dpy-demo-b #main-header .logo-name {
    font-size: 16px;
  }

  body.dpy-demo-b #main-header .hdr-icons {
    order: 3;
    margin-left: auto;
    gap: 0;
  }

  body.dpy-demo-b #main-header .hdr-icons .lbl {
    display: none;
  }

  body.dpy-demo-b #main-header .hdr-icon-btn {
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
  }

  body.dpy-demo-b #main-header .hdr-icon-btn .material-icons {
    font-size: 24px;
  }

  body.dpy-demo-b #main-header .hdr-search {
    order: 4;
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
  }

  body.dpy-demo-b #main-header .search-box {
    width: 100%;
    height: 44px;
  }

  body.dpy-demo-b #main-header .search-box input {
    font-size: 13px;
    width: 100%;
  }

  body.dpy-demo-b #main-header .hdr-search-label {
    display: none;
  }

  body.dpy-demo-b #main-header .search-box button {
    padding: 0 12px;
    min-width: 44px;
  }

  /* Nav categorías: solo en home (markup); visible también en móvil */
  body.dpy-demo-b #main-nav {
    display: block;
    border-top: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.dpy-demo-b #main-nav .nav-row {
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 4px;
    min-width: max-content;
  }

  body.dpy-demo-b #main-nav .nav-link {
    font-size: 11px;
    padding: 10px 10px;
    white-space: nowrap;
  }

  body.dpy-demo-b #main-nav .nav-link .material-icons {
    font-size: 16px;
  }

  body.dpy-demo-b #main-nav .nav-sep {
    flex-shrink: 0;
  }

  /* Announcement compacto */
  body.dpy-demo-b #top-bar {
    height: auto;
    min-height: 36px;
  }

  body.dpy-demo-b #top-bar .tb-left span {
    font-size: 11px;
    white-space: normal;
  }

  /* Footer: sin Atención (links en menú); stack brand + subscribe/contact */
  body.dpy-demo-b #main-footer .f-col--support {
    display: none !important;
  }

  body.dpy-demo-b #main-footer .footer-grid {
    flex-direction: column;
    gap: 28px;
    padding-bottom: 28px;
  }

  body.dpy-demo-b #main-footer .f-col-brand,
  body.dpy-demo-b #main-footer .f-col {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  body.dpy-demo-b #main-footer .f-consent p,
  body.dpy-demo-b #main-footer .f-consent label {
    width: auto;
    max-width: 100%;
  }

  body.dpy-demo-b #main-footer .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* ——— Home (T273) ——— */
  body.dpy-demo-b .feat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0 24px;
  }

  body.dpy-demo-b .feat-card {
    max-width: 100%;
  }

  body.dpy-demo-b .cat-bar {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  body.dpy-demo-b .cat-bar-name {
    font-size: 13px;
    white-space: normal;
  }

  body.dpy-demo-b .cat-bar-desde .d-price {
    font-size: 15px;
  }

  body.dpy-demo-b .cat-bar-model {
    display: flex;
    width: 40px;
    flex-shrink: 0;
  }

  body.dpy-demo-b .cat-bar-model .material-icons {
    font-size: 34px;
  }

  body.dpy-demo-b .btn-ver {
    padding: 6px 10px;
    font-size: 10px;
  }

  body.dpy-demo-b .trust-row {
    flex-direction: column;
  }

  body.dpy-demo-b .trust-item + .trust-item {
    border-left: none;
    border-top: 1px solid #eee;
  }

  body.dpy-demo-b #hero {
    min-height: 320px;
  }

  body.dpy-demo-b .partners-row,
  body.dpy-demo-b #partners .partners-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ——— Shop (T274) ——— */
  body.dpy-demo-b .shop-layout,
  body.dpy-demo-b .dpy-shop-layout,
  body.dpy-demo-b .woocommerce-products-header + .shop-shell,
  body.dpy-demo-b .shop-shell {
    display: flex;
    flex-direction: column;
  }

  body.dpy-demo-b .shop-sidebar,
  body.dpy-demo-b aside.shop-filters,
  body.dpy-demo-b .dpy-shop-filters {
    width: 100%;
    max-width: 100%;
  }

  body.dpy-demo-b ul.products,
  body.dpy-demo-b .products-grid,
  body.dpy-demo-b .shop-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  /* ——— PDP (T275) ——— */
  body.dpy-demo-b .product-layout,
  body.dpy-demo-b .dpy-pdp,
  body.dpy-demo-b .product-shell,
  body.dpy-demo-b div.product {
    display: flex;
    flex-direction: column;
  }

  body.dpy-demo-b .product-gallery,
  body.dpy-demo-b .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100%;
  }

  body.dpy-demo-b .product-summary,
  body.dpy-demo-b .summary.entry-summary {
    width: 100% !important;
    max-width: 100%;
    padding-left: 0 !important;
  }

  body.dpy-demo-b .quantity .qty,
  body.dpy-demo-b .dpy-qty button,
  body.dpy-demo-b .single_add_to_cart_button {
    min-height: 44px;
  }

  body.dpy-demo-b .dpy-color-swatches button,
  body.dpy-demo-b .pc-swatches button {
    min-width: 44px;
    min-height: 44px;
  }

  /* ——— Cart / checkout / thank-you (T276) ——— */
  body.dpy-demo-b .cart-layout,
  body.dpy-demo-b .checkout-layout,
  body.dpy-demo-b .thankyou-layout,
  body.dpy-demo-b .cart-shell,
  body.dpy-demo-b .checkout-shell {
    flex-direction: column;
  }

  body.dpy-demo-b .cart-totals,
  body.dpy-demo-b .cart_totals,
  body.dpy-demo-b .checkout-sidebar {
    width: 100%;
    max-width: 100%;
  }

  body.dpy-demo-b table.shop_table,
  body.dpy-demo-b .woocommerce-cart-form table {
    display: block;
    overflow-x: auto;
  }

  /* ——— Account (T277) ——— */
  body.dpy-demo-b .woocommerce-account .woocommerce,
  body.dpy-demo-b .account-layout,
  body.dpy-demo-b .dpy-account {
    flex-direction: column;
  }

  body.dpy-demo-b .woocommerce-MyAccount-navigation,
  body.dpy-demo-b .account-nav {
    width: 100%;
    margin-bottom: 16px;
  }

  body.dpy-demo-b .woocommerce-MyAccount-content,
  body.dpy-demo-b .account-content {
    width: 100%;
  }

  /* ——— CMS / legal (T278) ——— */
  body.dpy-demo-b .cms-shell,
  body.dpy-demo-b .faq-shell,
  body.dpy-demo-b .legal-shell,
  body.dpy-demo-b .dpy-cms {
    padding-left: 0;
    padding-right: 0;
  }

  body.dpy-demo-b .cms-shell .wrap,
  body.dpy-demo-b .faq-shell .wrap,
  body.dpy-demo-b .legal-shell .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}
