/* BMVP - AquaLinked Bookstore Mobile MVP */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

@media (max-width: 768px) {
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body {
        font-size: 15.5px !important;
        line-height: 1.55 !important;
    }

    .store-container,
    .container,
    .wrapper,
    main,
    section {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        box-sizing: border-box !important;
    }

    .hero {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    .hero-grid,
    .hero .store-container,
    .hero-content,
    .hero-inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    h1,
    .hero h1 {
        font-size: 1.85rem !important;
        line-height: 1.18 !important;
        letter-spacing: -0.02em !important;
    }

    h2,
    .page-title {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
    }

    h3 {
        font-size: 1.12rem !important;
        line-height: 1.3 !important;
    }

    .hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .grid,
    .cards-grid,
    .books-grid,
    .book-grid,
    .products-grid,
    .product-grid,
    .store-grid,
    .catalog-grid,
    .items-grid,
    .section-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    article,
    .card,
    .book-card,
    .product-card,
    .store-card,
    .catalog-card,
    .item-card,
    .aq-card,
    .aql-card,
    [class*="card"] {
        max-width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 18px !important;
    }

    .card,
    .book-card,
    .product-card,
    .store-card,
    .catalog-card {
        padding: 18px !important;
    }

    .card img,
    .book-card img,
    .product-card img,
    .store-card img,
    .catalog-card img,
    article img {
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .button,
    .aq-btn,
    button,
    input[type="submit"] {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 44px !important;
        padding: 11px 14px !important;
        border-radius: 13px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        white-space: normal !important;
    }

    .product-detail,
    .product-layout,
    .product-main,
    .product-content,
    .product-wrapper,
    .detail-grid,
    .product-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .aql-related-footer-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 14px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 8px 2px 22px !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .aql-related-footer-card {
        flex: 0 0 82vw !important;
        width: 82vw !important;
        min-width: 82vw !important;
        max-width: 82vw !important;
        scroll-snap-align: start !important;
    }

    .aql-related-footer-image {
        height: 220px !important;
    }

    input,
    select,
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }

    footer,
    .site-footer {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 420px) {
    .store-container,
    .container,
    .wrapper,
    main,
    section {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    h1,
    .hero h1 {
        font-size: 1.62rem !important;
    }

    h2,
    .page-title {
        font-size: 1.3rem !important;
    }

    .aql-related-footer-card {
        flex-basis: 88vw !important;
        width: 88vw !important;
        min-width: 88vw !important;
        max-width: 88vw !important;
    }
}
