﻿/* ===== Responsive Breakpoints — Velvet Royals Flowershop ===== */

/* ================================================
   BURGER BUTTON  (hidden on desktop)
   ================================================ */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: rgba(44,26,5,0.06);
    border: 1px solid rgba(44,26,5,0.14);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
    flex-shrink: 0;
    touch-action: manipulation;
}
.nav-burger:hover  { background: rgba(44,26,5,0.11); }
.nav-burger:active { background: rgba(44,26,5,0.16); }
.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #3D2E10;
    border-radius: 2px;
    transition: transform 0.28s ease, opacity 0.2s ease, width 0.2s ease;
    transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay backdrop */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.nav-overlay.open { opacity: 1; }



/* ================================================
   1200px
   ================================================ */
@media (max-width: 1200px) {
    .container { width: 92%; margin: auto; }
    #product-list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .header-logo { height: 80px; }
    .header-brand-name { font-size: 0.95em; }
    #hero h2 { font-size: 2.4em; }
    .hero-content { width: 56%; padding: 80px 60px 80px 72px; }
    .admin-container { grid-template-columns: 300px 1fr; }
    .features { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.8em; }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .checkout-page-grid { grid-template-columns: 1fr 310px; }
}


/* ================================================
   992px — Tablet landscape: desktop nav still visible,
   just tighten header so everything fits one row
   ================================================ */
@media (max-width: 992px) {
    .header-inner { padding: 10px 20px; }
    .header-logo { height: 66px; }
    .header-brand-name { font-size: 0.88em; letter-spacing: 0.5px; }
    .header-brand-tagline { font-size: 0.52em; letter-spacing: 1.6px; }
    /* Keep nav in ONE row — no wrapping */
    nav ul { flex-wrap: nowrap; gap: 2px; }
    nav a { padding: 6px 10px; font-size: 0.84em; }

    #featured-products,
    .products-section,
    .cart-section,
    .admin-section { width: 94%; margin: 40px auto; }

    #featured-products h2,
    .section-header h2 { font-size: 1.7em; }

    #product-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .product img { height: 200px; }

    #hero { min-height: 440px; }
    .hero-content { width: 60%; padding: 60px 48px 60px 48px; min-height: 440px; }
    #hero h2 { font-size: 2.1em; }
    .hero-description { font-size: 1.05em; }
    .features-bar-inner { grid-template-columns: repeat(2, 1fr); }
    .about-section { padding: 50px 30px; }

    .cart-item { flex-direction: column; align-items: center; text-align: center; }
    .cart-item img { width: 100%; max-width: 200px; }
    .qty-controls { justify-content: center; }

    /* Keep 2-column admin at tablet — just shrink the form panel */
    .admin-container { grid-template-columns: 240px 1fr; gap: 16px; }
    .form-row { grid-template-columns: 1fr; gap: 8px; }
    .form-panel, .products-panel { padding: 18px 16px; }
    .form-actions { flex-direction: column; }
    .admin-products-list { max-height: 60vh; }

    /* Checkout page — stack summary below form at tablet */
    .checkout-page-grid { grid-template-columns: 1fr; gap: 20px; }
    .checkout-sidebar-sticky { position: static; top: auto; }

    /* Payment cards — 2-col on tablet */
    .payment-methods { grid-template-columns: 1fr 1fr; }
}


/* ================================================
   960px — Burger Nav activates (tablets + mobile)
   ================================================ */
