/* ============================================================
   MYSHOPINDIA - GLOBAL MOBILE RESPONSIVE CSS
   Covers: Header, Auth, Home, Shop Pages, Product Details,
           Cart, Checkout, Blog, Profile, Wishlist, Contact
   ============================================================ */

/* ─── HEADER / NAV ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .sp-header .sp-container {
        gap: 10px;
        padding: 0 14px;
    }
    .sp-logo-img { width: 70px !important; }
    .sp-nav      { display: none !important; }
    .sp-search   { display: none !important; }
    .sp-login    { display: none !important; }
    .sp-started  { display: none !important; }

    .sp-actions {
        gap: 12px;
        margin-left: auto;
    }
    .sp-icon { font-size: 20px; }
    .sp-hamburger { display: flex !important; }
}

@media (max-width: 480px) {
    .sp-icon { font-size: 19px; }
    .sp-header { padding: 10px 0; }
}

/* ─── MOBILE NAV DRAWER ─────────────────────────────────────── */
.sp-mobile-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 88vw);
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sp-mobile-nav.open { transform: translateX(0); }

.sp-mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sp-mobile-links {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sp-mobile-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #f8fafc;
    transition: all .2s;
}
.sp-mobile-links a:hover,
.sp-mobile-links a.active {
    color: #e5484d;
    background: #fff5f5;
    padding-left: 26px;
}

.sp-mobile-footer {
    flex-shrink: 0;
    padding: 16px 20px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Mobile User Card (when logged in) */
.sp-mob-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
}
.sp-mob-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #e5484d;
    color: #fff;
    font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(229,72,77,.25);
}
.sp-mob-user-name {
    font-size: 14px; font-weight: 800; color: #0f172a;
    line-height: 1.2;
}
.sp-mob-user-email {
    font-size: 11px; color: #64748b;
    margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 200px;
}

