/*
 * AlahaDeal Mobile Storefront UI V1
 * Desktop remains untouched. All layout rules are mobile/tablet scoped.
 * Project typography rule: visible custom text never below 12px.
 */

.ah-mobile-footer {
    display: none;
}

.ah-category-ships-from {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(90deg, #ff7a18 0%, #ff9500 100%);
    box-shadow: 0 2px 6px rgba(255,149,0,.30);
}

.ah-category-ships-from > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ah-category-product-title {
    color: var(--title-color);
    font-size: 16px;
    line-height: 1.35;
}

.ah-category-product-price {
    justify-content: center;
}

@media (max-width: 1199.98px) {
    :root {
        --ah-mobile-appbar-clearance: 78px;
    }

    /* Keep real content clear of the fixed bottom navigation. */
    .alahadeal-footer-v31 {
        padding-bottom: calc(
            var(--ah-mobile-appbar-clearance)
            + env(safe-area-inset-bottom, 0px)
        );
    }

    #mobile_app_bar.app-bar {
        min-height: 64px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-radius: 18px 18px 0 0;
        border-top: 1px solid rgba(15,23,42,.08);
        box-shadow: 0 -8px 24px rgba(15,23,42,.10);
        overflow: visible;
        z-index: 1100;
    }

    #mobile_app_bar.app-bar > * {
        min-height: 64px;
    }

    #mobile_app_bar.app-bar ul {
        min-height: 64px;
    }

    /* Floating controls no longer sit on top of the bottom navigation. */
    .social-chat-icons {
        inset-inline-end: 12px !important;
        inset-block-end: calc(
            var(--ah-mobile-appbar-clearance)
            + 16px
            + env(safe-area-inset-bottom, 0px)
        ) !important;
        z-index: 1005;
    }

    .social-chat-icons img {
        width: 44px !important;
        height: 44px !important;
    }

    .back-to-top {
        --size: 44px;
        inset-inline-end: 12px !important;
        inset-block-end: calc(
            var(--ah-mobile-appbar-clearance)
            + 76px
            + env(safe-area-inset-bottom, 0px)
        ) !important;
        z-index: 1004 !important;
    }

    /* Direct-DOM third-party fixed "Online" tabs detected by our collision
       guard become a compact horizontal pill. Cross-origin iframe widgets
       are intentionally not force-resized. */


    /* Location strip: compact, touch-friendly, and visually separated. */
    .header-location-mobile-strip {
        background: #fff !important;
        border-top: 1px solid rgba(15,23,42,.06) !important;
        border-bottom: 1px solid rgba(15,23,42,.08) !important;
        box-shadow: 0 6px 18px rgba(15,23,42,.05);
    }

    .header-location-mobile-strip .header-location-strip-inner {
        gap: 8px !important;
        padding: 9px 12px !important;
        max-width: 720px;
        margin: 0 auto;
    }

    .header-location-mobile-strip .header-location-icon {
        font-size: 20px;
        color: var(--title-color);
    }

    .header-location-mobile-strip .header-location-spinner {
        font-size: 18px;
    }

    .header-location-mobile-strip .header-location-strip-select {
        min-width: 0;
        height: 44px;
        padding: 8px 34px 8px 12px !important;
        border: 1px solid #d7dee7;
        border-radius: 14px;
        background-color: #fff;
        color: var(--title-color);
        font-size: 14px !important;
        line-height: 1.25;
        box-shadow: none;
    }

    .header-location-mobile-strip .header-location-strip-select:focus {
        border-color: rgba(var(--bs-primary-rgb), .55);
        box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .10);
    }
}

