/* =============================================================================
   Responsive overrides — mobile, tablet, small laptop
   Loaded after frontend.css
   ============================================================================= */


/* ----- frontend/layouts/partials/theme-styles.blade.php block 1 (responsive) ----- */

@media (max-width: 767.98px) {
        body {
            /* Account for the 65px mobile bottom nav + safe area */
            padding-bottom: calc(65px + env(safe-area-inset-bottom));
        }
    }

@media (max-width: 767.98px) {
        .site-header-inner {
            min-height: 56px;
            gap: 0.75rem;
        }
        .brand-tagline { display: none; }
        .header-nav { display: none !important; }
        .nav-icon-list { gap: 8px; }
        .header-icon-btn, .mobile-nav-toggle, .search-trigger, .search-close { width: 36px; height: 36px; }
        .brand-name { font-size: 1.25rem; }
    }

@media (min-width: 1200px) {
        .nav-icon-list { gap: 20px; }
    }

@media (max-width: 991.98px) {
        .search-overlay-body { padding: var(--sp-4) 0; }
        .search-section-title { margin-bottom: 1.25rem; }
    }

@media (max-width: 575.98px) {
        .store-breadcrumb { padding: 2rem 0; }
        .store-breadcrumb-title { font-size: 1.375rem; }
    }

@media (max-width: 767.98px) {
        .product-card {
            border-radius: 8px;
            border: 1px solid #f0f0f0;
        }
        .product-card:hover {
            transform: none;
            box-shadow: none;
        }
        .product-card-media {
            aspect-ratio: 1;
            border-bottom: 1px solid #f0f0f0;
        }
        .product-card-top {
            padding: 6px 8px;
        }
        .product-card-badge {
            padding: 3px 7px;
            font-size: 0.58rem;
            letter-spacing: 0.03em;
            border-radius: 4px;
            box-shadow: none;
        }
        .product-card-icon {
            width: 30px;
            height: 30px;
        }
        .product-card-icon i {
            font-size: 0.8rem;
        }
        .product-card-body {
            padding: 8px 10px 10px;
            gap: 3px;
        }
        .product-card-meta {
            font-size: 0.6rem;
            gap: 3px;
            letter-spacing: 0.04em;
        }
        .product-card-meta span {
            font-size: 0.6rem;
        }
        .product-card-title {
            font-size: 0.78rem;
            line-height: 1.3;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-card-price {
            gap: 4px;
        }
        .product-card-price-current,
        .product-card-price-sale {
            font-size: 0.88rem;
            font-weight: 700;
        }
        .product-card-price-old {
            font-size: 0.7rem;
        }
        .product-card-footer {
            margin-top: 4px;
        }
        .product-card-cta {
            min-height: 34px;
            font-size: 0.72rem;
            border-radius: 6px;
            gap: 4px;
            padding: 0 8px;
            font-weight: 600;
        }
        .product-card-cta i {
            font-size: 0.78rem;
        }
    }

@media (max-width: 1199.98px) {
        .header-nav { display: none; }
        .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .footer-newsletter { grid-template-columns: 1fr; }
    }

@media (min-width: 1200px) {
        .mobile-nav-toggle { display: none; }
    }

@media (max-width: 991.98px) {
        .announcement-bar { font-size: 0.76rem; }
        .brand-tagline { display: none; }
        .site-header-inner { min-height: 80px; }
        .footer-grid { grid-template-columns: 1fr; }
        .page-hero-title { max-width: none; }
        .section-heading { flex-direction: column; align-items: flex-start; }
        .search-panel-form, .footer-newsletter-form { grid-template-columns: 1fr; }
    }

@media (max-width: 767.98px) {
        .site-header-inner { gap: 0.85rem; }
        .brand-mark { width: 44px; height: 44px; border-radius: 4px; }
        .brand-name { font-size: 1rem; }
        .header-icon-btn, .mobile-nav-toggle, .search-trigger, .search-close { width: 42px; height: 42px; }
        .nav-icon-list { gap: 12px; }
        .announcement-bar-inner { gap: 0.5rem; padding: 0.62rem 0; }
        .footer-shell { padding: 1rem; }
        .page-hero { padding-top: 2rem; }
    }


/* ----- frontend/shop.blade.php block 1 (responsive) ----- */

@media (min-width: 1200px) {
    .shop-page .shop-row > .col-xl-3 {
        flex: 0 0 26%;
        max-width: 26%;
        min-width: 288px;
    }
    .shop-page .shop-row > .col-xl-9 {
        flex: 0 0 74%;
        max-width: 74%;
        min-width: 0;
    }
}

@media (max-width: 1399.98px) {
    .shop-products-grid.layout-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
    .shop-sidebar-sticky { display: none; } /* sidebar in offcanvas only */
    .shop-row { --bs-gutter-x: 0; }
}

@media (max-width: 991.98px) {
    .shop-products-grid,
    .shop-products-grid.layout-3,
    .shop-products-grid.layout-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-grid-switches { display: none !important; }
}

@media (max-width: 575.98px) {
    .shop-products-grid,
    .shop-products-grid.layout-2,
    .shop-products-grid.layout-3,
    .shop-products-grid.layout-4 { 
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
        gap: 0.75rem;
    }
    .shop-toolbar { flex-wrap: wrap; }
    .shop-sort-select { min-width: 0; width: 100%; }
    .shop-toolbar-left { width: 100%; }
}


/* ----- frontend/home.blade.php block 1 (responsive) ----- */

@media (max-width: 1199.98px) {
        .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .category-tile--large, .category-tile--small { grid-column: span 6; }
    }

@media (max-width: 991.98px) {
        .hero-grid,
        .editorial-grid,
        .testimonial-grid,
        .hero-trust-strip {
            grid-template-columns: 1fr;
        }
        .hero-stats {
            grid-template-columns: 1fr;
        }
        .category-tile--large, .category-tile--small { grid-column: span 12; }
        .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .hero-floating-card {
            position: static;
            width: 100%;
            margin-top: 1rem;
        }
    }

@media (max-width: 767.98px) {
        .hero-shell { border-radius: 28px; }
        .collection-tabs .nav {
            width: 100%;
            overflow: auto;
            flex-wrap: nowrap;
        }
        .collection-tabs .nav-link { white-space: nowrap; }
    }


/* ----- frontend/product.blade.php block 1 (responsive) ----- */

@media (max-width: 767.98px) {
        .detail-tabs-shell .nav {
            gap: 1.25rem;
            flex-wrap: nowrap;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 2px;
        }
        .detail-tabs-shell .nav-link {
            white-space: nowrap;
        }
    }

@media (max-width: 1199.98px) {
        .product-layout,
        .product-highlights {
            grid-template-columns: 1fr;
        }
        .product-summary {
            position: static;
        }
    }

@media (max-width: 767.98px) {
        .detail-tabs-shell .nav {
            width: 100%;
            overflow: auto;
            flex-wrap: nowrap;
        }
        .detail-tabs-shell .nav-link { white-space: nowrap; }
        .spec-row { grid-template-columns: 1fr; }
        .product-actions { grid-template-columns: 1fr auto; }
        .product-title { font-size: 24px; }
        
        /* App-like Swipeable Gallery */
        .product-gallery-wrap {
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            gap: 1rem;
            padding-bottom: 0.5rem;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none; /* Firefox */
        }
        .product-gallery-wrap::-webkit-scrollbar { display: none; }
        .product-gallery-card {
            flex: 0 0 100%;
            scroll-snap-align: center;
        }
        .gallery-thumbs { display: none; } /* Hide thumbs on mobile for true swiping */
        
        /* Sticky Add to Cart Bottom Bar */
        .mobile-sticky-cart {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            position: fixed;
            bottom: 65px; /* Above mobile-bottom-nav */
            left: 0;
            width: 100%;
            background: #ffffff;
            padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom));
            box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
            z-index: 1040;
            border-top: 1px solid var(--border);
        }
        .mobile-sticky-cart-price {
            font-family: var(--font-sora);
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--vinfur-accent);
        }
        .mobile-sticky-cart .btn-add-to-cart {
            height: 44px;
            padding: 0 1.5rem;
            border-radius: var(--radius-sm);
        }
        .product-shell {
            padding-bottom: 150px; /* Space for the sticky cart + bottom nav */
        }
    }