/* Mobile Auth Buttons */
.sp-mob-auth-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.sp-mob-btn-login,
.sp-mob-btn-register,
.sp-mob-btn-profile,
.sp-mob-btn-logout {
    display: flex; align-items: center; justify-content: center;
    gap: 7px;
    padding: 11px 10px;
    border-radius: 10px;
    font-size: 13px; font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    border: 1.5px solid transparent;
}
.sp-mob-btn-login {
    background: #fff;
    color: #e5484d;
    border-color: #e5484d;
}
.sp-mob-btn-login:hover { background: #fff5f5; }

.sp-mob-btn-register {
    background: #e5484d;
    color: #fff;
    border-color: #e5484d;
    box-shadow: 0 4px 12px rgba(229,72,77,.25);
}
.sp-mob-btn-register:hover { background: #c93b40; }

.sp-mob-btn-profile {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}
.sp-mob-btn-profile:hover { background: #e2e8f0; }

.sp-mob-btn-logout {
    background: #fff5f5;
    color: #e5484d;
    border-color: rgba(229,72,77,.2);
}
.sp-mob-btn-logout:hover { background: #e5484d; color: #fff; }

/* Get Started in mobile nav */
.sp-mobile-footer .sp-started {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 11px;
    border-radius: 10px;
    background: #0f172a;
    color: #fff !important;
    font-size: 13px; font-weight: 700;
    margin-top: 0;
}


/* ─── AUTH PAGES (Login / Register) ────────────────────────── */
@media (max-width: 900px) {
    .sp-auth-wrapper {
        grid-template-columns: 1fr !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        min-height: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        height: 100vh;
    }
    .sp-auth-banner { display: none !important; }
    .sp-auth-form-panel {
        padding: 40px 28px !important;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 60px !important;
    }
}
@media (max-width: 480px) {
    .sp-auth-form-panel {
        padding: 30px 20px !important;
        padding-top: 50px !important;
    }
    .sp-auth-header h2 { font-size: 24px !important; }
    .sp-auth-wrapper {
        max-width: 100% !important;
        margin: 0 !important;
    }
}


/* ─── HOME PAGE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Top Bar */
    .sp-topbar .sp-container {
        flex-direction: column; gap: 3px;
        text-align: center; font-size: 11px;
    }

    /* Hero Slider */
    .sp-slider { height: 260px; border-radius: 12px; }
    .sp-hero-grid { grid-template-columns: 1fr !important; }
    .sp-sidebar { display: none !important; }

    /* Features */
    .sp-features { padding: 14px 0; }
    .sp-features-inner {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 14px 12px !important;
        gap: 0 !important;
        border-radius: 10px;
    }
    .sp-feat { padding: 10px 8px; border-bottom: 1px solid #f1f5f9; }
    .sp-feat:nth-child(odd)  { border-right: 1px solid #f1f5f9; }
    .sp-feat:nth-last-child(-n+2) { border-bottom: none; }
    .sp-feat-icon { width: 36px; height: 36px; font-size: 14px; }
    .sp-feat-text h4 { font-size: 12px; }
    .sp-feat-text p  { font-size: 11px; }

    /* Categories */
    .sp-cat-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .sp-cat-name { font-size: 11px; }

    /* Products */
    .sp-prod-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .sp-prod-tabs { gap: 6px; flex-wrap: wrap; }
    .sp-tab { padding: 7px 12px; font-size: 12px; }

    /* Promos */
    .sp-promos { grid-template-columns: 1fr !important; gap: 14px; }
    .sp-promo  { min-height: 175px; padding: 26px 22px; }
    .sp-promo-title { font-size: 22px; }
    .sp-promo-img {
        max-height: 105% !important;
        position: absolute !important;
        right: 0px !important;
        max-width: 44% !important;
    }

    /* Why Choose */
    .sp-why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Testimonials */
    .sp-testi-slide { grid-template-columns: 1fr !important; }

    /* Blog */
    .sp-blog-grid { grid-template-columns: 1fr !important; gap: 14px !important; }

    /* Newsletter */
    .sp-nl-box {
        flex-direction: column !important;
        padding: 26px 18px !important;
        text-align: center; gap: 18px !important;
    }
    .sp-nl-left  { flex-direction: column !important; align-items: center !important; }
    .sp-nl-form-box { width: 100% !important; }

    /* Pre-Footer */
    .sp-prefooter .sp-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* Footer */
    .sp-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .sp-fbottom { flex-direction: column !important; text-align: center; gap: 8px; }
}

@media (max-width: 480px) {
    .sp-slider    { height: 220px; }
    .sp-cat-grid  { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
    .sp-prod-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .sp-pimg      { height: 110px !important; }
    .sp-prefooter .sp-container { grid-template-columns: 1fr !important; }
    .sp-promo-img { max-width: 50% !important; }
    .sp-why-grid  { grid-template-columns: repeat(2, 1fr) !important; }
    .sp-nl-text h2 { font-size: 18px !important; }
}


/* ─── SHOP CATEGORY PAGES (Laptop/Desktop/etc.) ─────────────── */
@media (max-width: 992px) {
    /* Sidebar hidden, full-width grid */
    .sp-lap-layout,
    .sp-desk-layout,
    .sp-acc-layout,
    .sp-soft-layout,
    .sp-elec-layout,
    .sp-print-layout,
    .sp-cctv-layout {
        grid-template-columns: 1fr !important;
    }
    .sp-lap-sidebar,
    .sp-desk-sidebar,
    .sp-acc-sidebar,
    .sp-soft-sidebar,
    .sp-elec-sidebar,
    .sp-print-sidebar,
    .sp-cctv-sidebar {
        display: none !important;
    }
    /* Show filter toggle button on mobile */
    .sp-filter-mobile-toggle {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    /* Hero banners */
    .sp-lap-hero,
    .sp-desk-hero,
    .sp-acc-hero,
    .sp-soft-hero,
    .sp-elec-hero,
    .sp-print-hero,
    .sp-cctv-hero {
        padding: 30px 0 !important;
    }
    .sp-lap-hero-content h1,
    .sp-desk-hero-content h1,
    .sp-acc-hero-content h1,
    .sp-soft-hero-content h1,
    .sp-elec-hero-content h1,
    .sp-print-hero-content h1,
    .sp-cctv-hero-content h1 {
        font-size: 24px !important;
    }

    /* Product Grids — 2 columns */
    .sp-lap-grid,
    .sp-desk-grid,
    .sp-acc-grid,
    .sp-soft-grid,
    .sp-elec-grid,
    .sp-print-grid,
    .sp-cctv-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Toolbar */
    .sp-lap-toolbar,
    .sp-desk-toolbar,
    .sp-acc-toolbar {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }

    /* Card sizes */
    .sp-lap-card-img-wrap,
    .sp-desk-card-img-wrap,
    .sp-acc-card-img-wrap,
    .sp-soft-card-img-wrap,
    .sp-elec-card-img-wrap,
    .sp-print-card-img-wrap,
    .sp-cctv-card-img-wrap { height: 140px !important; }

    .sp-lap-card-body,
    .sp-desk-card-body,
    .sp-acc-card-body,
    .sp-soft-card-body,
    .sp-elec-card-body,
    .sp-print-card-body,
    .sp-cctv-card-body { padding: 12px !important; }

    .sp-lap-card-title,
    .sp-desk-card-title,
    .sp-acc-card-title { font-size: 13px !important; }

    .sp-price-current { font-size: 14px !important; }
    .sp-lap-card-btn,
    .sp-desk-card-btn,
    .sp-acc-card-btn  { padding: 7px 10px !important; font-size: 11px !important; }
}

@media (max-width: 480px) {
    .sp-lap-grid,
    .sp-desk-grid,
    .sp-acc-grid,
    .sp-soft-grid,
    .sp-elec-grid,
    .sp-print-grid,
    .sp-cctv-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .sp-lap-card-img-wrap,
    .sp-desk-card-img-wrap { height: 120px !important; }
}


/* ─── PRODUCT DETAILS PAGE ──────────────────────────────────── */
@media (max-width: 992px) {
    .sp-details-layout {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
    .sp-main-image { height: 340px !important; }
    .sp-related-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 576px) {
    .sp-details-container { padding: 0 14px !important; }
    .sp-main-image { height: 260px !important; }
    .sp-info-title { font-size: 20px !important; }

    /* Actions box — qty on top, btns below full-width */
    .sp-actions-box {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .sp-qty-picker {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .sp-action-btns-row {
        display: flex !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .sp-btn-cart, .sp-btn-buy {
        flex: 1 !important;
        justify-content: center !important;
        padding: 0 12px !important;
        font-size: 14px !important;
    }

    .sp-trust-grid { grid-template-columns: 1fr !important; gap: 8px !important; }
    .sp-tabs-nav { gap: 14px !important; flex-wrap: wrap !important; }
    .sp-tab-trigger { font-size: 14px !important; }
    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .sp-related-card-img-wrap { height: 120px !important; }
    .sp-specs-table td { padding: 10px 12px !important; font-size: 12px !important; }
    .sp-specs-table td.sp-spec-label { width: 110px !important; }
    .sp-rev-comment { padding-left: 0 !important; margin-top: 8px !important; }
    .sp-price-box { flex-wrap: wrap !important; }
    .sp-price-big { font-size: 26px !important; }
    .sp-thumbnails { gap: 8px !important; }
    .sp-thumb { width: 60px !important; height: 60px !important; }
}


/* ─── CART PAGE ─────────────────────────────────────────────── */
@media (max-width: 992px) {
    .sp-cart-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
    .sp-cart-hero { padding: 30px 0 !important; }
    .sp-cart-hero-content h1 { font-size: 26px !important; }
    .sp-cart-header { display: none !important; }
    .sp-cart-item {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        text-align: center !important;
    }
    .sp-cart-item-product { flex-direction: column !important; }
    .sp-cart-qty { justify-content: center !important; }
    .sp-cart-item-remove { justify-self: center !important; }
    .sp-cart-item-price { text-align: center !important; }
    .sp-cart-summary { padding: 22px !important; }
}
@media (max-width: 480px) {
    .sp-cart-container { padding: 0 14px !important; margin-top: 24px !important; }
    .sp-cart-item-img { width: 70px !important; height: 70px !important; }
}


/* ─── CHECKOUT PAGE ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .sp-chk-layout { grid-template-columns: 1fr !important; }
    .sp-chk-summary { position: static !important; }
}
@media (max-width: 576px) {
    .sp-form-grid { grid-template-columns: 1fr !important; }
    .sp-chk-section { padding: 18px 16px !important; }
    .sp-chk-hero h1 { font-size: 24px !important; }
    .sp-chk-container { padding: 0 14px !important; }
    .sp-pay-icons { display: none !important; }
}


/* ─── BLOG PAGE ─────────────────────────────────────────────── */
@media (max-width: 992px) {
    .sp-featured-post { grid-template-columns: 1fr !important; }
    .sp-blog-grid     { grid-template-columns: repeat(2, 1fr) !important; }
    .sp-blog-details-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
    .sp-blog-hero { padding: 36px 0 !important; }
    .sp-blog-hero h1 { font-size: 26px !important; }
    .sp-blog-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .sp-featured-content { padding: 24px 20px !important; }
    .sp-featured-content h2 { font-size: 20px !important; }
    .sp-blog-details-article { padding: 22px 18px !important; }
    .sp-blog-details-article h1 { font-size: 22px !important; }
    .sp-featured-footer { flex-direction: column !important; gap: 14px !important; }
    .sp-featured-img-wrap { min-height: 220px !important; max-height: 260px !important; }
}
@media (max-width: 480px) {
    .sp-blog-hero p { font-size: 13px !important; }
    .sp-blog-card-body { padding: 16px !important; }
    .sp-blog-card-body h3 { font-size: 15px !important; height: auto !important; }
}


/* ─── PROFILE PAGE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr !important; }
    .profile-content { padding: 1.5rem !important; }
}
@media (max-width: 576px) {
    .profile-container { padding: 0 14px !important; margin: 20px auto !important; }
    .profile-header h1 { font-size: 1.6rem !important; }
    .tab-title { font-size: 1.35rem !important; }
    .order-card {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .order-meta { text-align: left !important; }
    .payment-grid { grid-template-columns: 1fr !important; }
}


/* ─── WISHLIST PAGE ─────────────────────────────────────────── */
@media (max-width: 992px) {
    .sp-wish-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
    .sp-wish-hero { padding: 30px 0 !important; }
    .sp-wish-hero-content h1 { font-size: 26px !important; }
    .sp-wish-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
}
@media (max-width: 480px) {
    .sp-wish-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .sp-wish-card-img-wrap { height: 150px !important; }
    .sp-wish-container { padding: 0 14px !important; }
}


/* ─── CONTACT PAGE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sp-contact-grid,
    .sp-contact-layout { grid-template-columns: 1fr !important; gap: 24px !important; }
    .sp-contact-hero   { padding: 36px 0 !important; }
    .sp-contact-hero h1 { font-size: 26px !important; }
    .sp-contact-form-wrap,
    .sp-contact-info-wrap { padding: 24px 20px !important; }
}
@media (max-width: 480px) {
    .sp-contact-container { padding: 0 14px !important; }
    .sp-contact-map { height: 200px !important; }
}


/* ─── ABOUT / POLICY PAGES ──────────────────────────────────── */
@media (max-width: 768px) {
    .sp-about-hero { padding: 50px 0 !important; }
    .sp-about-hero h1 { font-size: 30px !important; }
    .sp-about-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
    .sp-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
    .sp-values-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
}
@media (max-width: 480px) {
    .sp-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .sp-stat-item h3 { font-size: 30px !important; }
    .sp-faq-item summary { padding: 16px 20px !important; font-size: 14px !important; }
}


/* ─── SEARCH PAGE ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sp-search-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .sp-search-hero h1 { font-size: 22px !important; }
}
@media (max-width: 480px) {
    .sp-search-grid { grid-template-columns: 1fr !important; }
}


/* ─── GENERAL UTILITY ───────────────────────────────────────── */
@media (max-width: 768px) {
    .sp-container { padding: 0 14px !important; }
    .sp-sec { padding: 26px 0 !important; }
    .sp-sec-hdr { margin-bottom: 16px !important; }
    .section-title { font-size: 18px !important; }
    .sp-pagination a,
    .sp-pagination span { width: 34px !important; height: 34px !important; font-size: 13px !important; }
}

/* Overlay */
.sp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9998;
    opacity: 0; pointer-events: none;
    transition: opacity .35s;
    backdrop-filter: blur(4px);
}
.sp-overlay.open { opacity: 1; pointer-events: all; }