@media (max-width: 767.98px) {
    /* ---------------- Homepage category sliders ---------------- */
    .alahadeal-home-category-section {
        overflow: hidden;
    }

    .alahadeal-home-category-section .container {
        padding-inline: 12px !important;
    }

    .alahadeal-home-category-section .ah-home-category-card {
        border-radius: 16px !important;
        overflow: hidden !important;
    }

    .alahadeal-home-category-section .ah-home-category-card-body {
        padding: 16px 12px 18px !important;
    }

    .alahadeal-home-category-section .ah-home-category-heading {
        margin-bottom: 14px !important;
        min-height: 42px;
    }

    .alahadeal-home-category-section .styled-title {
        min-width: 0;
        max-width: calc(100% - 104px);
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 18px !important;
        line-height: 1.25;
    }

    .alahadeal-home-category-section .btn-link {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 36px;
        padding: 6px 0;
        font-size: 14px !important;
    }

    .alahadeal-home-category-section .ah-home-category-swiper {
        overflow: hidden;
        margin-inline: -2px;
        padding-inline: 2px;
    }

    .alahadeal-home-category-section .ah-category-product-slide {
        width: clamp(156px, 45vw, 184px) !important;
        min-width: clamp(156px, 45vw, 184px) !important;
        max-width: clamp(156px, 45vw, 184px) !important;
    }

    .alahadeal-home-category-section .ah-category-product-card {
        min-height: 100%;
        padding: 8px !important;
        border: 1px solid rgba(15,23,42,.07);
        border-radius: 14px !important;
        box-shadow: 0 4px 14px rgba(15,23,42,.05);
    }

    .alahadeal-home-category-section .store-product__top {
        width: 100%;
        margin-bottom: 2px !important;
        border-radius: 12px !important;
    }

    .alahadeal-home-category-section .ah-category-product-title {
        display: -webkit-box !important;
        width: 100%;
        min-height: 38px;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal !important;
        text-overflow: initial !important;
        text-align: start;
        font-size: 14px !important;
        line-height: 1.35;
    }

    .alahadeal-home-category-section .ah-category-product-price {
        width: 100%;
        min-height: 20px;
        justify-content: flex-start;
        row-gap: 3px;
    }

    .alahadeal-home-category-section .product__old-price {
        font-size: 12px !important;
    }

    .alahadeal-home-category-section .product__new-price {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px !important;
    }

    .alahadeal-home-category-section .ah-category-ships-from {
        align-self: flex-start;
        max-width: 100%;
        margin-top: auto;
        padding: 5px 8px;
        font-size: 12px !important;
        box-shadow: 0 2px 5px rgba(255,149,0,.24);
    }

    /* Swipe is the primary navigation on mobile. Hide desktop arrows so they
       never overlap the first/last product card. */
    .alahadeal-home-category-section .swiper-button-next,
    .alahadeal-home-category-section .swiper-button-prev {
        display: none !important;
    }

    /* ---------------- Mobile footer ---------------- */
    .alahadeal-footer-v31 > .footer-top,
    .alahadeal-footer-v31 > .footer-main,
    .alahadeal-footer-v31 > .footer-bottom {
        display: none !important;
    }

    .alahadeal-footer-v31 > .footer-bg-img {
        display: none;
    }

    .ah-mobile-footer {
        display: block;
        padding: 28px 0 18px;
        color: #fff;
        background: var(--primary-dark);
    }

    .ah-mobile-footer .container {
        padding-inline: 20px;
    }

    .ah-mobile-footer a,
    .ah-mobile-footer button {
        color: #fff;
        font-size: 14px;
    }

    .ah-mobile-footer button {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .ah-mobile-footer-brand {
        text-align: center;
    }

    .ah-mobile-footer-brand > img {
        width: auto;
        max-width: 168px;
        max-height: 48px;
        margin-bottom: 14px;
    }

    .ah-mobile-footer-brand p,
    .ah-mobile-footer-email {
        display: block;
        margin: 0;
        color: rgba(255,255,255,.88) !important;
        font-size: 14px !important;
        line-height: 1.55;
    }

    .ah-mobile-store-buttons {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin: 18px 0 24px;
    }

    .ah-mobile-store-buttons img {
        display: block;
        width: auto;
        max-width: 142px;
        height: 42px;
        object-fit: contain;
    }

    .ah-mobile-newsletter {
        padding: 18px 0 20px;
        border-top: 1px solid rgba(255,255,255,.14);
        border-bottom: 1px solid rgba(255,255,255,.14);
    }

    .ah-mobile-footer-title {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-bottom: 6px;
        font-size: 17px !important;
        font-weight: 800;
        text-transform: uppercase;
    }

    .ah-mobile-newsletter > p {
        margin: 0 0 12px;
        color: rgba(255,255,255,.82);
        text-align: center;
        font-size: 13px !important;
        line-height: 1.45;
    }

    .ah-mobile-newsletter-form {
        display: flex;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .ah-mobile-newsletter-form label {
        min-width: 0;
        margin: 0;
    }

    .ah-mobile-newsletter-form .form-control {
        width: 100%;
        height: 46px;
        padding: 9px 12px;
        border: 1px solid rgba(255,255,255,.30);
        border-radius: 12px;
        background: #fff;
        color: var(--title-color);
        font-size: 14px !important;
    }

    .ah-mobile-newsletter-form .btn {
        flex: 0 0 auto;
        min-width: 92px;
        height: 46px;
        padding: 8px 14px;
        border-radius: 12px;
        font-size: 14px !important;
        font-weight: 700;
    }

    .ah-mobile-footer-accordions {
        padding: 10px 0 2px;
    }

    .ah-mobile-footer-accordions details {
        border-bottom: 1px solid rgba(255,255,255,.14);
    }

    .ah-mobile-footer-accordions summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 52px;
        padding: 12px 2px;
        list-style: none;
        cursor: pointer;
        font-size: 16px !important;
        font-weight: 800;
    }

    .ah-mobile-footer-accordions summary::-webkit-details-marker {
        display: none;
    }

    .ah-mobile-footer-accordions summary i {
        flex: 0 0 auto;
        font-size: 17px;
        transition: transform .18s ease;
    }

    .ah-mobile-footer-accordions details[open] summary i {
        transform: rotate(45deg);
    }

    .ah-mobile-footer-accordions ul {
        display: grid;
        gap: 2px;
        margin: 0;
        padding: 0 0 12px;
        list-style: none;
    }

    .ah-mobile-footer-accordions li a,
    .ah-mobile-footer-accordions li button {
        display: block;
        width: 100%;
        padding: 9px 2px;
        color: rgba(255,255,255,.86) !important;
        text-align: start;
        line-height: 1.35;
    }

    .ah-mobile-footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 20px 0 14px;
    }

    .ah-mobile-footer-contact .list-socials {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 18px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .ah-mobile-footer-contact .list-socials a {
        display: grid;
        width: 36px;
        height: 36px;
        place-items: center;
        border: 1px solid rgba(255,255,255,.20);
        border-radius: 50%;
        font-size: 17px;
    }

    .ah-mobile-footer-hotline {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #fff !important;
        font-weight: 700;
    }

    .ah-mobile-footer-hotline i {
        font-size: 18px;
    }

    .ah-mobile-footer-copyright {
        padding-top: 14px;
        border-top: 1px solid rgba(255,255,255,.14);
        color: rgba(255,255,255,.78);
        text-align: center;
        font-size: 12px !important;
        line-height: 1.45;
    }

    .ah-mobile-footer-legal {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
        margin-top: 10px;
    }

    .ah-mobile-footer-legal a {
        color: rgba(255,255,255,.72) !important;
        font-size: 12px !important;
    }
}

@media (max-width: 399.98px) {
    .header-location-mobile-strip .header-location-strip-inner {
        padding-inline: 10px !important;
    }

    .header-location-mobile-strip .header-location-strip-select {
        height: 42px;
        padding-inline-start: 10px !important;
        font-size: 13px !important;
    }

    .alahadeal-home-category-section .ah-category-product-slide {
        width: clamp(150px, 46vw, 166px) !important;
        min-width: clamp(150px, 46vw, 166px) !important;
        max-width: clamp(150px, 46vw, 166px) !important;
    }

    .ah-mobile-store-buttons img {
        max-width: 132px;
        height: 40px;
    }

    .ah-mobile-newsletter-form {
        flex-direction: column;
    }

    .ah-mobile-newsletter-form .btn {
        width: 100%;
    }
}

/* ================================================================
   AlahaDeal Mobile Storefront UI V1.1
   Large-card slider correction
   IMPORTANT: intentionally does not select/style/reposition Chat/Online.
   ================================================================ */

.ah-large-product-ships-from {
    max-width: 100%;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(90deg, #ff7a18 0%, #ff9500 100%);
    box-shadow: 0 2px 6px rgba(255,149,0,.30);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.ah-large-product-ships-from > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ah-large-product-seller-row {
    min-width: 0;
    max-width: 100%;
}

.ah-large-product-seller-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
    /* -------- Large-card homepage/store sliders -------- */

    .ah-large-product-slider-section {
        overflow: hidden;
    }

    .ah-large-product-slider-section > .container {
        padding-inline: 12px !important;
    }

    .ah-large-product-slider-section .ah-large-slider-heading {
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }

    .ah-large-product-slider-section .ah-large-slider-heading > h2 {
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 20px !important;
        line-height: 1.25;
    }

    .ah-large-product-slider-section .ah-large-slider-heading-actions {
        flex: 0 0 auto;
        margin-inline-start: auto;
        gap: 6px !important;
    }

    .ah-large-product-slider-section .ah-large-slider-heading-actions .btn-link {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 38px;
        padding: 6px 0;
        font-size: 14px !important;
        white-space: nowrap;
    }

    /* Swipe is primary on mobile. These are slider arrows only. */
    .ah-large-product-slider-section .ah-large-slider-nav,
    .ah-large-product-slider-section
        .swiper-button-prev:not(.ah-keep-mobile-arrow),
    .ah-large-product-slider-section
        .swiper-button-next:not(.ah-keep-mobile-arrow) {
        display: none !important;
    }

    .ah-large-product-swiper-container,
    .ah-large-product-swiper {
        overflow: visible !important;
    }

    .ah-large-product-slider-section .ah-large-product-slide {
        width: clamp(190px, 58vw, 230px) !important;
        min-width: clamp(190px, 58vw, 230px) !important;
        max-width: clamp(190px, 58vw, 230px) !important;
        height: auto !important;
    }

    .ah-large-product-slider-section .ah-large-product-card {
        gap: 8px !important;
        height: 100%;
        min-height: 100%;
        border-radius: 15px !important;
        background: #fff;
        box-shadow: 0 5px 16px rgba(15,23,42,.06) !important;
    }

    .ah-large-product-card .ah-large-product-image-wrap {
        width: calc(100% - 16px) !important;
        margin-top: 8px !important;
        border-radius: 13px !important;
        overflow: hidden;
    }

    .ah-large-product-card .ah-large-product-thumbnail img {
        width: 100%;
        height: 100%;
        padding: 8px;
        object-fit: contain !important;
    }

    .ah-large-product-card .product__actions {
        display: none !important;
    }

    .ah-large-product-card .ah-large-product-summary {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        gap: 5px !important;
        padding: 2px 10px 10px !important;
    }

    .ah-large-product-card .ah-large-product-title {
        display: -webkit-box !important;
        width: 100%;
        min-height: 38px;
        margin: 0;
        overflow: hidden !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal !important;
        text-overflow: initial !important;
        font-size: 15px !important;
        line-height: 1.3;
    }

    .ah-large-product-card .ah-large-product-price {
        width: 100%;
        min-height: 21px;
        row-gap: 3px;
    }

    .ah-large-product-card .product__old-price {
        font-size: 12px !important;
        line-height: 1.25;
    }

    .ah-large-product-card .product__new-price {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px !important;
        line-height: 1.25;
    }

    .ah-large-product-card .ah-large-product-rating {
        min-height: 20px;
        flex-wrap: wrap;
    }

    .ah-large-product-card .ah-large-product-seller-row {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px !important;
        width: 100%;
        min-height: 42px;
        font-size: 13px !important;
        line-height: 1.3;
    }

    .ah-large-product-card .ah-large-product-seller-name {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ah-large-product-card .seller-verification-badge {
        display: inline-flex !important;
        max-width: 100%;
        align-self: flex-start;
        overflow: hidden;
        padding: 4px 8px !important;
        font-size: 12px !important;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

    .ah-large-product-card .seller-verification-badge img,
    .ah-large-product-card .seller-verification-badge i {
        flex: 0 0 auto;
        width: 12px !important;
        height: 12px !important;
        font-size: 12px !important;
    }

    .ah-large-product-card .ah-large-product-ships-from {
        align-self: flex-start;
        max-width: 100%;
        padding: 5px 9px;
        font-size: 12px !important;
    }

    /* The large card has enough width now for a comfortable counter and
       icon-only cart action without either control escaping the card. */
    .ah-large-product-card .quick-add-to-cart-widget {
        width: 100%;
        min-width: 0;
        margin-top: 5px !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    .ah-large-product-card .qc-qty-wrap {
        flex: 0 0 86px !important;
        width: 86px !important;
        height: 36px !important;
    }

    .ah-large-product-card .qc-minus,
    .ah-large-product-card .qc-plus {
        width: 26px !important;
        min-width: 26px !important;
        padding: 0 !important;
    }

    .ah-large-product-card .qc-qty-input {
        min-width: 30px;
        font-size: 14px !important;
    }

    .ah-large-product-card .qc-add-btn {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 44px !important;
        height: 36px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }

    .ah-large-product-card .qc-add-btn-text {
        display: none !important;
    }

    /* Top Rated section specifically: compact vertical rhythm. */
    .ah-top-rated-section .py-4 {
        padding-block: 20px !important;
    }

    .ah-top-rated-section .pb-lg-1 {
        padding-bottom: 0 !important;
    }

    /* Featured Deals / Clearance / Seller Featured use the same card,
       so give their raw swiper slides the same auto width. */
    .ah-featured-deals-mobile .swiper-slide,
    .ah-clearance-sale-mobile .swiper-slide,
    .ah-seller-featured-mobile .swiper-slide {
        width: clamp(190px, 58vw, 230px) !important;
        min-width: clamp(190px, 58vw, 230px) !important;
        max-width: clamp(190px, 58vw, 230px) !important;
    }
}

@media (max-width: 399.98px) {
    .ah-large-product-slider-section .ah-large-product-slide,
    .ah-featured-deals-mobile .swiper-slide,
    .ah-clearance-sale-mobile .swiper-slide,
    .ah-seller-featured-mobile .swiper-slide {
        width: clamp(184px, 60vw, 214px) !important;
        min-width: clamp(184px, 60vw, 214px) !important;
        max-width: clamp(184px, 60vw, 214px) !important;
    }

    .ah-large-product-slider-section .ah-large-slider-heading > h2 {
        font-size: 18px !important;
    }

    .ah-large-product-card .qc-qty-wrap {
        flex-basis: 82px !important;
        width: 82px !important;
    }
}

