/* Overrides propios del storefront (cargado DESPUÉS de main.css para ganar).
   Mantener chico y comentado. */

/* Galería del detalle de producto: mostrar la imagen COMPLETA.
   El tema fue diseñado para fotos verticales 3:4 y usa object-fit:cover, que
   recorta cualquier imagen con otra proporción (p. ej. las generadas 1:1 o una
   foto cuadrada/apaisada que suba el comercio). Con `contain` se ve el producto
   entero sin recorte; el fondo neutro rellena el espacio sobrante. */
.product-slider-for-img img,
.product-slider-nav-img img {
    object-fit: contain;
    background-color: #f5f5f7;
}

/* Formularios de direcciones: el modal cabe en el viewport y desplaza sus campos. */
.aq-address-modal.modal { z-index: 100010; }
body:has(.aq-address-modal.show) .modal-backdrop { z-index: 100009; }
.aq-address-modal.modal .modal-dialog {
    width: min(520px, calc(100% - 32px));
    max-width: 520px;
    margin: 24px auto;
}
.aq-address-modal .modal-content {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    border-radius: 16px;
}
.aq-address-modal .aq-login-wrapper { box-shadow: none; }
.aq-address-modal .btn-close { top: 16px; inset-inline-end: 16px; }
.aq-address-modal .aq-phone-group .aq-phone-cc {
    flex: 0 0 130px;
    width: 130px;
    min-width: 0;
}
.aq-address-modal .aq-phone-cc .nice-select {
    overflow: visible;
    z-index: 2;
}
.aq-address-modal .aq-phone-cc .nice-select .current {
    display: block;
    max-width: calc(100% - 14px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.aq-address-modal .aq-phone-cc .nice-select.open {
    z-index: 10;
}
.aq-address-modal .aq-phone-cc .nice-select .list {
    max-height: min(300px, 45dvh);
    overflow-y: auto;
}
@media (max-width: 575px) {
    .aq-address-modal.modal .modal-dialog {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        margin: 0;
    }
    .aq-address-modal .modal-content {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .aq-address-modal .aq-login-wrapper {
        padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
    }
    .aq-address-modal .aq-login-top { padding-inline: 24px; }
    .aq-address-modal .aq-phone-group { flex-wrap: wrap; }
    .aq-address-modal .aq-phone-group .aq-phone-cc { flex: 1 1 100%; width: 100%; }
    .aq-address-modal .aq-phone-group .aq-phone-number { flex: 1 1 100%; width: 100%; }
}

.aq-checkout-flow-card {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    gap: 4px;
}
.aq-checkout-flow-card h4 { font-size: 18px; font-weight: 600; }
.aq-checkout-flow-card p { font-size: 14px; line-height: 1.55; }
.aq-checkout-flow-detail { color: #55585b; }
.aq-checkout-flow-card .aq-checkout-btn { border-radius: 4px; }
.aq-checkout-flow-card .aq-checkout-btn:disabled { opacity: .55; cursor: not-allowed; }
.aq-checkout-flow-note {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #55585b;
    font-size: 14px;
    line-height: 1.5;
}
.aq-checkout-flow-note strong { color: #111827; font-size: 15px; }

.aq-os-card.aq-os-actions { gap: 12px; }
.aq-os-card.aq-os-actions .aq-checkout-btn { margin-bottom: 0; }

/* Miniaturas fijas: las flechas cambian la selección, no desplazan la tira.
   En escritorio caben hasta 10 junto a la imagen de 780px. */
.aq-product-details-thumbnails-style .product-slider-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 85px;
    gap: 10px;
}
.aq-product-details-thumbnails-style .product-slider-nav-img {
    display: block;
    width: 100%;
    height: var(--product-thumb-height, 135px);
    padding: 0;
    background: transparent;
}
.aq-product-details-thumbnails-style .product-slider-nav-img img {
    position: absolute;
    inset: 0;
}
.aq-product-details-thumbnails-style .product-slider-nav-img.is-active {
    border-color: var(--aq-common-black);
}
.aq-product-details-thumbnails-style .product-slider-nav-img:focus-visible {
    outline: 2px solid var(--aq-common-black);
    outline-offset: 2px;
}
@media (max-width: 1199px) {
    .aq-product-details-thumbnails-style .product-details-slider-wrap > .row > .col-xl-10 {
        order: 1;
    }
    .aq-product-details-thumbnails-style .product-details-slider-wrap > .row > .col-xl-2 {
        order: 2;
    }
    .aq-product-details-thumbnails-style .product-slider-nav {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        max-width: none;
        overflow: visible;
        margin-top: 16px;
    }
    .aq-product-details-thumbnails-style .product-slider-nav-img {
        flex: 0 1 85px;
        width: 85px;
        min-width: 0;
        height: auto;
        aspect-ratio: 85 / 135;
    }
}
@media (max-width: 500px) {
    .aq-product-details-thumbnails-style .product-slider-nav {
        gap: 6px;
    }
}

/* Menú móvil: el logo y los controles ocupan su espacio real; solo los enlaces
   se desplazan. Así el primer enlace y el selector de divisa no quedan tapados. */
.aq-offcanvas-wrap {
    display: flex;
    flex-direction: column;
    width: min(380px, 100vw);
    height: 100vh;
    height: 100dvh;
}
.aq-offcanvas-wrap .aq-offcanvas-top,
.aq-offcanvas-wrap .aq-offcanvas-bottom {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
}
.aq-offcanvas-wrap .aq-offcanvas-top {
    padding: 12px 20px;
}
.aq-offcanvas-wrap .aq-offcanvas-logo {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline-end: 16px;
}
.aq-offcanvas-wrap .aq-offcanvas-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(160px, 100%);
    max-height: 72px;
    object-fit: contain;
}
.aq-offcanvas-wrap .aq-offcanvas-close {
    flex: 0 0 auto;
}
.aq-offcanvas-wrap .aq-offcanvas-menu-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
}
.aq-offcanvas-wrap .aq-offcanvas-menu {
    padding: 8px 20px 20px;
}
.aq-offcanvas-wrap .aq-offcanvas-bottom {
    z-index: 2;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
}
.aq-offcanvas-wrap .aq-offcanvas-btn-wrap {
    margin-bottom: 12px;
}
.aq-offcanvas-wrap .aq-offcanvas-btn {
    padding: 13px 12px;
}
.aq-offcanvas-wrap .aq-offcanvas-bottom .aq-header-currency ul {
    top: auto;
    bottom: calc(100% + 8px);
    inset-inline-start: 0;
    inset-inline-end: auto;
}
.aq-offcanvas-wrap .aq-offcanvas-bottom .aq-header-currency ul.aq-currency-list-open {
    top: auto;
    bottom: calc(100% + 8px);
}

/* Comparar productos: la plantilla lo trae solo como demo (sin backend) y el panel
   mostraba productos ficticios. Oculto hasta que exista la funcion real. */
.aq-compare-btn {
    display: none !important;
}

/* Pedido confirmado: pasos numerados de pago manual / compra por WhatsApp. */
.aq-os-steps {
    margin: 24px auto 0;
    max-width: 560px;
    padding: 20px 22px;
    text-align: left;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}
.aq-os-steps__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--aq-common-black);
}
.aq-os-steps__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: aq-os-step;
}
.aq-os-steps__list > li {
    position: relative;
    padding: 0 0 14px 40px;
    counter-increment: aq-os-step;
    font-size: 14px;
    line-height: 1.5;
    color: #55585B;
}
.aq-os-steps__list > li:last-child {
    padding-bottom: 0;
}
.aq-os-steps__list > li::before {
    content: counter(aq-os-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--aq-common-black);
    color: var(--aq-common-white);
    font-size: 13px;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
}
.aq-os-steps__list > li > strong {
    display: block;
    color: var(--aq-common-black);
}
.aq-os-steps__note {
    margin: 14px 0 0;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
}
.aq-checkout-payment-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #6B7280;
}

