/* ============================================
   SPARE XPRESS - Premium Mobile Design System
   Version 2.0 — Glassmorphism + Micro-Animations
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --sp-primary: #2563eb;
    --sp-primary-dark: #1a365d;
    --sp-primary-light: #3b82f6;
    --sp-accent: #f59e0b;
    --sp-accent-warm: #f97316;
    --sp-success: #10b981;
    --sp-danger: #ef4444;
    --sp-text: #1e293b;
    --sp-text-muted: #64748b;
    --sp-bg: #f8fafc;
    --sp-card: #ffffff;
    --sp-border: #e2e8f0;
    --sp-radius: 12px;
    --sp-radius-sm: 8px;
    --sp-radius-lg: 16px;
    --sp-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --sp-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --sp-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --sp-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --sp-glass: rgba(255,255,255,0.7);
    --sp-glass-border: rgba(255,255,255,0.2);
    --sp-gradient: linear-gradient(135deg, #2563eb 0%, #1a365d 100%);
    --sp-gradient-warm: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --sp-gradient-hero: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #2563eb 100%);
    --sp-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- GLOBAL RESET ---------- */
*, *::before, *::after {
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    overflow-x: hidden;
    background: var(--sp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* Smooth page transition */
body > * {
    animation: fadeInUp 0.5s var(--sp-transition);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(37,99,235,0.3); }
    50% { box-shadow: 0 0 20px rgba(37,99,235,0.5); }
}

/* ---------- NAVIGATION ---------- */
@media (max-width: 991px) {
    header.bg-white.shadow-sm {
        position: sticky;
        top: 0;
        z-index: 1030;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(255,255,255,0.95) !important;
        box-shadow: 0 1px 20px rgba(0,0,0,0.08);
    }

    .spx-topbar {
        display: none !important;
    }

    /* Mobile search */
    .spx-header-search .form-control {
        font-size: 0.88rem;
        padding: 0.55rem 0.85rem;
        border-radius: 25px 0 0 25px;
        border: 1.5px solid var(--sp-border);
        background: var(--sp-bg);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-header-search .form-control:focus {
        border-color: var(--sp-primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
        background: #fff;
    }

    .spx-header-search .btn {
        border-radius: 0 25px 25px 0;
        padding: 0.55rem 1rem;
        background: var(--sp-primary);
        border: none;
        transition: all 0.3s var(--sp-transition);
    }

    .spx-header-search .btn:active {
        transform: scale(0.95);
    }

    /* Hamburger icon */
    .navbar-toggler {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        border: 1.5px solid var(--sp-border);
        background: var(--sp-bg);
        transition: all 0.3s var(--sp-transition);
    }

    .navbar-toggler:active {
        transform: scale(0.92);
        background: var(--sp-primary);
        border-color: var(--sp-primary);
    }

    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(37, 99, 235, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Mobile nav dropdown */
    .spx-nav-bar .navbar-collapse {
        background: #fff;
        border-radius: var(--sp-radius-lg);
        margin: 0.75rem 0;
        padding: 0.75rem;
        box-shadow: var(--sp-shadow-lg);
        border: 1px solid var(--sp-border);
        animation: scaleIn 0.25s var(--sp-transition);
    }

    .spx-nav-bar .nav-link {
        padding: 0.7rem 1rem;
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--sp-text) !important;
        border-radius: var(--sp-radius-sm);
        transition: all 0.2s var(--sp-transition);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .spx-nav-bar .nav-link:hover,
    .spx-nav-bar .nav-link.active {
        background: linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(37,99,235,0.04) 100%);
        color: var(--sp-primary) !important;
        transform: translateX(4px);
    }

    /* Mobile search bar below header */
    .d-md-none.mt-3 {
        padding: 0 0 0.75rem;
        animation: fadeIn 0.3s var(--sp-transition);
    }

    /* Mobile cart icon */
    .btn-outline-primary.me-2.d-lg-none {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        border: 1.5px solid var(--sp-border);
        background: var(--sp-bg);
        color: var(--sp-primary);
        position: relative;
        transition: all 0.2s var(--sp-transition);
    }

    .btn-outline-primary.me-2.d-lg-none:active {
        transform: scale(0.92);
    }
}

/* ---------- HERO SECTION ---------- */
@media (max-width: 991px) {
    .spx-hero {
        padding: 2.5rem 0 2rem;
        text-align: center;
        background: var(--sp-gradient-hero);
        position: relative;
        overflow: hidden;
    }

    .spx-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -30%;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 8s ease-in-out infinite;
    }

    .spx-hero::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -20%;
        width: 250px;
        height: 250px;
        background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 6s ease-in-out infinite reverse;
    }

    .spx-hero-inner {
        position: relative;
        z-index: 2;
    }

    .spx-hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        background: rgba(255,255,255,0.12);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.15);
        color: #fff;
        padding: 0.4rem 1rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        margin-bottom: 1rem;
        animation: fadeInUp 0.6s var(--sp-transition) 0.1s both;
    }

    .spx-hero-title {
        font-size: clamp(1.5rem, 5vw, 2.2rem);
        font-weight: 800;
        color: #fff;
        line-height: 1.2;
        margin-bottom: 0.75rem;
        animation: fadeInUp 0.6s var(--sp-transition) 0.2s both;
    }

    .spx-hero-sub {
        color: rgba(255,255,255,0.8);
        font-size: 0.88rem;
        max-width: 100%;
        margin: 0 auto 1.25rem;
        line-height: 1.6;
        animation: fadeInUp 0.6s var(--sp-transition) 0.3s both;
    }

    .spx-hero-pills {
        justify-content: center;
        animation: fadeInUp 0.6s var(--sp-transition) 0.4s both;
    }

    .spx-hero-pills span {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.12);
    }

    .spx-hero-cta {
        justify-content: center;
        gap: 1rem;
        animation: fadeInUp 0.6s var(--sp-transition) 0.5s both;
    }

    .spx-hero-cta .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 12px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(37,99,235,0.4);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-hero-cta .btn-lg:active {
        transform: scale(0.96);
    }

    .spx-hero-link {
        padding: 0.7rem 1.2rem;
        border-radius: 12px;
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.15);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-hero-link:active {
        transform: scale(0.96);
        background: rgba(255,255,255,0.2);
    }
}

