/* ==========================================================================
   PETIFY — MOBILE RESPONSIVE STYLES (Complete Rewrite)
   ========================================================================== */

/* ── TABLET & MOBILE (≤ 900px) ─────────────────────────────────────────── */
@media (max-width: 900px) {

    /* ── CURSOR — disable on touch ── */
    body { cursor: auto !important; }
    #custom-cursor, #cursor-ring { display: none !important; }
    a, button { cursor: pointer !important; }

    /* ── NAVBAR ── */
    .nav-container { padding: 0 20px !important; }
    /* Hide desktop nav items */
    .nav-links { display: none !important; }
    .search-btn { display: none !important; }
    /* Hide Login button — accessible via hamburger drawer instead */
    #nav-auth-btn { display: none !important; }
    /* Show hamburger menu */
    .mobile-menu-btn { display: flex !important; }

    /* ── FOOTER ── */
    footer { padding: 50px 20px 20px !important; }
    .footer-container { grid-template-columns: 1fr 1fr !important; gap: 35px !important; }

    /* ── CART DRAWER — full screen ── */
    .cart-drawer { max-width: 100% !important; right: -100% !important; }
    .cart-drawer.active { right: 0 !important; }
    .cart-header { padding: 25px 20px 18px !important; }
    .cart-items { padding: 20px !important; }
    .cart-footer { padding: 20px !important; }
    .shipping-progress-container { padding: 0 20px 15px !important; }

    /* ── SECTION TITLES ── */
    .section-title { font-size: 34px !important; }
    .section-header.between { flex-direction: column !important; align-items: flex-start !important; gap: 15px !important; }

    /* ── FEATURES STRIP ── */
    .features-strip { grid-template-columns: repeat(2, 1fr) !important; }
    .feature-item { padding: 20px !important; border-right: none !important; border-bottom: 1px solid var(--ivory3) !important; }
    .feature-item:nth-child(odd) { border-right: 1px solid var(--ivory3) !important; }
    .feature-item:nth-child(3), .feature-item:nth-child(4) { border-bottom: none !important; }

    /* ── CATEGORIES ── */
    .categories-section { padding: 60px 20px !important; }
    .categories-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }

    /* ── BEST SELLERS (homepage) ── */
    .products-section { padding: 40px 20px 60px !important; }
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
    .products-filters { flex-wrap: wrap; gap: 10px; }

    /* ── PRODUCTS PAGE ── */
    .products-page-layout { flex-direction: column !important; padding: 20px !important; }
    .products-sidebar { width: 100% !important; position: static !important; }
    .products-main-area { width: 100% !important; }
    .products-grid-main { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
    .products-topbar { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }

    /* ── CHECKOUT ── */
    .checkout-layout { flex-direction: column !important; padding: 20px !important; gap: 20px !important; }
    .checkout-form-col, .checkout-summary-col { width: 100% !important; max-width: 100% !important; }
    .checkout-summary-col { order: -1 !important; }
    .address-form-grid { grid-template-columns: 1fr !important; }
    .geo-actions { flex-direction: column !important; gap: 10px !important; }

    /* ── PRODUCT DETAIL ── */
    .product-detail-layout { flex-direction: column !important; padding: 20px !important; gap: 20px !important; }
    .product-gallery-col, .product-info-col { width: 100% !important; }
    .product-thumbnails { flex-direction: row !important; overflow-x: auto !important; gap: 8px !important; }

    /* ── PROFILE ── */
    .profile-layout { flex-direction: column !important; padding: 20px !important; gap: 20px !important; }
    .profile-sidebar { width: 100% !important; position: static !important; }
    .profile-tabs { flex-direction: row !important; overflow-x: auto !important; gap: 8px !important; padding-bottom: 8px !important; -webkit-overflow-scrolling: touch !important; }
    .tab-btn { white-space: nowrap !important; flex-shrink: 0 !important; }
    .profile-main { width: 100% !important; }

    /* ── ADMIN ── */
    .admin-layout { flex-direction: column !important; }
    .admin-sidebar { width: 100% !important; position: static !important; }
    .admin-content { padding: 20px !important; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* ── GENERAL ── */
    input, textarea, select { font-size: 16px !important; }
    img { max-width: 100%; }
}

/* ── PHONE (≤ 600px) ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {

    html { font-size: 15px; }

    /* ════════════════════════════════
       NAVBAR
    ════════════════════════════════ */
    .nav-container { padding: 0 16px !important; }
    .logo-text { font-size: 20px !important; }
    /* Keep only Logo + Cart + Hamburger on mobile */
    #nav-auth-btn { display: none !important; }
    .cart-pill-btn { padding: 7px 12px 7px 14px !important; font-size: 13px !important; }

    /* ════════════════════════════════
       HERO SECTION
    ════════════════════════════════ */
    .hp-hero {
        height: auto !important;
        min-height: 85svh !important;
        overflow: hidden !important;
    }

    /* Orange stripe — move up so less teal above it */
    .hp-bg-stripe {
        height: 32vh !important;
        top: 40% !important;
        transform: translateY(-50%) !important;
    }

    /* PETIFY text — fits mobile width */
    .hp-big-text {
        display: flex !important;
        font-size: clamp(48px, 15vw, 80px) !important;
        top: 40% !important;
        gap: 0 !important;
        letter-spacing: -1px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    /* Dog canvas — properly centered & sized */
    .hp-center-dog {
        width: 320px !important;
        height: 320px !important;
        top: 40% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    .hp-center-dog canvas {
        width: 320px !important;
        height: 320px !important;
    }

    /* Floating decorative shapes — hide on mobile */
    .hp-floaters { display: none !important; }
    .hp-arrow-btn { display: none !important; }

    /* Bottom content — reduce gap below stripe */
    .hp-bottom {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 20px 20px 24px !important;
    }
    .hp-left-text {
        font-size: 10px !important;
        max-width: 100% !important;
        line-height: 1.7 !important;
    }
    .hp-btn { padding: 8px 18px !important; font-size: 10px !important; margin-top: 12px !important; }
    .hp-right-stats {
        flex-direction: row !important;
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid rgba(255,255,255,0.2) !important;
        padding-top: 12px !important;
        gap: 24px !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    .hp-num { font-size: 18px !important; font-weight: 700 !important; }
    .hp-lbl { font-size: 9px !important; letter-spacing: 1.5px !important; }

    /* ════════════════════════════════
       INTRO VIDEO
    ════════════════════════════════ */
    #intro-sequence {
        width: 100vw !important;
        height: 100svh !important;
    }
    .intro-video video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .intro-text {
        width: 88% !important;
        text-align: center !important;
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        padding: 1rem 1.5rem !important;
    }
    #skip-intro { bottom: 24px !important; right: 20px !important; }

    /* ════════════════════════════════
       FEATURES STRIP
    ════════════════════════════════ */
    .features-strip { grid-template-columns: 1fr !important; }
    .feature-item { border-right: none !important; border-bottom: 1px solid var(--ivory3) !important; padding: 18px 20px !important; }
    .feature-item:last-child { border-bottom: none !important; }

    /* ════════════════════════════════
       SECTION TITLES
    ════════════════════════════════ */
    .section-title { font-size: 26px !important; }
    .section-eyebrow { font-size: 12px !important; }

    /* ════════════════════════════════
       CATEGORIES
    ════════════════════════════════ */
    .categories-section { padding: 40px 16px !important; }
    .categories-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .category-card { border-radius: 16px !important; }
    .cat-emoji { font-size: 50px !important; top: 35% !important; }
    .cat-content h3 { font-size: 16px !important; }
    .cat-content { bottom: 12px !important; left: 12px !important; right: 12px !important; }
    .cat-label { display: none !important; }
    .cat-count { font-size: 11px !important; }

    /* ════════════════════════════════
       PRODUCTS
    ════════════════════════════════ */
    .products-section { padding: 30px 16px 50px !important; }
    .products-grid { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
    .products-grid-main { grid-template-columns: 1fr !important; }
    .prod-img-area { height: 180px !important; }

    /* ════════════════════════════════
       TESTIMONIALS
    ════════════════════════════════ */
    .testimonials-section { padding: 40px 16px !important; }
    .testimonials-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* ════════════════════════════════
       FOOTER
    ════════════════════════════════ */
    footer { padding: 40px 16px 16px !important; }
    .footer-container { grid-template-columns: 1fr !important; gap: 25px !important; }
    .footer-col h3 { font-size: 18px !important; margin-bottom: 12px !important; }
    .footer-bottom { margin-top: 30px !important; }

    /* ════════════════════════════════
       CART DRAWER
    ════════════════════════════════ */
    .cart-header h2 { font-size: 22px !important; }
    .cart-total-row span:last-child { font-size: 28px !important; }

    /* ════════════════════════════════
       BUTTONS
    ════════════════════════════════ */
    .btn-primary, .btn-secondary { padding: 12px 20px !important; font-size: 14px !important; }

    /* ════════════════════════════════
       SCROLL TO TOP & CHAT BOT
    ════════════════════════════════ */
    .scroll-to-top-btn { bottom: 20px !important; right: 16px !important; width: 40px !important; height: 40px !important; font-size: 16px !important; }
    /* Floating chatbot/paw button — move above bottom edge */
    #chatbot-trigger, .chatbot-fab, .fab-btn {
        bottom: 70px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
    }

    /* ════════════════════════════════
       ADMIN
    ════════════════════════════════ */
    .admin-stats-grid { grid-template-columns: 1fr !important; }

    /* ════════════════════════════════
       MOBILE DRAWER
    ════════════════════════════════ */
    .mobile-drawer { max-width: 85vw !important; }
    .mobile-drawer a { font-size: 20px !important; margin-bottom: 20px !important; }
}