/* Checkout: permiso para avisos del pedido por WhatsApp. */
.aq-checkout-page-skin .aq-checkout-payment-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.aq-checkout-page-skin .aq-checkout-payment-desc p:last-child {
    margin-bottom: 0;
}
.aq-checkout-wa-optin {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #55585B;
    cursor: pointer;
}
.aq-checkout-page-skin .aq-checkout-wa-optin input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 2px 0 0;
    padding: 0;
    line-height: normal;
    accent-color: #141414;
}
.aq-checkout-page-skin .aq-checkout-wa-optin span {
    flex: 1 1 auto;
    min-width: 0;
    color: #55585B;
    font-weight: 400;
    overflow-wrap: break-word;
}
/* Checkout: secciones «Datos de contacto» y «Datos de envío». */
.aq-checkout-wa-optin { margin-bottom: 8px; }
.aq-checkout-section-head {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.aq-checkout-section-head--spaced { margin-top: 28px; }
.aq-checkout-page-skin .aq-checkout-section-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}
.aq-checkout-section-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}
.aq-checkout-contact-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}
.aq-checkout-contact-summary__text {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 14px;
    color: #111827;
}
.aq-checkout-contact-summary__text span {
    font-size: 13px;
    color: #55585B;
    overflow-wrap: anywhere;
}
.aq-checkout-contact-summary .aq-checkout-addr-new-toggle { flex-shrink: 0; margin: 0; }
.aq-checkout-same-person {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}
.aq-checkout-page-skin .aq-checkout-same-person input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: #141414;
}
.aq-checkout-same-person span { font-weight: 500; }
[data-checkout-recipient-fields][hidden],
[data-checkout-contact-summary][hidden],
[data-checkout-recipient-same-wrap][hidden] { display: none !important; }