@media (max-width: 575px) {
    .spx-hero {
        padding: 2rem 0 1.5rem;
    }

    .spx-hero-title {
        font-size: 1.45rem;
    }

    .spx-hero-sub {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .spx-hero-pills {
        gap: 0.3rem;
    }

    .spx-hero-pills span {
        font-size: 0.65rem;
        padding: 0.25rem 0.55rem;
    }

    .spx-hero-cta {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .spx-hero-cta .btn-lg {
        width: 100%;
        padding: 0.75rem;
    }

    .spx-hero-link {
        width: 100%;
        justify-content: center;
        padding: 0.65rem;
    }
}

/* ---------- TRUST BAR ---------- */
@media (max-width: 991px) {
    .spx-trust-bar {
        background: #fff;
        border-bottom: 1px solid var(--sp-border);
        padding: 0.75rem 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .spx-trust-grid {
        display: flex;
        gap: 0.75rem;
        min-width: max-content;
        padding: 0 0.5rem;
    }

    .spx-trust-item {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.5rem 0.75rem;
        background: var(--sp-bg);
        border-radius: var(--sp-radius-sm);
        min-width: fit-content;
    }

    .spx-trust-item i {
        font-size: 1.1rem;
        color: var(--sp-primary);
        flex-shrink: 0;
    }

    .spx-trust-item strong {
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .spx-trust-item span {
        font-size: 0.65rem;
        white-space: nowrap;
    }
}

/* ---------- SECTION HEADERS ---------- */
@media (max-width: 767px) {
    .spx-section-head {
        margin-bottom: 1.5rem;
        padding: 0 0.25rem;
    }

    .spx-section-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .spx-section-head h2 {
        font-size: 1.35rem;
        font-weight: 800;
    }

    .spx-section-head p {
        font-size: 0.82rem;
        line-height: 1.5;
    }
}

/* ---------- BRAND CARDS ---------- */
@media (max-width: 767px) {
    .spx-brand-card {
        padding: 0.75rem 0.4rem;
        min-height: 80px;
        border-radius: var(--sp-radius);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-brand-card:active {
        transform: scale(0.96);
        background: var(--sp-bg);
    }

    .spx-brand-card img {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .spx-brand-card span {
        font-size: 0.62rem;
        line-height: 1.2;
        font-weight: 600;
    }
}

/* ---------- CATEGORY CARDS ---------- */
@media (max-width: 767px) {
    .spx-cat-card {
        padding: 0.9rem 0.4rem;
        min-height: 85px;
        border-radius: var(--sp-radius);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-cat-card:active {
        transform: scale(0.96);
        background: var(--sp-bg);
    }

    .spx-cat-card i {
        font-size: 1.3rem;
    }

    .spx-cat-card span {
        font-size: 0.65rem;
        font-weight: 600;
    }
}

/* ---------- SEARCH SECTION ---------- */
@media (max-width: 991px) {
    .spx-search-section {
        padding: 2rem 0;
    }

    .spx-search-card {
        padding: 1.25rem;
        border-radius: var(--sp-radius-lg);
        box-shadow: var(--sp-shadow-lg);
    }

    .spx-search-label {
        font-size: 0.75rem;
        font-weight: 700;
    }

    .spx-search-card .form-select,
    .spx-search-card .form-control {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
        border-radius: var(--sp-radius-sm);
        border: 1.5px solid var(--sp-border);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-search-card .form-select:focus,
    .spx-search-card .form-control:focus {
        border-color: var(--sp-primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }
}

@media (max-width: 575px) {
    .spx-search-section {
        padding: 1.5rem 0;
    }

    .spx-search-card {
        padding: 1rem;
        border-radius: var(--sp-radius);
    }

    .spx-search-card .col-6 {
        flex: 0 0 auto;
        width: 50%;
        padding: 0 0.4rem;
    }

    .spx-search-card .col-12 {
        padding: 0 0.4rem;
        margin-bottom: 0.5rem;
    }

    .spx-search-card .btn-primary {
        padding: 0.55rem 1.5rem;
        border-radius: var(--sp-radius-sm);
        font-weight: 600;
    }
}

/* ---------- HOW IT WORKS ---------- */
@media (max-width: 767px) {
    .spx-how-card {
        padding: 1.25rem 1rem;
        border-radius: var(--sp-radius);
        transition: all 0.3s var(--sp-transition);
    }

    .spx-how-card:active {
        transform: scale(0.97);
    }

    .spx-how-num {
        width: 30px;
        height: 30px;
        font-size: 0.82rem;
    }

    .spx-how-icon {
        font-size: 1.5rem;
    }

    .spx-how-card h6 {
        font-size: 0.82rem;
        font-weight: 700;
    }

    .spx-how-card p {
        font-size: 0.72rem;
        line-height: 1.4;
    }
}

/* ---------- CTA BANNER ---------- */
@media (max-width: 767px) {
    .spx-cta-banner {
        padding: 2rem 0;
        text-align: center;
    }

    .spx-cta-banner h3 {
        font-size: 1.15rem;
    }

    .spx-cta-banner p {
        font-size: 0.82rem;
    }

    .spx-cta-banner .d-flex {
        justify-content: center !important;
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .spx-cta-banner .btn,
    .spx-cta-banner .spx-whatsapp-btn {
        width: 100%;
        padding: 0.7rem;
        border-radius: var(--sp-radius-sm);
        font-weight: 600;
    }
}

/* ---------- SHOP PAGE ---------- */
@media (max-width: 991px) {
    .bg-mesh-gradient {
        min-height: auto !important;
        padding: 2rem 0 !important;
        background: var(--sp-gradient-hero) !important;
    }

    .display-4 {
        font-size: 1.6rem !important;
        font-weight: 800 !important;
    }

    .lead {
        font-size: 0.88rem !important;
        opacity: 0.9;
    }

    /* Trust indicator cards */
    .bg-mesh-gradient .row.g-3 .col-6 {
        flex: 0 0 auto;
        width: 48%;
        padding: 0.25rem;
    }

    .bg-mesh-gradient .row.g-3 .col-lg-3 {
        width: 24%;
    }

    .bg-mesh-gradient .p-3.text-center {
        padding: 0.75rem 0.5rem !important;
        border-radius: var(--sp-radius-sm);
    }

    /* Search bar */
    .bg-white.p-4.rounded-3 {
        border-radius: var(--sp-radius) !important;
        box-shadow: var(--sp-shadow-md);
    }

    .bg-white.p-4.rounded-3 .row.g-3 {
        gap: 0.6rem;
    }

    .bg-white.p-4.rounded-3 .col-lg-6,
    .bg-white.p-4.rounded-3 .col-lg-3 {
        flex: 0 0 auto;
        width: 100%;
    }

    /* Sort controls */
    .bg-white.p-3.rounded-3 {
        border-radius: var(--sp-radius) !important;
    }

    .bg-white.p-3.rounded-3 .col-md-4 {
        flex: 0 0 auto;
        width: 100%;
        text-align: left !important;
    }

    .bg-white.p-3.rounded-3 .row {
        gap: 0.5rem;
    }

    /* Product grid */
    #productsContainer.row.g-4 {
        gap: 0.75rem !important;
    }

    #productsContainer > div {
        flex: 0 0 auto;
        width: 50%;
        padding: 0 0.375rem;
    }
}

@media (max-width: 575px) {
    .bg-mesh-gradient {
        padding: 1.5rem 0 !important;
    }

    .display-4 {
        font-size: 1.35rem !important;
    }

    /* Product grid mobile */
    #productsContainer > div {
        width: 100%;
        padding: 0 0.25rem;
    }
}

/* ---------- PRODUCT CARDS (Premium Mobile) ---------- */
@media (max-width: 767px) {
    .product-card {
        border-radius: var(--sp-radius) !important;
        border: 1px solid var(--sp-border) !important;
        box-shadow: var(--sp-shadow) !important;
        overflow: hidden;
        transition: all 0.3s var(--sp-transition);
    }

    .product-card:hover {
        transform: none !important;
        box-shadow: var(--sp-shadow-md) !important;
    }

    .product-card .product-image-container {
        height: 160px !important;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    }

    .product-card .product-info {
        padding: 0.85rem !important;
    }

    .product-card .product-title {
        font-size: 0.82rem !important;
        font-weight: 700;
        min-height: auto !important;
        line-height: 1.3;
    }

    .product-card .product-meta {
        font-size: 0.7rem !important;
        gap: 0.3rem;
    }

    .product-card .product-meta-item {
        padding: 0.15rem 0.4rem;
        border-radius: 6px;
        background: var(--sp-bg);
    }

    .product-card .product-price {
        font-size: 1rem !important;
        font-weight: 800;
        margin-bottom: 0.75rem !important;
    }

    /* Hide hover overlay, show buttons directly */
    .product-overlay {
        display: none !important;
    }

    .product-card .product-actions {
        display: flex !important;
        gap: 0.4rem;
    }

    .product-card .product-actions .btn {
        flex: 1;
        padding: 0.55rem 0.4rem !important;
        font-size: 0.72rem !important;
        border-radius: var(--sp-radius-sm) !important;
        font-weight: 600;
        transition: all 0.2s var(--sp-transition);
    }

    .product-card .product-actions .btn:active {
        transform: scale(0.95);
    }

    .btn-quick-view {
        background: var(--sp-gradient) !important;
        border: none !important;
        color: #fff !important;
    }

    .btn-add-cart {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        border: none !important;
        color: #fff !important;
    }
}

/* ---------- STOCK BADGES ---------- */
@media (max-width: 767px) {
    .stock-badge {
        font-size: 0.6rem !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 6px !important;
    }

    .product-badge {
        font-size: 0.58rem !important;
        padding: 0.2rem 0.4rem !important;
        border-radius: 6px !important;
    }
}

/* ---------- PRICE REQUEST SECTION ---------- */
@media (max-width: 767px) {
    .price-request-section h2 {
        font-size: 1.15rem !important;
    }

    .price-request-section .d-flex.flex-wrap {
        flex-direction: column;
        gap: 1rem;
    }

    .price-request-section .form-label {
        font-size: 0.85rem;
    }

    .price-request-section .form-control {
        font-size: 16px !important;
    }

    .price-request-section .btn {
        width: 100%;
        padding: 0.65rem;
        border-radius: var(--sp-radius-sm);
        font-weight: 600;
    }
}

/* ---------- TRUST SIGNALS ---------- */
@media (max-width: 767px) {
    .glass-card.p-4 {
        padding: 1rem !important;
        border-radius: var(--sp-radius) !important;
    }

    .glass-card h6 {
        font-size: 0.78rem !important;
        font-weight: 700;
    }

    .glass-card small {
        font-size: 0.68rem !important;
    }

    .glass-card .rounded-circle {
        padding: 0.6rem !important;
    }

    .glass-card .fa-2x {
        font-size: 1.3rem !important;
    }
}

/* ---------- FOOTER ---------- */
@media (max-width: 991px) {
    .footer .row.g-4 {
        gap: 1.5rem;
    }

    .footer .col-md-6,
    .footer .col-lg-2,
    .footer .col-lg-4 {
        flex: 0 0 auto;
        width: 50%;
    }

    .footer h6 {
        font-size: 0.88rem;
    }

    .footer p,
    .footer li {
        font-size: 0.78rem;
    }
}

@media (max-width: 575px) {
    .footer .col-md-6,
    .footer .col-lg-2,
    .footer .col-lg-4 {
        width: 100%;
    }

    .footer .d-flex.align-items-center.mb-3 {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer .btn {
        width: 100%;
    }

    .copyright .text-md-start,
    .copyright .text-md-end {
        text-align: center !important;
    }

    .copyright .small {
        font-size: 0.7rem;
    }
}

/* ---------- MODALS ---------- */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .modal-content {
        border-radius: var(--sp-radius-lg) !important;
        border: none;
        box-shadow: var(--sp-shadow-xl);
        animation: scaleIn 0.3s var(--sp-transition);
    }

    .modal-header {
        padding: 0.85rem 1rem;
        border-radius: var(--sp-radius-lg) var(--sp-radius-lg) 0 0;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        border-top: 1px solid var(--sp-border);
    }

    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
        padding: 0.6rem;
        border-radius: var(--sp-radius-sm);
        font-weight: 600;
    }
}

/* ---------- FORMS ---------- */
@media (max-width: 767px) {
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 0.6rem 0.8rem;
        border-radius: var(--sp-radius-sm);
        border: 1.5px solid var(--sp-border);
        transition: all 0.3s var(--sp-transition);
    }

    .form-control:focus,
    .form-select:focus {
        border-color: var(--sp-primary);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .form-label {
        font-size: 0.82rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
        color: var(--sp-text);
    }

    .form-text {
        font-size: 0.7rem;
    }

    .btn {
        font-size: 0.88rem;
        padding: 0.5rem 1rem;
        border-radius: var(--sp-radius-sm);
        font-weight: 600;
        transition: all 0.2s var(--sp-transition);
    }

    .btn:active {
        transform: scale(0.97);
    }

    .btn-lg {
        font-size: 0.92rem;
        padding: 0.65rem 1.25rem;
    }

    .btn-primary {
        background: var(--sp-primary) !important;
        border-color: var(--sp-primary) !important;
        box-shadow: 0 2px 8px rgba(37,99,235,0.3);
    }

    .btn-primary:active {
        box-shadow: 0 1px 4px rgba(37,99,235,0.2);
    }

    .btn-outline-primary {
        border-color: var(--sp-primary) !important;
        color: var(--sp-primary) !important;
    }

    .btn-outline-primary:active {
        background: var(--sp-primary) !important;
        color: #fff !important;
    }
}

/* ---------- BREADCRUMB ---------- */
@media (max-width: 575px) {
    .breadcrumb {
        padding: 0.65rem 0.85rem !important;
        font-size: 0.78rem !important;
        border-radius: var(--sp-radius-sm) !important;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        font-size: 0.7rem;
    }
}

/* ---------- RESULTS INFO ---------- */
@media (max-width: 767px) {
    .results-info {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
        border-radius: var(--sp-radius-sm);
    }
}

/* ---------- PAGINATION ---------- */
@media (max-width: 575px) {
    .pagination-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-wrapper .btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }
}

/* ---------- BACK TO TOP ---------- */
@media (max-width: 767px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        font-size: 0.9rem;
        bottom: 1.25rem;
        right: 1rem;
        border-radius: 12px;
        box-shadow: var(--sp-shadow-md);
        background: var(--sp-primary);
        color: #fff;
        transition: all 0.3s var(--sp-transition);
    }

    .back-to-top:active {
        transform: scale(0.9);
    }
}

/* ---------- GLOBAL UTILITIES ---------- */
@media (max-width: 767px) {
    .py-5 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }

    .py-4 {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .py-3 {
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    .mb-4 {
        margin-bottom: 0.85rem !important;
    }

    .mb-5 {
        margin-bottom: 1.25rem !important;
    }

    .container-fluid {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .rounded-3 {
        border-radius: var(--sp-radius) !important;
    }

    .shadow-sm {
        box-shadow: var(--sp-shadow) !important;
    }

    .hover-lift {
        transition: none !important;
    }

    .hover-lift:hover {
        transform: none !important;
    }

    /* Hide desktop hover effects */
    .product-card:hover {
        transform: none !important;
    }

    /* Smooth scrollbar */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.15);
        border-radius: 4px;
    }

    /* Selection color */
    ::selection {
        background: rgba(37,99,235,0.2);
        color: var(--sp-text);
    }
}

/* ---------- iOS SAFE AREA ---------- */
@supports (padding: max(0px)) {
    .footer,
    .copyright {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* ---------- LANDSCAPE MOBILE ---------- */
@media (max-width: 991px) and (orientation: landscape) {
    .spx-hero {
        padding: 1.25rem 0;
    }

    .spx-hero-title {
        font-size: 1.4rem;
    }

    .spx-hero-sub {
        font-size: 0.8rem;
    }
}

/* ---------- LOADING SKELETON ---------- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--sp-radius-sm);
}

/* ---------- TOAST NOTIFICATIONS ---------- */
@media (max-width: 767px) {
    .alert.position-fixed {
        left: 0.5rem !important;
        right: 0.5rem !important;
        top: 0.5rem !important;
        min-width: auto !important;
        font-size: 0.82rem;
        border-radius: var(--sp-radius-sm);
        box-shadow: var(--sp-shadow-lg);
        z-index: 9999 !important;
    }
}

/* ---------- FLOATING COMPARISON BTN ---------- */
@media (max-width: 767px) {
    #floatingComparisonBtn {
        margin: 1rem !important;
    }

    #floatingComparisonBtn .btn {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
}

/* ---------- WHATSAPP & FAQ FLOATING ---------- */
@media (max-width: 767px) {
    #whatsapp-float { bottom: 15px !important; right: 15px !important; }
    #whatsapp-popup { width: calc(100vw - 30px) !important; right: 0 !important; bottom: 65px !important; max-width: 300px; }
    #whatsapp-float button { width: 52px !important; height: 52px !important; }
    #whatsapp-float button i { font-size: 24px !important; }
    #faq-float { bottom: 78px !important; right: 15px !important; }
    #faq-float button { width: 42px !important; height: 42px !important; }
    #faq-popup { width: calc(100vw - 30px) !important; right: 0 !important; bottom: 125px !important; max-width: 300px; }
    .back-to-top { bottom: 140px !important; right: 15px !important; width: 40px !important; height: 40px !important; }
}

@media (max-width: 575px) {
    #whatsapp-popup { width: calc(100vw - 20px) !important; }
    #faq-popup { width: calc(100vw - 20px) !important; }
}

/* ---------- PAGE HEADER OVERLAPPING FIX ---------- */
@media (max-width: 767px) {
    .page-header .display-4,
    .page-header h1 {
        font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .page-header .lead,
    .page-header p {
        font-size: clamp(0.82rem, 2vw, 0.95rem) !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .page-header .d-flex.gap-3 {
        flex-wrap: wrap;
        gap: 0.75rem !important;
    }

    .page-header .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .page-header .bg-white.bg-opacity-20.rounded-circle {
        display: none;
    }

    .page-header .position-absolute {
        display: none;
    }
}

/* ---------- BRAND CARDS OVERLAPPING FIX ---------- */
@media (max-width: 767px) {
    .brand-card .card,
    .card.border-0.shadow-sm {
        border-radius: 10px !important;
    }

    .brand-card .card-header {
        padding: 1rem 0.75rem !important;
    }

    .brand-card .card-title,
    .card.border-0 .card-title {
        font-size: 0.88rem !important;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-card .card-body {
        padding: 0.75rem !important;
    }

    .brand-card .card-footer {
        padding: 0.75rem !important;
    }

    .brand-card .card-footer .btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.5rem;
    }

    .brand-card .stat-item {
        padding: 0.35rem;
    }

    .brand-card .stat-number {
        font-size: 0.85rem !important;
    }

    .brand-card .stat-label {
        font-size: 0.68rem !important;
    }

    .brand-card .card-text {
        font-size: 0.75rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ---------- STATS CARDS OVERLAPPING FIX ---------- */
@media (max-width: 767px) {
    .stats-card .card-body {
        padding: 1rem !important;
    }

    .stats-card .card-value {
        font-size: 1.4rem !important;
    }

    .stats-card .card-title {
        font-size: 0.75rem !important;
    }

    .stats-card .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stats-card .card-icon i {
        font-size: 1rem;
    }
}

/* ---------- NAVIGATION FIX ---------- */
@media (max-width: 991px) {
    .spx-nav-bar .navbar-toggler {
        display: none !important;
    }

    .spx-nav-bar .navbar-collapse {
        padding: 0.5rem;
    }

    .spx-nav-bar .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.88rem !important;
    }
}

/* ---------- GENERAL OVERLAPPING FIX ---------- */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .row {
        margin-left: -0.375rem;
        margin-right: -0.375rem;
    }

    .row > [class*="col-"] {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    h1, .display-4 {
        font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
    }

    h2 {
        font-size: clamp(1.1rem, 3vw, 1.5rem) !important;
    }

    h3 {
        font-size: clamp(1rem, 2.5vw, 1.25rem) !important;
    }

    h4, h5, h6 {
        font-size: clamp(0.9rem, 2vw, 1.1rem) !important;
    }

    .lead {
        font-size: clamp(0.82rem, 2vw, 0.95rem) !important;
    }

    .form-control, .form-select {
        font-size: 16px !important;
    }

    .form-label {
        font-size: 0.82rem !important;
    }
}

/* ---------- CATEGORY CARDS FIX ---------- */
@media (max-width: 767px) {
    .category-card-enhanced {
        padding: 1.25rem 1rem !important;
    }

    .category-card-enhanced .fa-3x {
        font-size: 2rem !important;
    }

    .category-card-enhanced h5 {
        font-size: 0.9rem !important;
    }

    .category-card-enhanced p {
        font-size: 0.75rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ---------- SEARCH & FILTER FIX ---------- */
@media (max-width: 767px) {
    #brandSearchInput, #brandSortSelect {
        font-size: 0.88rem;
        padding: 0.55rem 0.75rem;
    }

    .form-control-lg {
        font-size: 0.88rem;
        padding: 0.55rem 0.75rem;
    }
}

/* ---------- CHECKOUT & FORMS FIX ---------- */
@media (max-width: 767px) {
    .spx-input-group {
        margin-bottom: 0.75rem;
    }

    .spx-input-group label {
        font-size: 0.82rem !important;
    }

    .spx-input-group input,
    .spx-input-group textarea,
    .spx-input-group select {
        font-size: 16px !important;
        padding: 0.6rem 0.75rem;
    }
}

/* ---------- TABLES FIX ---------- */
@media (max-width: 767px) {
    .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.78rem !important;
    }

    .table th, .table td {
        padding: 0.5rem !important;
        white-space: nowrap;
    }
}

/* ---------- EMPTY STATE FIX ---------- */
@media (max-width: 767px) {
    .empty-state .display-1 {
        font-size: 2.5rem !important;
    }

    .empty-state h4 {
        font-size: 1.1rem !important;
    }

    .empty-state p {
        font-size: 0.82rem !important;
    }
}