@media (min-width: 768px) {
        .mobile-sticky-cart { display: none; }
    }


/* ----- frontend/cart.blade.php block 1 (responsive) ----- */

@media (max-width: 1199.98px) {
        .cart-layout { 
            grid-template-columns: 1fr; 
            min-width: 0;
            overflow: hidden;
        }
        .cart-summary { position: static; }
    }

@media (max-width: 767.98px) {
        .cart-layout section {
            min-width: 0 !important;
            overflow: hidden !important;
            width: 100% !important;
        }
        .cart-table-shell {
            width: 100% !important;
            max-width: 100vw !important;
            overflow-x: auto !important;
            -webkit-overflow-scrolling: touch;
            padding: 0;
            border: 1px solid #f0f0f0;
            border-radius: 4px;
            display: block !important;
            margin: 0 !important;
        }
        .cart-table {
            min-width: 600px !important; /* Force table layout */
            width: 600px !important;
        }
        .cart-table-head th {
            font-size: 0.65rem;
            padding: 0.5rem 0.25rem;
        }
        .cart-item-row td {
            padding: 1rem 0.25rem;
        }
        .cart-item-img { width: 60px; height: 60px; }
        .cart-item-info { gap: 0.1rem; }
        .cart-item-name { font-size: 0.85rem; white-space: normal; }
        .cart-qty-wrap { height: 32px; }
        .cart-qty-btn { width: 28px; }
        .cart-qty-input { width: 34px; }
        
        /* Sticky Checkout on Mobile */
        .cart-summary { padding-bottom: 80px; }
        .cart-summary-footer {
            position: fixed;
            bottom: 65px;
            left: 0;
            width: 100%;
            background: #ffffff;
            padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
            box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
            z-index: 1040;
            border-top: 1px solid var(--border);
        }
        .btn-checkout { height: 48px; font-size: 0.95rem; }
    }


