/* ==========================================================================
   ZARGHOON JEWELLERS - Responsive Foundation (Phase 1)
   Base responsive behavior for the foundation elements defined in
   style.css. Component-specific breakpoints (product grids, header nav
   collapse, etc.) will be added alongside those components in a later
   phase. Load this file AFTER style.css.
   ========================================================================== */

@media (max-width: 1100px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 56px 0;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .shop-layout {
        grid-template-columns: 220px 1fr;
    }

    .product-detail-layout {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .section {
        padding: 44px 0;
    }

    .section-tight {
        padding: 32px 0;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.76rem;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .category-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .cart-row {
        grid-template-columns: 60px 1fr;
        row-gap: 10px;
    }

    .cart-row-qty,
    .cart-row-total,
    .cart-row-remove {
        grid-column: 1 / -1;
    }

    .cart-row-total {
        text-align: left;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary-panel {
        position: static;
    }

    .hero-slider {
        height: 460px;
    }

    .hero-slide-content h1 {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .homepage-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quickview-body {
        grid-template-columns: 1fr;
    }

    .quickview-image {
        aspect-ratio: 16 / 10;
    }

    /* Touch devices have no hover state to reveal Quick View, so it is
       shown at rest instead of appearing only on :hover. */
    .product-card-quickview {
        opacity: 1;
        bottom: 12px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 400px;
    }

    .hero-nav {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }

    /* Spec: 2x2 grid on mobile, not a single column - kept at 2 columns
       down to the smallest supported width. */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .feature-card {
        padding: 16px 8px;
    }

    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ---------------------------------------------------------------------
   Large-screen refinement (Phase 8, Part 34: 1280 / 1440 / 1920)
   --------------------------------------------------------------------- */
@media (min-width: 1440px) {
    :root {
        --container-max: 1360px;
    }

    .hero-slider {
        height: 680px;
    }
}

@media (max-width: 700px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .collections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-toolbar-right {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-search-form {
        max-width: none;
    }

    .shop-sort-select {
        width: 100%;
    }

    .product-cart-form {
        flex-direction: column;
    }
}

/* ---------------------------------------------------------------------
   Public header / account / shop pages (Phase 4-5)
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
    .site-nav {
        display: none;
    }

    .site-account-icon {
        display: inline-flex;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .account-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-filters {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 300px;
        max-width: 86vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 900;
        overflow-y: auto;
        border-radius: 0;
    }

    .shop-filters.open {
        transform: translateX(0);
    }

    .shop-filters-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    .shop-filters-overlay.open {
        display: block;
        position: fixed;
        inset: 0;
        background-color: rgba(17, 17, 17, 0.5);
        z-index: 850;
    }

    .shop-filters-toggle {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 22px;
    }

    .account-cards {
        grid-template-columns: 1fr;
    }

    .account-info {
        grid-template-columns: 1fr;
    }
}