/* Sin logo subido: el nombre de la tienda como marca (nunca el logo de la plantilla). */
.omni-logo-text {
    display: inline-block;
    max-width: 220px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--aq-common-black, #111);
    word-break: break-word;
}

/* Home benefits: equal columns regardless of customized text length. */
.aqf-shop-feature-style .omni-home-features {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 30px 20px;
}
.omni-home-features .aqf-shop-feature-item {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
.omni-home-features .aqf-shop-feature-content {
    min-width: 0;
    overflow-wrap: anywhere;
}
.omni-home-features .aqf-shop-feature-item h4 {
    line-height: 1.3;
}
.omni-home-features .aqf-shop-feature-icon span {
    margin-bottom: 0;
}
@media (min-width: 768px) {
    .omni-home-features .aqf-shop-feature-item h4 {
        min-height: 2.6em;
    }
    .aqf-shop-feature-style .omni-home-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
        padding: 40px;
    }
}
@media (min-width: 1200px) {
    .aqf-shop-feature-style .omni-home-features {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }
}

/* Mobile shop filters, cart and fixed navigation. */
@media (max-width: 1199px) {
    #shop-filters.aq-filter-active {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 99999979;
        display: block;
        width: min(340px, 90vw);
        height: 100dvh;
        margin: 0;
        padding: 24px 20px 40px;
        overflow-y: auto;
        background: var(--aq-common-white, #fff);
        box-shadow: 10px 0 30px rgba(0, 0, 0, .15);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s ease;
    }
    #shop-filters.aq-filter-active.opened {
        transform: translateX(0);
        visibility: visible;
    }
    .omni-shop-filter-close {
        display: block;
        width: 36px;
        height: 36px;
        margin: 0 0 18px auto;
        border: 1px solid #ddd;
        background: transparent;
        color: var(--aq-common-black, #141414);
        font-size: 26px;
        line-height: 1;
    }
}
@media (min-width: 1200px) {
    .omni-shop-filter-close { display: none; }
}
@media (max-width: 767px) {
    /* El menú fijo y los botones flotantes no deben tapar el final del footer. */
    footer .aq-footer-area {
        padding-bottom: calc(146px + env(safe-area-inset-bottom));
    }
    footer .aq-copyright-text p { line-height: 1.5; }
}
@media (max-width: 575px) {
    .aq-bottom-menu { padding-inline: 4px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
    .aq-bottom-menu .container { padding-inline: 0; }
    .aq-bottom-menu .row { margin-inline: 0; }
    .aq-bottom-menu .col { padding-inline: 2px; min-width: 0; }
    .aq-bottom-menu-item span { font-size: 10px; white-space: nowrap; }
    .aq-bottom-menu-item i { font-size: 17px; }
    .progress-wrap { inset-inline-end: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 40px; height: 40px; z-index: 9998; }
    .progress-wrap::after { width: 40px; height: 40px; }

    .aq-cart-list { overflow-x: visible; margin-inline-end: 0; }
    .aq-cart-list table { width: 100%; min-width: 0; }
    .aq-cart-list thead { display: none; }
    .aq-cart-list tbody { display: block; }
    .aq-cart-list tbody tr {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 8px 14px;
        padding: 16px 0;
        border-bottom: 1px solid #eee;
    }
    .aq-cart-list .table > :not(caption) > * > * { padding: 0; border: 0; }
    .aq-cart-list td.aq-cart-img { grid-column: 1; grid-row: 1 / 3; width: 80px; margin: 0; }
    .aq-cart-list td.aq-cart-img img { width: 80px; height: 104px; }
    .aq-cart-list td.aq-cart-title { grid-column: 2; grid-row: 1; min-width: 0; padding: 0; overflow-wrap: anywhere; }
    .aq-cart-list td.aq-cart-price { grid-column: 2; grid-row: 2; width: auto; }
    .aq-cart-list td.aq-cart-quantity { grid-column: 1 / 3; grid-row: 3; width: auto; }
    .aq-cart-list td.aq-cart-quantity .aq-product-quantity { margin: 0; max-width: 170px; }
    .aq-cart-list td.aq-cart-action { grid-column: 1 / 3; grid-row: 4; text-align: left !important; }
    .aq-cart-coupon-input { min-width: 0; }
    .aq-cart-coupon-input input { min-width: 0; flex: 1; }
    .aq-cart-coupon-input button { padding: 15px 14px; }
}