@media (max-width: 960px) {

    /* ---- Header ---- */
    .header-inner {
        padding: 8px 16px;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }
    .header-logo { height: 64px; }
    .header-brand-name { font-size: 0.82em; letter-spacing: 0.5px; }
    .header-brand-tagline { font-size: 0.50em; letter-spacing: 1.5px; }

    .nav-burger { display: flex; z-index: 101; }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 85vw);
        height: 100dvh;
        background: linear-gradient(170deg, #1A1005 0%, #2A1E08 55%, #3D2E10 100%);
        z-index: 100;
        /* push items below the sticky site header (~54px) */
        padding: 62px 0 40px;
        box-shadow: -6px 0 32px rgba(0,0,0,0.45);
        transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
        overflow-y: auto;
        overflow-x: hidden;
        /* override desktop display:flex so items stack from the top */
        display: block;
    }
    nav.open { right: 0; }

    /* Overlay is hidden by default; display:block only when JS adds .open */
    .nav-overlay         { display: none; pointer-events: none; }
    .nav-overlay.open    { display: block; pointer-events: auto; }

    nav ul { flex-direction: column; gap: 2px; padding: 10px 12px; align-items: stretch; }
    nav ul li { width: 100%; }
    nav a {
        padding: 13px 16px;
        font-size: 1.02em;
        color: rgba(255,255,255,0.82);
        border-radius: 10px;
        text-align: left;
        font-weight: 500;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: background 0.18s, color 0.18s;
    }
    nav a:hover  { background: rgba(255,255,255,0.1); color: #fff; }
    nav a.active { background: rgba(212,175,55,0.18); color: var(--color-accent); }
    nav a::after { display: none; }

    /* On mobile, the nav-user-area collapses — only the inline row is shown */
    .nav-user-area {
        padding: 0;
        background: none;
        margin: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    /* Hide desktop profile button & dropdown inside the mobile drawer */
    .nav-user-area .nav-profile-btn    { display: none !important; }
    .nav-user-area .nav-profile-dropdown { display: none !important; }

    /* ── Mobile inline row: [avatar + name + badge] ←→ [logout icon] ── */
    .nav-user-inline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        margin: 4px 12px;
        width: calc(100% - 24px);
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 12px;
        box-sizing: border-box;
        gap: 10px;
    }

    .nav-user-inline-info {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px 6px 4px 0;
        text-align: left;
        color: inherit;
        border-radius: 8px;
        transition: background 0.15s;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .nav-user-inline-info:active {
        background: rgba(255,255,255,0.07);
    }

    .nav-user-inline-text {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .nav-user-inline-name {
        font-size: 0.95em;
        font-weight: 600;
        color: #fff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-user-inline-chevron {
        margin-left: auto;
        opacity: 0.45;
        flex-shrink: 0;
    }

    /* Logout icon button */
    .nav-logout-icon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        min-width: 40px;
        background: rgba(220,53,69,0.15);
        border: 1px solid rgba(220,53,69,0.3);
        color: #ff6b7a;
        border-radius: 50%;
        cursor: pointer;
        touch-action: manipulation;
        transition: background 0.2s, transform 0.15s;
        flex-shrink: 0;
    }
    .nav-logout-icon-btn:hover,
    .nav-logout-icon-btn:active {
        background: rgba(220,53,69,0.28);
        transform: scale(0.93);
    }

    .nav-user-name { font-size: 1em; color: #fff; }

    .btn-black-logout,
    .btn-nav-signin {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.9em;
        min-height: 44px;
    }

    .nav-brand-label { display: block; padding: 6px 16px 4px; font-size: 0.65em; letter-spacing: 2.5px; color: rgba(212,175,55,0.55); }
    .orders-nav-link { display: flex; align-items: center; gap: 8px; }

    /* Cart badge inside the mobile nav drawer */
    nav .nav-cart-badge {
        background: var(--color-accent);
        color: var(--color-primary-dark);
        font-size: 0.7em;
        font-weight: 800;
        min-width: 20px;
        height: 20px;
        border-radius: 10px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Auth separator in the nav drawer */
    #nav-logout-item {
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 8px;
        margin-top: 8px;
    }

    /* ---- Global touch targets ---- */
    /* Every tappable element should be at least 44px tall */
    .button,
    button:not(.nav-burger):not(.email-popup-close):not(.session-warn-btn) {
        min-height: 44px;
    }
    input, select, textarea { min-height: 44px; }

    /* ---- Layout ---- */
    #featured-products,
    .products-section,
    .cart-section,
    .admin-section {
        width: 100%;
        margin: 20px 0;
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* ---- Hero ---- */
    /* Mobile: image visible at top, text readable at bottom */
    #hero { min-height: 500px; }
    .hero-carousel-slide img { object-position: center center; }
    .hero-content {
        width: 100%;
        min-height: 500px;
        padding: 20px 24px 56px;
        justify-content: flex-end; /* push text to bottom so image shows at top */
        background: linear-gradient(to bottom,
            transparent 0%,
            transparent 30%,
            rgba(245,237,224,0.82) 52%,
            rgba(245,237,224,0.96) 68%,
            rgba(245,237,224,1) 80%);
    }
    #hero h2 { font-size: 1.75em; }
    .hero-tagline { font-size: 0.75em; }
    .hero-description { font-size: 0.95em; max-width: 100%; }
    .hero-cta { display: inline-block; text-align: center; padding: 10px 22px; font-size: 0.72em; }

    /* Carousel arrows — smaller and pushed to sides on mobile */
    .hero-carousel-btn { width: 36px; height: 36px; font-size: 1.4em; }
    .hero-carousel-prev { left: 8px; }
    .hero-carousel-next { right: 8px; }

    /* Hide dots on mobile — badge covers that area */
    .hero-carousel-dots { display: none; }


.features-bar { padding: 20px 16px; }
    .features-bar-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
    .features-bar-icon { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
    .features-bar-icon svg { width: 16px; height: 16px; }
    .features-bar-text strong { font-size: 0.78em; }
    .features-bar-text span { font-size: 0.70em; }
    .collections-section { padding: 48px 20px; }
    .collections-grid { grid-template-columns: 1fr; gap: 32px; max-width: 400px; }
    .collection-img-wrap { margin-bottom: 32px; }

    /* ---- Product grid ---- */
    #product-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .product { border-radius: 14px; overflow: hidden; }
    .product-img-wrap img,
    .product img,
    .product-card-img { height: 155px; object-fit: cover; }
    .product h2 { font-size: 0.95em; line-height: 1.35; }
    .product p { font-size: 0.82em; }
    .product-price { font-size: 1.1em; font-weight: 700; }

    /* Add to Cart button full-width inside card */
    .product .button {
        width: 100%;
        font-size: 0.85em;
        padding: 12px;
        text-align: center;
        min-height: 44px;
    }

    /* ---- Category filter bar ---- */
    .category-filter-bar {
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 8px;
    }
    .category-filter-bar::-webkit-scrollbar { display: none; }
    .cat-filter-btn {
        padding: 10px 18px;
        font-size: 0.82em;
        min-height: 44px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ---- Sub-filter bars (Occasion / Recipient) ---- */
    .sub-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 8px;
        align-items: center;
    }
    .sub-filter-bar::-webkit-scrollbar { display: none; }
    .sub-filter-pills { flex-wrap: nowrap; }
    .sub-filter-btn { min-height: 36px; flex-shrink: 0; }
    .sub-filter-label { font-size: 0.72em; }

    /* ---- Free shipping bar ---- */
    .free-shipping-bar { margin-bottom: 12px; }

    /* ---- Section titles ---- */
    #featured-products h2,
    .section-header h2 { font-size: 1.45em; margin-bottom: 20px; }

    /* ---- About ---- */
    .about-section { padding: 32px 20px; margin: 32px auto; border-radius: 0; }
    .about-section h2 { font-size: 1.35em; }
    .about-content p { font-size: 0.94em; }
    .features { grid-template-columns: 1fr; gap: 12px; }
    .feature-item { padding: 20px 16px; }
    .feature-icon { width: 48px; height: 48px; }
    .feature-icon svg { width: 24px; height: 24px; }
    .feature-item h3 { font-size: 1em; }
    .feature-item p { font-size: 0.86em; }

    /* ---- Cart ---- */
    .cart-item {
        padding: 14px;
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 12px;
    }
    .cart-item img { width: 80px; height: 80px; flex-shrink: 0; border-radius: 8px; }
    .cart-item-details h3 { font-size: 0.97em; }
    .qty-controls {
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }
    /* Make qty +/- buttons proper tap targets */
    .qty-controls .button {
        width: 44px !important;
        height: 44px;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2em;
    }
    .remove-btn {
        padding: 8px 14px !important;
        font-size: 0.82em !important;
        min-height: 36px !important;
    }
    .cart-summary { padding: 20px; }
    .cart-summary h3 { font-size: 1.1em; }
    .summary-content { display: flex; flex-direction: column; gap: 10px; }
    .summary-content .button { width: 100%; text-align: center; }

    /* ---- Checkout Modal — full-screen bottom sheet on mobile ---- */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .checkout-modal-wide {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh;
        border-radius: 20px 20px 0 0 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 24px 20px 32px;
        margin: 0;
    }
    /* Other modals stay centered */
    #guest-prompt-modal .modal,
    #success-modal .modal,
    #delete-modal .modal { width: 92%; max-width: 420px; margin: auto; }
    .modal-overlay:not(:has(.checkout-modal-wide)) { align-items: center; }

    .checkout-modal-header { margin-bottom: 18px; }
    .checkout-modal-header h3 { font-size: 1.2em; }
    .checkout-modal-subtitle { font-size: 0.85em; }

    /* Checkout grid — always single column on mobile */
    .checkout-form-grid { grid-template-columns: 1fr !important; gap: 14px; }
    .checkout-full-width { grid-column: 1 / -1; }

    /* Delivery toggle — full width buttons */
    .delivery-toggle { flex-direction: column; gap: 8px; }
    .delivery-toggle-btn {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        font-size: 0.92em;
    }

    /* Payment cards — stack vertically */
    .payment-methods { grid-template-columns: 1fr !important; gap: 10px; }
    .payment-card { padding: 0; }
    .payment-card-inner { padding: 14px 16px; min-height: 56px; }

    /* Coupon row */
    .coupon-row { flex-direction: column; gap: 8px; }
    .coupon-apply-btn { width: 100%; }

    /* Checkout order summary */
    .checkout-order-summary { margin-bottom: 16px; }
    .checkout-summary-box { padding: 14px; }

    /* Form actions in checkout */
    #checkout-submit { width: 100%; min-height: 50px; font-size: 1em; }

    /* ---- Guest prompt / success modals ---- */
    .modal { width: 92%; padding: 28px 20px; }
    .modal-actions { flex-direction: column; gap: 10px; }
    .modal-actions .button,
    .modal-actions a.button { width: 100%; text-align: center; }

    /* ---- Admin ---- */
    .admin-container { grid-template-columns: 1fr; gap: 14px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .form-panel, .products-panel { padding: 16px 14px; }
    .form-panel h3, .products-panel h3 { font-size: 1.02em; }
    .form-group label { font-size: 0.82em; }
    .form-group input,
    .form-group textarea,
    .form-group select { padding: 10px 12px; font-size: 0.9em; }
    .form-actions { flex-direction: column; gap: 10px; }
    .form-actions .button { width: 100%; text-align: center; }
    .admin-products-list { max-height: none; }
    .admin-product-actions { flex-direction: row; }
    .admin-product-thumb { width: 40px; height: 40px; }

    /* Admin product list — stack edit/delete vertically */
    .admin-product-item > div { flex-direction: column; align-items: flex-start !important; gap: 12px !important; }
    .admin-product-item > div > div:last-child { flex-direction: row; width: 100%; justify-content: flex-end; }
    .admin-product-item > div > div:last-child .button {
        flex: 1;
        text-align: center;
        padding: 10px 8px !important;
        min-height: 44px;
    }

    /* Admin product filter */
    .admin-product-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .admin-product-filter::-webkit-scrollbar { display: none; }
    .admin-pf-btn { min-height: 40px; white-space: nowrap; flex-shrink: 0; }

    /* Orders filter bar */
    .orders-filter-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 4px; }
    .orders-filter-bar::-webkit-scrollbar { display: none; }
    .orders-filter-btn { min-height: 40px; white-space: nowrap; flex-shrink: 0; }

    /* Order cards */
    .order-card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .order-total { font-size: 1.1em !important; }
    .order-card-body { flex-direction: column; gap: 12px; }
    .order-card-footer .button { width: 100%; min-height: 48px; }
    .order-meta { flex-wrap: wrap; gap: 6px; }
    .order-custom-chips { display: flex; flex-wrap: wrap; }

    /* ---- Builder ---- */
    .builder-section { width: 100%; padding: 0 16px; box-sizing: border-box; margin-bottom: 40px; }
    .builder-grid { grid-template-columns: 1fr; gap: 12px; }
    .builder-col { border-radius: 14px; }
    .builder-col-header { padding: 14px 16px; gap: 10px; }
    .builder-col-header h3 { font-size: 1em; }
    .builder-step { width: 28px; height: 28px; font-size: 0.85em; }
    .builder-options { max-height: 200px; }
    .builder-option {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 0.93em;
    }
    .builder-summary { padding: 16px; border-radius: 14px; }
    .builder-summary-footer { flex-direction: column; align-items: flex-start; gap: 14px; }
    .builder-add-btn { width: 100% !important; min-height: 52px !important; font-size: 1em !important; }

    /* ---- Testimonials (legacy static) ---- */
    .testimonials-section { width: 100%; padding: 0 16px; box-sizing: border-box; margin-bottom: 50px; }
    .testimonials-grid { grid-template-columns: 1fr; gap: 14px; }

    /* ---- Reviews (dynamic) ---- */
    .reviews-section-wrap { width: 100%; padding: 0 16px; box-sizing: border-box; margin-bottom: 50px; }
    .reviews-grid { grid-template-columns: 1fr; gap: 14px; }
    .reviews-write-cta { padding: 28px 16px; }

    /* Review modal — bottom-sheet on mobile */
    .rv-review-overlay { align-items: flex-end; padding: 0; }
    .rv-review-modal {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        max-height: 92dvh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    }
    .rv-review-overlay.active .rv-review-modal { transform: translateY(0); }
    .rv-star-pick-btn { width: 44px; height: 44px; }
    .rv-star-pick-btn svg { width: 34px; height: 34px; }
    .rv-review-footer { flex-direction: column-reverse; }
    .rv-review-footer .button { width: 100%; justify-content: center; min-height: 48px; }

    /* ---- FAQ ---- */
    .faq-section { width: 100%; padding: 0 16px; box-sizing: border-box; }
    .faq-question { padding: 16px 18px; min-height: 52px; }
    .faq-answer { padding: 0 18px 16px; }

    /* ---- Email popup ---- */
    .email-popup-overlay { align-items: flex-end; }
    .email-popup-box {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 32px 24px 28px;
        box-sizing: border-box;
    }
    .email-popup-btn { min-height: 50px; }

    /* ---- Change Password ---- */
    .btn-change-pw { width: 100%; justify-content: center; padding: 10px 16px; min-height: 44px; }
    .cp-modal { max-width: 100%; border-radius: 16px 16px 0 0; margin: 0 !important; position: fixed; bottom: 0; left: 0; right: 0; }
    .cp-header { padding: 22px 20px 18px; }
    .cp-header h3 { font-size: 1.15em; }
    .cp-body { padding: 20px 20px 24px; }
    .cp-requirements { grid-template-columns: 1fr; }
    .cp-actions { flex-direction: column-reverse; gap: 10px; }
    .cp-actions .button { width: 100%; text-align: center; }

    /* ---- Editorial sections ---- */
    .editorial-reviews { padding: 56px 20px; }
    .editorial-faq { padding: 56px 20px; }
    .editorial-faq-item { padding: 0; }
    .editorial-about { flex-direction: column; }
    .editorial-about-panel { padding: 52px 24px; }
    .editorial-about-left h2 { font-size: 1.7em; }
    .editorial-reviews-cta { gap: 16px; }
    .editorial-cta-rule { max-width: 50px; }

    /* ---- Footer ---- */
    .footer-inner { padding: 32px 16px; }
    footer p { font-size: 0.85em; }
    .footer-policy-links { flex-wrap: wrap; gap: 8px; justify-content: center; }

    /* ---- Toast ---- */
    .toast-notification { left: 16px; right: 16px; bottom: 20px; max-width: none; }

    /* ---- Image upload widget ---- */
    .img-dropzone { min-height: 110px; }
}


/* ================================================
   480px — Small phones
   ================================================ */
@media (max-width: 480px) {
    .header-inner { padding: 10px 14px; }
    .header-logo { height: 72px; }
    header h1 { font-size: 1.15em; }

    #product-list { grid-template-columns: 1fr; gap: 14px; }
    .product-img-wrap img,
    .product img,
    .product-card-img { height: auto; aspect-ratio: 4/3; }
    .product h2 { font-size: 1em; }
    .product p { font-size: 0.83em; }
    .product-price { font-size: 1.15em; }

    /* ---- Product Detail page ---- */
    .pd-breadcrumb { padding: 14px 20px; }
    .pd-wrapper { padding: 0 20px 48px; }
    .pd-layout { grid-template-columns: 1fr; gap: 28px; }
    .pd-gallery { position: static; }
    .pd-name { font-size: 1.5em; }
    .pd-price { font-size: 1.3em; }
    .pd-cart-reveal { padding: 0 20px 60px; }
    .pd-cart-reveal-inner { padding: 22px 18px; }
    .pd-cart-actions { flex-direction: column; }
    .pd-checkout-btn, .pd-continue-btn { width: 100%; text-align: center; }
    .pd-loading-state { grid-template-columns: 1fr; gap: 20px; }

    #hero { min-height: 260px; }
    .hero-content { padding: 24px 16px 60px; min-height: 260px; }
    #hero h2 { font-size: 1.5em; }
    .hero-description { font-size: 0.92em; }
    /* Hide arrows on small phones — use swipe instead */
    .hero-carousel-btn { display: none; }

.collections-grid { grid-template-columns: 1fr; }
    .features-bar-inner { grid-template-columns: 1fr 1fr; gap: 10px; }
    .features-bar-icon { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
    .features-bar-icon svg { width: 14px; height: 14px; }

    #featured-products h2,
    .section-header h2 { font-size: 1.25em; }

    main { margin: 0; }

    .about-section { padding: 26px 14px; margin: 24px auto; }
    .about-section h2 { font-size: 1.2em; }
    .about-content p { font-size: 0.9em; line-height: 1.7; }

    .feature-item { padding: 18px 14px; }
    .feature-icon { width: 42px; height: 42px; }
    .feature-icon svg { width: 21px; height: 21px; }

    .cart-item { padding: 12px; }
    .cart-item img { width: 68px; height: 68px; }
    .cart-item-details h3 { font-size: 0.94em; }
    .cart-item-price { font-size: 1.05em; }
    .cart-summary { padding: 16px; }

    .form-panel, .products-panel { padding: 14px; }
    .form-panel h3, .products-panel h3 { font-size: 1em; margin-bottom: 14px; }
    .form-group label { font-size: 0.87em; }

    .orders-filter-btn { font-size: 0.8em; }

    .admin-products-list li { padding: 12px; border-left-width: 3px; }

    .footer-inner { padding: 24px 14px; }
    footer p { margin: 4px 0; }
    .footer-brand { font-size: 1.1em !important; }

    /* ---- Order tracker ---- */
    .orders-filter-bar { border-radius: 12px; }
    .orders-filter-tab { font-size: 0.78rem; padding: 8px 8px; gap: 5px; }
    .filter-tab-count { font-size: 0.65rem; padding: 1px 5px; }
    .orders-hero { padding: 40px 18px 36px; }
    .orders-page-title { font-size: 1.8rem; }
    .orders-page-main { padding: 28px 14px 60px; }
    .order-status-banner { padding: 10px 16px; gap: 10px; }
    .order-status-icon { font-size: 1.4em; }
    .order-status-desc { display: none; }
    .order-card-body { padding: 14px 16px 0; }
    .order-track-header { flex-direction: column; gap: 6px; align-items: flex-start; }
    .order-track-amount { flex-direction: row; gap: 8px; align-items: center; }
    .order-track-total-label { display: none; }
    .order-track-total { font-size: 1.1rem; }
    .order-track-id { font-size: 0.9rem; }
    .tracker-dot { width: 34px; height: 34px; font-size: 1em; }
    .tracker-line { top: 16px; left: calc(50% + 17px); right: calc(-50% + 17px); height: 2.5px; }
    .tracker-label { font-size: 0.61em; max-width: 58px; }
    .order-track-details { padding: 12px 16px 16px; }
    .admin-status-footer { flex-direction: column; align-items: stretch; }
    .btn-force-complete { margin-left: 0; }
}

/* ================================================
   CART PAGE — Mobile fixes
   ================================================ */
@media (max-width: 960px) {
    /* Hide floating social sidebar — overlaps content on mobile */
    .social-topbar { display: none !important; }

    /* Cart page wrapper */
    .cart-section {
        padding: 0 12px !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Checkout blocks — tighter padding on mobile */
    .checkout-block {
        padding: 16px 14px;
        border-radius: 12px;
    }

    /* Cart items inside checkout block */
    .checkout-block .cart-items-container {
        gap: 10px;
    }

    /* Cart item row on mobile */
    .cart-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    .cart-item img {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 8px;
        flex-shrink: 0;
    }
    .cart-item-details {
        flex: 1;
        min-width: 0;
    }
    .cart-item-details h3 {
        font-size: 0.9em;
        white-space: normal;
        word-break: break-word;
    }
    .cart-item-price {
        font-size: 1em;
    }

    /* Quantity controls — wrap Remove button to next line */
    .qty-controls {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
    }

    /* Remove button — small × icon in top-right corner on mobile */
    .cart-item { position: relative; }

    .remove-btn {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 28px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: #f0e8e0 !important;
        border: 1px solid #d9c9b8 !important;
        color: #7a5c00 !important;
        font-size: 0 !important;        /* hide "Remove" text */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-basis: auto !important;
        flex-shrink: 0 !important;
        line-height: 1 !important;
        cursor: pointer;
    }
    .remove-btn::after {
        content: "✕";
        font-size: 13px;
        line-height: 1;
        color: #7a5c00;
    }

    /* Free shipping bar — full width no overflow */
    .free-shipping-bar {
        width: 100%;
        box-sizing: border-box;
    }

    /* Checkout page grid — single column */
    .checkout-page-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        margin-top: 16px;
    }
    .checkout-sidebar-sticky {
        position: static;
        top: auto;
    }

    /* Form inputs — full width, no overflow */
    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    /* Order summary box */
    .checkout-summary-box {
        padding: 14px 12px;
    }

    /* Place Order button — full width, prominent */
    #checkout-submit,
    .checkout-submit-btn {
        width: 100%;
        min-height: 52px;
        font-size: 1.05em;
    }

    /* Section title on cart page */
    .cart-section .section-header h2,
    .cart-section h2 {
        font-size: 1.4em;
    }
    .cart-section .section-subtitle {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .checkout-block {
        padding: 14px 12px;
    }
    .cart-item img {
        width: 62px;
        height: 62px;
    }
    .cart-item-details h3 {
        font-size: 0.86em;
    }
    /* Coupon row stacks vertically */
    .coupon-row {
        flex-direction: column;
        gap: 8px;
    }
    .coupon-row input,
    .coupon-apply-btn {
        width: 100%;
    }
}

/* ================================================
   LANDSCAPE MOBILE — compact nav so all items fit
   ================================================ */
@media (orientation: landscape) and (max-height: 500px) {
    /* Shrink header so the nav drawer has more room */
    .header-inner { padding: 6px 20px; }
    .header-logo  { height: 44px; }
    .header-brand-name    { font-size: 0.75em; }
    .header-brand-tagline { font-size: 0.48em; }

    /* Compact the nav drawer */
    nav {
        padding-top: 54px;  /* less gap below the shorter header */
        padding-bottom: 12px;
        overflow-y: auto;   /* ensure scroll if items still overflow */
        -webkit-overflow-scrolling: touch;
    }
    nav ul  { padding: 4px 12px; gap: 1px; }
    nav a   { padding: 9px 16px; font-size: 0.95em; }

    /* Hero: shorter in landscape so the page doesn't feel huge */
    #hero { min-height: 320px; }
    .hero-content { min-height: 320px; padding: 16px 24px 40px; }
    #hero h2 { font-size: 1.4em; }
}