/* ----- frontend/checkout.blade.php block 1 (responsive) ----- */

@media (max-width: 1199.98px) {
        .checkout-layout {
            grid-template-columns: 1fr;
        }
        .checkout-summary {
            position: static;
        }
    }

@media (max-width: 767.98px) {
        .checkout-auth-options {
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
        }
        .auth-option-card {
            padding: 0.75rem 0.5rem;
        }
        .auth-option-card span {
            display: none;
        }
        .auth-option-card i {
            font-size: 1.25rem;
        }
        .auth-option-card strong {
            font-size: 0.75rem;
        }
        .saved-address-grid,
        .checkout-form-grid {
            grid-template-columns: 1fr;
        }
        .checkout-form-grid .span-2 {
            grid-column: span 1;
        }
        .checkout-order-item {
            grid-template-columns: 64px minmax(0, 1fr);
            gap: 0.65rem;
        }
        .checkout-order-item > :last-child {
            grid-column: 2;
            text-align: left;
            margin-top: -0.25rem;
        }
        .checkout-stage {
            padding: var(--sp-2) 0 var(--sp-6);
        }
    }


/* ----- frontend/search.blade.php block 1 (responsive) ----- */

@media (max-width: 767.98px) {
        .search-page-form {
            grid-template-columns: 1fr;
        }
    }


/* ----- frontend/blog/index.blade.php block 1 (responsive) ----- */

@media (max-width: 1199.98px) {
        .tf-blog-layout {
            grid-template-columns: minmax(0, 1fr) 260px;
            gap: 2.5rem;
        }
    }

@media (max-width: 991.98px) {
        .tf-blog-layout {
            grid-template-columns: 1fr;
        }
        .tf-blog-sidebar {
            position: static;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 2rem;
        }
        .tf-sidebar-widget { margin-bottom: 0; }
    }

@media (max-width: 767.98px) {
        .tf-page-title-blog { padding: 2.5rem 0 1.5rem; }
        .tf-blog-section { padding: 2rem 0 3rem; }
        .tf-blog-grid {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
        .tf-blog-sidebar {
            grid-template-columns: 1fr;
        }
        .tf-pagination { margin-top: 2rem; }
    }

@media (max-width: 575.98px) {
        .tf-page-title-blog .heading {
            font-size: 1.35rem;
            letter-spacing: 0.08em;
        }
    }


/* ----- frontend/blog/show.blade.php block 1 (responsive) ----- */

@media (max-width: 991.98px) {
        .tf-post-layout {
            grid-template-columns: 1fr;
        }
        .tf-post-sidebar {
            position: static;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1.5rem;
            padding-top: 0;
        }
        .tf-author-card { margin-bottom: 0; }
        .tf-post-sidebar-widget { margin-bottom: 0; }
    }

@media (max-width: 767.98px) {
        .tf-post-header { padding: 2rem 0 1.5rem; }
        .tf-post-section { padding-bottom: 3rem; }
        .tf-post-sidebar {
            grid-template-columns: 1fr;
        }
        .tf-comment-form .form-row {
            grid-template-columns: 1fr;
        }
        .tf-post-nav {
            flex-direction: column;
            gap: 0.75rem;
            align-items: flex-start;
        }
    }

@media (max-width: 575.98px) {
        .tf-post-footer-row {
            flex-direction: column;
            align-items: flex-start;
        }
    }


/* ----- frontend/pages/cms.blade.php block 1 (responsive) ----- */

@media (max-width: 767.98px) {
        .cms-page-wrap {
            padding-bottom: 3rem;
        }

        .cms-page-surface {
            padding: 0;
        }

        .cms-page-support {
            padding: 2rem 0;
            flex-direction: column;
            align-items: flex-start;
            text-align: left;
        }
    }


/* ----- frontend/layouts/partials/mobile-bottom-nav.blade.php block 1 (responsive) ----- */

@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: block;
    }
}


/* ----- frontend/layouts/partials/scroll-top.blade.php block 1 (responsive) ----- */

@media (max-width: 768px) {
        .scroll-top-wrapper {
            bottom: 20px;
            right: 20px;
            width: 44px;
            height: 44px;
        }
        .progress-ring {
            width: 44px;
            height: 44px;
        }
        .progress-ring__circle {
            r: 19;
            cx: 22;
            cy: 22;
            stroke-dasharray: 119.38;
            stroke-dashoffset: 119.38;
        }
        .scroll-top-inner {
            width: 34px;
            height: 34px;
            font-size: 1rem;
        }
    }


/* ----- frontend/account/invoice.blade.php block 1 (responsive) ----- */

@media print{body{padding:0;}button{display:none;}}
