/* =============================================
   MOBILE-FIRST PREMIUM UI/UX
   Only affects max-width 768px
   ============================================= */

.mobile-bottom-nav { display: none; }
.mobile-trust-strip { display: none; }
.mob-search-form { display: none; }

@media (max-width: 768px) {
    body {
        padding-top: 58px !important;
        padding-bottom: 68px;
    }

    /* ============================================
       NAVBAR: Logo | Search | Profile+Cart+Menu
       ============================================ */

    /* Hide desktop search on mobile */
    .search-container { display: none !important; }

    /* Nav container: single row, no wrap */
    .nav-container {
        flex-wrap: nowrap !important;
        gap: 0 !important;
        padding: 0 10px !important;
        align-items: center;
    }

    /* Logo stays left, fixed width */
    .nav-brand { flex: 0 0 auto; margin-right: 8px; }
    .brand-logo { height: 32px !important; max-width: 100px !important; }

    /* Mobile search form - HIDDEN on mobile (use search modal instead) */
    .mob-search-form {
        display: none !important;
    }
    .mob-search-wrap {
        display: none !important;
    }
    .mob-search-icon {
        display: none !important;
    }
    .mob-search-input {
        display: none !important;
    }

    /* nav-actions: right side, compact */
    .nav-actions {
        flex: 0 0 auto !important;
        gap: 4px !important;
        margin-left: 0 !important;
    }
    .nav-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
    }
    .nav-icon i { font-size: 1rem !important; }

    /* Hide nav-menu on mobile (hamburger shows it) */
    .nav-menu {
        display: none;
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        background: #fff;
        border-bottom: 1px solid rgba(0,168,150,0.16);
        border-radius: 0;
        box-shadow: 0 4px 12px rgba(15,23,42,0.15);
        padding: 0.5rem 0;
        z-index: 1099;
        max-height: calc(100vh - 58px);
        overflow-y: auto;
    }
    .nav-menu.active { display: flex !important; }
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1rem;
        border-bottom: 1px solid rgba(15,23,42,0.07);
        color: #0f172a;
        font-size: 0.9rem;
    }
    .nav-link:last-child { border-bottom: none; }

    /* ---- Bottom Navigation Bar ---- */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 60px;
        background: #fff;
        border-top: 1px solid rgba(0,168,150,0.15);
        box-shadow: 0 -4px 20px rgba(15,23,42,0.10);
        z-index: 1100;
        align-items: stretch;
        justify-content: space-around;
    }
    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.6rem;
        font-weight: 600;
        position: relative;
        padding: 6px 0 4px;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s;
    }
    .mob-nav-item i { font-size: 1.15rem; transition: transform 0.2s, color 0.2s; }
    .mob-nav-item.active, .mob-nav-item:active { color: #00A896; }
    .mob-nav-item.active i { transform: scale(1.15); }
    .mob-nav-cart {
        background: linear-gradient(135deg, #00A896, #00897B);
        color: #fff !important;
        border-radius: 14px;
        margin: 6px 4px;
        flex: 1.2;
        box-shadow: 0 4px 14px rgba(0,168,150,0.35);
    }
    .mob-nav-cart i { color: #fff !important; }
    .mob-nav-badge {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        background: #ef4444;
        color: #fff;
        font-size: 0.58rem;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        border: 2px solid #fff;
    }
    .whatsapp-float { bottom: 72px !important; }

    /* ---- Trust Strip ---- */
    .mobile-trust-strip {
        display: flex;
        overflow-x: auto;
        background: #fff;
        border-bottom: 1px solid #f1f5f9;
        scrollbar-width: none;
    }
    .mobile-trust-strip::-webkit-scrollbar { display: none; }
    .trust-chip {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 9px 13px;
        font-size: 0.72rem;
        font-weight: 600;
        color: #334155;
        white-space: nowrap;
        border-right: 1px solid #f1f5f9;
    }
    .trust-chip i { color: #00A896; font-size: 0.85rem; }

    /* ---- Collection Grid 2-col ---- */
    .collection-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.55rem !important;
        padding: 0 !important;
    }
    .collection-card, .collection-card.premium-card {
        height: 144px !important;
        border-radius: 8px !important;
    }
    .collection-list-card {
        height: auto !important;
    }
    .collection-list-media {
        aspect-ratio: 4 / 5 !important;
    }
    .collection-list-body {
        padding: 0.6rem 0.65rem 0.75rem !important;
    }
    .collection-list-row {
        gap: 0.45rem !important;
        align-items: flex-start !important;
    }
    .collection-title { font-size: 0.95rem !important; margin-bottom: 0 !important; }
    .collection-overlay { padding: 0.85rem !important; }
    .explore-link { display: none !important; }
    .collection-list-card .collection-cta {
        display: inline-flex !important;
        font-size: 0.74rem !important;
        padding: 0.48rem 0.72rem !important;
    }

    /* ---- Product Grid 2-col ---- */
    .product-listing-grid, .products-grid, .signature-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.55rem !important;
    }
    .product-item .product-image, .product-image-wrapper {
        height: auto !important;
        aspect-ratio: 4 / 5 !important;
    }
    .product-item .product-info, .product-info { padding: 0.48rem 0.52rem 0.56rem !important; }
    .product-title, .product-item .product-title {
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.2rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .product-item .price, .product-price { font-size: 0.88rem !important; }
    .add-to-cart-btn {
        padding: 0.55rem !important;
        font-size: 0.75rem !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
    }

    /* ---- Section Headers ---- */
    .section-header { margin-bottom: 0.75rem !important; }
    .section-title { font-size: clamp(1.3rem, 5.5vw, 1.7rem); }
    .section-subtitle { font-size: 0.85rem; }
    .subheading-gold { font-size: 0.72rem; letter-spacing: 2px; }
    .rich-content-section { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .lead-text { font-size: 0.95rem !important; }

    /* ---- Testimonials 1-col ---- */
    .testimonial-grid { grid-template-columns: 1fr !important; gap: 0.75rem !important; }
    .testimonial-card { padding: 1.1rem !important; border-radius: 10px !important; }
    .testimonial-card .review-text { font-size: 0.9rem !important; margin-bottom: 1rem !important; }
    .testimonial-card .stars { margin-bottom: 0.75rem !important; }

    /* ---- Feature Boxes ---- */
    .feature-box { padding: 1rem !important; border-radius: 10px !important; }
    .feature-box i { font-size: 1.6rem !important; }
    .feature-box h4 { font-size: 0.85rem !important; margin-bottom: 0 !important; }

    /* ---- Video Cards ---- */
    .video-card-vertical { flex: 0 0 185px !important; height: 330px !important; border-radius: 12px !important; }
    .video-product-info h4 { font-size: 0.82rem !important; }

    /* ---- Footer 2-col ---- */
    .footer { padding-top: 2rem !important; padding-bottom: 1.5rem !important; }
    .footer-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.2rem 0.75rem !important;
        padding: 0 1rem !important;
    }
    .footer-section:first-child { grid-column: 1 / -1; }
    .footer-logo { height: 32px !important; }
    .footer-section h4 { font-size: 0.85rem !important; margin-bottom: 0.5rem !important; }
    .footer-section ul li { margin-bottom: 0.3rem !important; }
    .footer-section ul li a, .footer-section li span, .footer-section p { font-size: 0.78rem !important; }
    .social-links { gap: 0.5rem !important; margin-top: 0.6rem !important; }
    .social-links a, .social-links span { width: 28px !important; height: 28px !important; font-size: 0.8rem; }
    .footer-bottom { margin-top: 1.2rem !important; padding-top: 0.8rem !important; font-size: 0.72rem !important; }

    /* ---- Notification above bottom nav ---- */
    .notification {
        top: auto !important;
        bottom: 72px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: unset !important;
        border-radius: 10px !important;
        font-size: 0.88rem;
    }

    /* ---- Profile nav horizontal scroll ---- */
    .profile-nav {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 0.5rem !important;
        padding-bottom: 0.2rem !important;
        scrollbar-width: none;
    }
    .profile-nav::-webkit-scrollbar { display: none; }
    .profile-nav a {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        border-radius: 999px !important;
        padding: 0.55rem 0.85rem !important;
        font-size: 0.82rem !important;
    }
    .user-avatar { width: 52px !important; height: 52px !important; font-size: 1.2rem !important; }

    /* ---- Order Cards ---- */
    .order-card { border-radius: 10px !important; padding: 0.9rem !important; margin-bottom: 0.65rem !important; }
    .order-header { flex-direction: column !important; align-items: flex-start !important; gap: 0.4rem !important; }
    .status-badge { font-size: 0.7rem !important; }

    /* ---- Auth Page ---- */
    .auth-visual { display: none !important; }
    .auth-page { padding-top: 88px !important; }
    .auth-card { border-radius: 14px !important; padding: 1.4rem !important; }

    /* ---- Tap highlight removal ---- */
    * { -webkit-tap-highlight-color: transparent; }
    a, button { touch-action: manipulation; }

    /* ============================================
       PRODUCT PAGE MOBILE - BEAUTIFUL UI
       ============================================ */

    /* Breadcrumb FIRST, then image */
    .product-page {
        padding: 0 0 170px !important;
        margin-top: 0 !important;
        background:
            radial-gradient(circle at 18% 2%, rgba(0, 168, 150, 0.10), transparent 28%),
            linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%) !important;
    }

    .product-page .container {
        padding: 0 !important;
    }

    .product-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    @keyframes productMobileRise {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Product mobile order: path/share, images, details */
    .product-mobile-topbar {
        order: 1 !important;
        padding: 2px 8px 4px !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.92) !important;
        border-bottom: 1px solid rgba(0, 168, 150, 0.10) !important;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
    }

    .details-section {
        order: 3 !important;
        padding: 4px 10px 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
    }

    /* Breadcrumb styling */
    .breadcrumb {
        font-size: 11px !important;
        gap: 6px !important;
        padding: 0 0 10px !important;
        margin-bottom: 0 !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
    }
    .breadcrumb::-webkit-scrollbar { display: none; }

    .details-section > .breadcrumb,
    .head-actions .share-btn {
        display: none !important;
    }

    /* Gallery comes after mobile path/share */
    .gallery-mobile-shell {
        order: 2 !important;
        position: relative !important;
        width: calc(100% + 16px) !important;
        margin-left: -8px !important;
        margin-right: -8px !important;
    }

    .gallery-layout {
        display: block !important;
        margin: 0 !important;
    }

    /* Main image: full-width swipeable carousel */
    .gallery-main {
        width: 100% !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 0 !important;
        box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.06) !important;
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 28%),
            linear-gradient(180deg, #f6fbfb 0%, #eef5f4 100%) !important;
        animation: productMobileRise 0.28s ease both;
    }

    .gallery-main img {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center center !important;
        border-radius: 0 !important;
        transform: scale(1.24) !important;
        transform-origin: center center !important;
    }

    .gallery-stack {
        display: none !important;
    }

    .gallery-card {
        display: none !important;
    }
    .gallery-card.active-thumb { box-shadow: none !important; }

    .gallery-scroll-btn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.92) !important;
        border: 1px solid rgba(226, 232, 240, 0.95) !important;
        color: #0f172a !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 4 !important;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14) !important;
    }

    .gallery-scroll-prev {
        left: 10px !important;
    }

    .gallery-scroll-next {
        right: 10px !important;
    }

    .gallery-mobile-shell {
        margin-bottom: 10px !important;
    }

    /* Product details below gallery */
    .details-section > *:not(.breadcrumb) {
        /* all detail content shows after gallery */
    }

    /* Product head */
    .product-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: start !important;
        gap: 8px !important;
        padding: 8px 10px 5px !important;
        background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
        border: 1px solid rgba(0, 168, 150, 0.14);
        border-bottom: 0;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        animation: productMobileRise 0.28s ease both;
    }

    .product-name {
        font-size: clamp(21px, 6.2vw, 28px) !important;
        line-height: 1.02 !important;
        margin: 0 !important;
    }

    .head-actions {
        align-items: flex-end !important;
        justify-content: flex-start !important;
        width: auto !important;
        min-width: max-content !important;
        gap: 0 !important;
    }

    .price-block {
        display: flex !important;
        align-items: baseline !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
        text-align: right !important;
        padding: 0 !important;
    }
    .price {
        color: #0f766e !important;
        font-size: 23px !important;
        font-weight: 800 !important;
        line-height: 1 !important;
    }
    .mrp { font-size: 12px !important; margin-top: 0 !important; color: #94a3b8 !important; }

    .share-btn {
        padding: 7px 14px !important;
        font-size: 13px !important;
        border-radius: 999px !important;
        white-space: nowrap;
    }

    /* Description */
    .description {
        font-size: 14px !important;
        line-height: 1.2 !important;
        margin: 6px 0 0 !important;
        padding: 4px 0 0 !important;
        color: #475569 !important;
        background: transparent !important;
        border: 0 !important;
        display: inline-block !important;
    }

    /* Tags */
    .tag-list {
        display: inline-flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 0 0 0 6px !important;
        margin: 0 !important;
        gap: 4px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        vertical-align: middle !important;
    }
    .tag-pill {
        font-size: 9px !important;
        padding: 3px 8px !important;
        border-color: rgba(0, 168, 150, 0.24) !important;
        background: #ecfdf5 !important;
        color: #0f766e !important;
    }

    .description + .tag-list {
        margin-left: 4px !important;
    }

    /* Size section */
    .size-section {
        padding: 8px 10px !important;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        margin-top: 6px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        animation: productMobileRise 0.32s ease both;
    }
    .variant-group {
        display: grid !important;
        grid-template-columns: 86px minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .variant-group + .variant-group {
        margin-top: 6px !important;
        padding-top: 6px !important;
        border-top: 1px dashed #dbe7ef !important;
    }
    .size-title { display: none !important; }
    .variant-label {
        font-size: 10px !important;
        line-height: 1.12 !important;
        margin: 0 !important;
        color: #64748b !important;
        letter-spacing: 0.04em !important;
    }
    .size-options {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        min-width: 0 !important;
    }
    .size-btn {
        font-size: 12px !important;
        min-width: 54px !important;
        height: 35px !important;
        padding: 0 10px !important;
        border-radius: 9px !important;
        flex: 0 0 auto !important;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
        transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
    }
    .size-btn:active {
        transform: scale(0.96);
    }
    .size-btn.selected {
        background: linear-gradient(135deg, #0f172a 0%, #164e63 100%) !important;
        border-color: #0f766e !important;
        box-shadow: 0 8px 18px rgba(15, 118, 110, 0.25) !important;
    }

    /* Notes section */
    .notes-section {
        position: static !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        padding: 8px !important;
        background: #fff !important;
        margin-top: 6px !important;
        border: 1px solid rgba(226, 232, 240, 0.95) !important;
        border-radius: 16px !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
        animation: productMobileRise 0.36s ease both;
    }
    .note-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        text-align: center !important;
        min-width: 0 !important;
    }
    .note-card img {
        width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
    }
    .note-label {
        font-size: 8px !important;
        margin: 0 !important;
        line-height: 1.1 !important;
        letter-spacing: 0.03em !important;
    }
    .note-value {
        font-size: 10px !important;
        margin: 0 !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere !important;
    }

    /* Sticky purchase row */
    .purchase-row {
        position: fixed !important;
        bottom: 60px !important;
        left: 8px !important;
        right: 8px !important;
        z-index: 900 !important;
        display: grid !important;
        grid-template-columns: 96px 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
        background: rgba(255,255,255,0.98) !important;
        border: 1px solid rgba(226, 232, 240, 0.9) !important;
        box-shadow: 0 -8px 24px rgba(15,23,42,0.12) !important;
        border-radius: 18px !important;
        margin-top: 0 !important;
    }

    .quantity-control {
        height: 48px !important;
        border-radius: 999px !important;
        background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.8) !important;
        padding: 0 4px !important;
    }
    .qty-btn { font-size: 22px !important; width: 38px !important; height: 38px !important; }
    .qty-display { font-size: 18px !important; }

    .add-to-cart {
        height: 48px !important;
        font-size: 16px !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, #00A896, #00897B) !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px;
        box-shadow: 0 10px 22px rgba(0, 168, 150, 0.22) !important;
    }

    body.product-page-open .whatsapp-float {
        left: auto !important;
        right: 12px !important;
        bottom: calc(60px + 16px) !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 22px !important;
        z-index: 950 !important;
        box-shadow: 0 10px 20px rgba(37, 211, 102, 0.28) !important;
    }

    @media (prefers-reduced-motion: reduce) {
        .gallery-main,
        .product-head,
        .size-section,
        .notes-section {
            animation: none !important;
        }

        .size-btn {
            transition: none !important;
        }
    }

    /* Related products */
    .related-products { padding: 18px 0 0 !important; }
    .related-products h2 { font-size: 18px !important; padding: 0 10px; margin-bottom: 10px !important; }
    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 0 10px !important;
    }
    .related-card { border-radius: 10px !important; }
    .related-card img { height: 150px !important; }
    .related-info { padding: 10px !important; }
    .related-info h4 { font-size: 13px !important; margin-bottom: 4px !important; }
    .related-info p { font-size: 14px !important; }
}
