/* Ajustes finales para una experiencia móvil cómoda y sin conflictos. */
.mobile-search-close,
.mobile-search-backdrop {
  display: none;
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 76px;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .announcement {
    min-height: 32px;
    overflow: hidden;
    padding: 9px 12px;
    font-size: 9px;
    letter-spacing: .07em;
    text-overflow: ellipsis;
  }

  .header {
    min-height: 64px;
    height: 64px;
    flex-wrap: nowrap;
    padding: 0 14px;
  }

  .header .logo,
  .header-actions {
    height: 64px;
  }

  .header .brand-logo-image {
    width: 64px;
    height: 52px;
  }

  .header .catalog-nav,
  .header .search-toggle,
  .header .account-toggle {
    display: none !important;
  }

  .header-actions {
    position: static;
    margin-left: auto;
  }

  .header .cart-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 8px 0 8px 12px;
    color: #111;
    font-size: 12px;
  }

  .hero {
    min-height: min(650px, calc(100svh - 32px));
    padding: 54px 20px 42px;
    background-position: 64% center;
  }

  .hero-content {
    width: 100%;
    max-width: 430px;
  }

  .hero .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .hero h1 {
    max-width: 350px;
    font-size: clamp(40px, 13vw, 52px);
    line-height: .98;
  }

  .hero-content > p:not(.eyebrow) {
    max-width: 330px;
    margin: 16px 0 22px;
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    gap: 13px;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 50px;
    border-radius: 26px;
  }

  .hero-link {
    align-self: center;
    padding: 8px;
  }

  .brand-marquee {
    overflow: hidden;
    gap: 18px;
    padding: 14px 18px;
    white-space: nowrap;
  }

  .brand-marquee span {
    font-size: 9px;
  }

  .section {
    padding: 56px 16px;
  }

  .section-heading {
    gap: 16px;
    margin-bottom: 24px;
  }

  .section-heading h2,
  .catalog-heading h2,
  .intro h2,
  .story h2 {
    font-size: clamp(31px, 9vw, 40px);
    line-height: 1.02;
  }

  .benefits {
    padding: 20px 18px;
  }

  .launches #new-products {
    margin-right: -16px;
    padding-right: 16px;
    gap: 12px;
  }

  .launches #new-products .product-card {
    flex-basis: min(76vw, 290px);
  }

  .carousel-controls {
    display: none;
  }

  .editorial-break {
    min-height: 0;
  }

  .editorial-image {
    min-height: 68vw;
  }

  .editorial-copy {
    padding: 42px 20px 48px;
  }

  .editorial-copy h2 {
    font-size: clamp(43px, 13vw, 56px);
  }

  .collection-feature {
    min-height: 112vw;
    max-height: 500px;
    padding: 24px 20px;
    border-radius: 16px;
  }

  .catalog-heading .sort-control {
    min-width: 0;
    width: 100%;
  }

  .shop-head {
    position: static;
    gap: 12px;
    margin-bottom: 14px;
    background: #fff;
  }

  .shop-head .filters {
    width: calc(100% + 16px);
    margin-right: -16px;
    padding: 5px 16px 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .shop-head .filter {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #e2e1e4;
    background: #fff;
  }

  .shop-head .search {
    min-height: 48px;
    width: 100%;
    padding: 5px 14px;
    border: 1px solid #dedde1;
    border-radius: 25px;
    background: #f8f8f9;
  }

  .mobile-search-close,
  .mobile-search-backdrop {
    display: none;
  }

  body.mobile-search-open {
    overflow: hidden;
  }

  body.mobile-search-open .mobile-search-backdrop {
    position: fixed;
    z-index: 58;
    inset: 0;
    display: block;
    background: rgba(25,20,23,.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  body.mobile-search-open > .search {
    position: fixed;
    z-index: 60;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: 30px minmax(0,1fr) 44px;
    grid-template-rows: 68px minmax(0,1fr);
    align-items: center;
    gap: 0 8px;
    padding: max(8px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  body.mobile-search-open > .search > span:first-child {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: center;
    color: #a51d58;
    font-size: 21px;
  }

  body.mobile-search-open > .search input {
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    margin: 0;
    padding: 8px 2px;
    border: 0;
    border-bottom: 1px solid #d9d1d5;
    border-radius: 0;
    background: transparent;
    outline: 0;
    font-size: 16px;
  }

  body.mobile-search-open > .search .mobile-search-close {
    grid-column: 3;
    grid-row: 1;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #4b4448;
    background: #f4f1f2;
    font-size: 25px;
    line-height: 1;
  }

  .search input {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 8px;
  }

  .search-suggestions {
    position: fixed;
    top: 106px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100svh - 190px);
    overflow-y: auto;
  }

  body.mobile-search-open > .search .search-suggestions {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: start;
    width: 100%;
    max-height: 100%;
    margin-top: 8px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.mobile-search-open > .search .search-suggestions a {
    min-height: 82px;
    padding: 11px 4px;
    border-bottom: 1px solid #eee9eb;
    border-radius: 0;
  }

  body.mobile-search-open > .search .search-suggestions img {
    width: 62px;
    height: 62px;
    border-radius: 12px;
  }

  .advanced-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 25px;
    padding: 8px;
  }

  .modern-filter {
    min-height: 72px;
    gap: 8px;
    padding: 10px;
  }

  .filter-icon {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .filter-copy small {
    font-size: 7px;
    letter-spacing: .08em;
  }

  .filter-copy strong,
  .advanced-filters .modern-filter input:not([type="checkbox"]),
  .advanced-filters .modern-filter select {
    font-size: 11px;
  }

  .stock-toggle .switch {
    position: absolute;
    right: 8px;
    bottom: 8px;
    transform: scale(.86);
    transform-origin: right bottom;
  }

  .shop .product-grid,
  #related-products .product-grid,
  .recently-viewed .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .product-card {
    min-width: 0;
    border-radius: 14px;
  }

  .product-image {
    width: 100%;
    height: auto;
    aspect-ratio: .82;
  }

  .product-image > .badge:first-of-type {
    top: 9px;
    left: 8px;
    max-width: calc(100% - 52px);
    overflow: hidden;
    padding: 6px 8px;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-image [data-favorite] {
    top: 7px !important;
    right: 7px !important;
    width: 36px;
    height: 36px;
  }

  .quick-view-button {
    display: none;
  }

  .quick-add {
    right: 7px;
    bottom: 7px;
    left: 7px;
    min-height: 42px;
    padding: 9px 7px;
    border-radius: 22px;
    font-size: 8px;
    line-height: 1.15;
  }

  .product-info {
    padding: 13px 10px 14px;
  }

  .product-category {
    font-size: 8px;
  }

  .product-info h3 {
    min-height: 36px;
    margin: 6px 0 9px;
    font-size: 13px;
  }

  .product-price {
    flex-wrap: wrap;
    gap: 4px;
  }

  .product-price strong {
    font-size: 14px;
  }

  #bundles-grid {
    grid-template-columns: 1fr;
  }

  .story {
    padding: 54px 20px;
  }

  footer {
    padding: 38px 20px;
    text-align: center;
  }

  footer .footer-meta {
    align-items: center;
  }

  .mobile-dock {
    z-index: 40;
    height: calc(70px + env(safe-area-inset-bottom));
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(17, 17, 17, .08);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -10px 30px rgba(22, 18, 20, .08);
  }

  .mobile-dock a,
  .mobile-dock button {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    gap: 5px;
    padding: 7px 2px 5px;
    color: #5f5c62;
    font-size: 9px;
    font-weight: 600;
    transition: color .2s ease, transform .2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-dock a:active,
  .mobile-dock button:active {
    color: #a51d58;
    transform: scale(.94);
  }

  .mobile-dock .dock-icon {
    position: relative;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    font-size: 0;
    line-height: 0;
  }

  .mobile-dock .dock-icon svg {
    width: 23px;
    height: 23px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-dock .dock-label {
    font-size: 9px;
    line-height: 1;
    letter-spacing: -.01em;
  }

  .mobile-dock [data-mobile-cart] .dock-icon b,
  .mobile-dock [data-mobile-favorites] .dock-icon b {
    position: absolute;
    top: -5px;
    right: -8px;
    width: 18px;
    height: 18px;
    margin: 0;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #b32662;
    box-shadow: 0 3px 8px rgba(179, 38, 98, .3);
    font-size: 8px;
    font-weight: 700;
  }

  .mobile-dock [data-mobile-favorites].active {
    color: #a51d58;
  }

  .mobile-dock [data-mobile-favorites].active .dock-icon svg {
    fill: #f8dce6;
    stroke-width: 2;
  }

  /* En móvil nunca ocultamos contenido por animaciones de entrada. */
  .reveal-section {
    opacity: 1;
    transform: none;
  }

  .mobile-category-sheet {
    z-index: 39;
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-height: 65svh;
    overflow-y: auto;
    padding-bottom: 24px;
  }

  .cart {
    z-index: 50;
    width: 100%;
    max-width: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .overlay {
    z-index: 49;
  }

  .cart-head {
    padding: 17px 16px 14px;
  }

  .cart-head h2 {
    font-size: 25px;
  }

  .cart-items {
    padding: 0 14px;
  }

  .cart-item {
    display: block;
    padding: 17px 0;
  }

  .cart-item-main {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 11px;
  }

  .cart-item-media img {
    width: 72px;
    height: 88px;
    border-radius: 9px;
  }

  .cart-item h3 {
    max-width: none;
    margin: 4px 0 9px;
    font-size: 14px;
  }

  .cart-item .item-price {
    position: static;
    max-width: 66px;
    padding: 3px 0 0;
    font-size: 12px;
    text-align: right;
  }

  .cart-item-copy .unit-price {
    font-size: 8px;
  }

  .package-choice {
    width: 100%;
    margin: 13px 0 0;
    padding: 10px;
  }

  .package-title {
    margin-bottom: 9px;
  }

  .package-title > span {
    font-size: 8px;
  }

  .package-title small {
    font-size: 7px;
  }

  .package-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .package-options button {
    min-height: 52px;
    padding: 7px;
  }

  .package-options button > b {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
  }

  .package-options button > span {
    font-size: 9px;
    white-space: normal;
  }

  .cart-item-actions {
    justify-content: space-between;
    margin: 12px 0 0;
  }

  .cart-item .remove {
    min-height: 36px;
    padding: 0 6px;
    font-size: 9px;
  }

  .cart-item .quantity button {
    width: 36px;
    height: 36px;
  }

  .cart-summary {
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .cart-summary small {
    display: none;
  }

  .cart-summary .button {
    min-height: 48px;
    margin-top: 8px;
  }

  dialog,
  .variant-modal,
  .quick-view-modal,
  .size-guide-modal,
  .customer-modal {
    width: calc(100% - 20px);
    max-width: none;
    max-height: calc(100svh - 20px);
    margin: auto;
    padding: 26px 17px 20px;
    overflow-y: auto;
    border-radius: 18px;
  }

  dialog h2,
  .size-guide-modal h2,
  .customer-modal h2 {
    padding-right: 28px;
    font-size: 29px;
  }

  .modal-close {
    z-index: 5;
    top: 9px;
    right: 10px;
    width: 42px;
    height: 42px;
  }

  form {
    gap: 12px;
    margin-top: 18px;
  }

  input,
  select,
  textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .variant-modal {
    padding: 0;
  }

  .variant-product {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
    padding: 20px 45px 18px 15px;
  }

  .variant-product img {
    width: 82px;
    height: 96px;
  }

  .variant-product h2 {
    padding-right: 0;
    font-size: 21px;
  }

  .variant-product p {
    margin: 6px 0;
    font-size: 11px;
  }

  .variant-modal form {
    padding: 17px 15px 18px;
  }

  .variant-options {
    max-height: 35svh;
    overflow-y: auto;
  }

  .variant-option {
    min-height: 64px;
    grid-template-columns: 21px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 13px;
  }

  .variant-option input[type="radio"] {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    padding: 0;
    border-width: 2px;
  }

  .variant-option input[type="radio"]:checked {
    border-width: 2px;
  }

  .variant-option-copy strong {
    font-size: 11px;
  }

  .variant-option-copy .variant-color {
    font-size: 8px;
  }

  .variant-option > b {
    font-size: 10px;
  }

  #quick-view-content {
    max-height: none;
  }

  .quick-gallery > img {
    height: min(86vw, 360px);
  }

  .quick-copy {
    padding: 27px 17px;
  }
}

@media (max-width: 370px) {
  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .shop .product-grid,
  #related-products .product-grid,
  .recently-viewed .product-grid {
    gap: 12px 8px;
  }

  .product-info {
    padding-inline: 8px;
  }
}
