/* ===================================
   RESPONSIVE STYLES - HORIZONTAL SCROLLABLE MENU
   =================================== */

   .mobile-search-row, .mobile-menu-toggle, .mobile-offcanvas-menu {
        display: none;
    }
   
/* Tablet Styles (768px and below) */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 0 20px;
    }

    /* =================== */
    /* HORIZONTAL SCROLLABLE MENU ON MOBILE */
    /* =================== */
    /* Show main navigation and make it scrollable */
    .main-nav {
        display: block !important;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        position: relative;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    /*disable shein/fashionova mega menu style on mobile*/
    .shein-mega-menu {
        display: none !important;
    }
    .shein-mega-trigger:hover > .shein-mega-menu {
        display: none !important;
    }
    /* Custom scrollbar styling */
    .main-nav::-webkit-scrollbar {
        height: 3px;
    }
    
    .main-nav::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .main-nav::-webkit-scrollbar-thumb {
        background: var(--sheaker-orange);
        border-radius: 3px;
    }
    
    .nav-scroll-container {
        overflow-x: auto;
        overflow-y: visible;
        margin: 0;
        padding: 0;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Hide scroll buttons on mobile */
    .nav-scroll-btn {
        display: none !important;
    }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        padding: 0 15px;
        margin: 0;
        gap: 0;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .nav-menu::-webkit-scrollbar {
        height: 3px;
    }
    
    .nav-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: var(--sheaker-orange);
        border-radius: 3px;
    }
    
    .nav-item {
        flex-shrink: 0;
        display: inline-block;
        margin: 0;
        position: relative;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        display: inline-block;
        border-bottom: 2px solid transparent;
    }
    
    .nav-link:hover,
    .nav-item.active .nav-link {
        color: var(--sheaker-orange);
        border-bottom-color: var(--sheaker-orange);
    }    
    /* Hide top bar on mobile */
    .top-bar { 
        display: none !important; 
    }

    /* Mobile header top row */
    .main-header {
        padding: 10px 0 !important;
        border-bottom: 1px solid #eee;
        background: #fff;
    }

    .header{
        padding-bottom: 8px;
    }

    .header-content {
        display: block;
    }

    .mobile-header-top {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .logo {
        display: flex;
        align-items: center;
    }

    .logo img {
        width: 110px !important;
        height: auto !important;
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .header-action {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        padding: 6px;
        background: transparent;
        border: 0;
        color: inherit;
        text-decoration: none;
        cursor: pointer;
    }

    .mobile-menu-toggle {
        appearance: none;
        -webkit-appearance: none;
    }

    /* =================================== */
    /* MOBILE OFF-CANVAS MENU */
    /* =================================== */
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        z-index: 9998;
    }

    .mobile-offcanvas-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100vh;
        background: #fff;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12);
        transform: translateX(-100%);
        transition: transform 0.35s ease;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-offcanvas-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        border-bottom: 1px solid #eee;
        background: #fff;
    }

    .mobile-offcanvas-title {
        font-size: 16px;
        font-weight: 700;
        color: #111;
    }

    .mobile-menu-close {
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        border: 0;
        font-size: 20px;
        color: #111;
        cursor: pointer;
        padding: 4px;
        line-height: 1;
    }

    .mobile-offcanvas-body {
        flex: 1;
        overflow-y: auto;
        padding: 10px 0 20px;
        position: relative;
    }

    .mobile-offcanvas-links,
    .mobile-offcanvas-submenu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-offcanvas-links > li > a,
    .mobile-offcanvas-submenu li a {
        display: block;
        text-decoration: none;
        color: #111;
        border-bottom: 1px solid #f2f2f2;
    }

    .mobile-offcanvas-links > li > a {
        padding: 14px 18px;
        font-size: 14px;
        font-weight: 600;
    }

    .mobile-offcanvas-submenu li a {
        padding: 10px 18px 10px 32px;
        font-size: 13px;
        font-weight: 400;
        color: #555;
        background: #fafafa;
    }

    .mobile-offcanvas-links a:hover,
    .mobile-offcanvas-submenu a:hover {
        color: var(--sheaker-orange);
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.mobile-menu-open .mobile-offcanvas-menu {
        transform: translateX(0);
    }

    .mobile-offcanvas-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100vh;
        background: #fff;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12);
        transform: translateX(-100%);
        transition: transform 0.35s ease;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-offcanvas-body {
        flex: 1;
        overflow-y: auto;
        padding: 10px 0 20px;
        position: relative;
        z-index: 1;
    }

    .mobile-offcanvas-category-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        background: #fff;
        border: 0;
        border-bottom: 1px solid #f2f2f2;
        color: #111;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
    }

    .mobile-offcanvas-category-trigger i {
        font-size: 12px;
        color: #777;
    }

    .mobile-submenu-panel {
        position: absolute;
        inset: 0;
        background: #fff;
        z-index: 3;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        display: flex;
        flex-direction: column;
        pointer-events: none;
    }

    .mobile-submenu-panel.active {
        transform: translateX(0);
        pointer-events: auto;
    }

    .mobile-submenu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 16px 18px;
        border-bottom: 1px solid #eee;
        background: #fff;
        flex-shrink: 0;
    }

    .mobile-submenu-back {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        border: 0;
        padding: 0;
        color: #111;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-submenu-title {
        font-size: 15px;
        font-weight: 700;
        color: #111;
    }

    .mobile-submenu-body {
        flex: 1;
        overflow-y: auto;
        padding: 14px 14px 24px;
    }

    .mobile-submenu-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 12px;
    }

    .mobile-submenu-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #111;
    }

    .mobile-submenu-image {
        width: 84px;
        height: 84px;
        border-radius: 50%;
        overflow: hidden;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
    }

    .mobile-submenu-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-submenu-image--placeholder {
        background: #f7f7f7;
    }

    .mobile-submenu-card-title {
        display: block;
        font-size: 12px;
        line-height: 1.25;
        text-align: center;
        color: #555;
        max-width: 100%;
        word-break: break-word;
    }

    .mobile-submenu-links {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-submenu-links li a {
        display: block;
        padding: 14px 18px;
        text-decoration: none;
        color: #111;
        border-bottom: 1px solid #f2f2f2;
        font-size: 14px;
    }

    .mobile-submenu-links li a:hover {
        color: var(--sheaker-orange);
    }

    /* Mobile search row below nav */
    .mobile-search-row {
        display: block;
        background: #fff;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }

    .mobile-search-row .search-container {
        display: block !important;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .mobile-search-row .search-form {
        width: 100%;
    }

    .search-form{
        margin: 5px 0
    }

    .mobile-search-row .search-input {
        width: 100%;
        padding: 10px 40px 10px 12px;
        font-size: 13px;
    }

    .mobile-search-row .search-btn {
        width: 32px;
        height: 32px;
    }

    .mobile-search-row .search-btn i {
        font-size: 12px;
    }

    .action-count {
        font-size: 10px;
        padding: 2px 5px;
        min-width: 16px;
    }

    /* Product grid adjustments */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Shop layout */
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-sidebar {
        position: static;
        order: 2;
    }

    /* Shop header */
    .shop-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .sort-controls { 
        justify-content: space-between; 
    }

        /* Footer adjustments */
    .footer-main {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
        align-items: start;
    }

    .footer-column {
        min-width: 0;
    }

    .footer-title {
        margin-bottom: 12px;
    }

    .footer-links li + li {
        margin-top: 8px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        align-items: center;
    }

    .footer-bottom-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 18px;
    }

    .payment-methods,
    .social-links {
        justify-content: center;
    }
    
    /* Mega menu adjustments for mobile */
    .shein-mega-menu {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        z-index: 10000 !important;
    }
    
    .shein-mega-menu .shein-sidebar {
        width: 100% !important;
        min-width: auto !important;
        max-height: 200px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        display: flex !important;
        flex-direction: row !important;
        padding: 8px 12px !important;
        gap: 8px !important;
        background: #fafafa !important;
    }
    
    .shein-sidebar-item {
        display: inline-flex !important;
        white-space: nowrap !important;
        padding: 8px 16px !important;
        background: #f5f5f5 !important;
        border-radius: 20px !important;
        font-size: 12px !important;
    }
    
    .shein-mega-main {
        padding: 16px !important;
        max-height: 300px !important;
        overflow-y: auto !important;
    }
    
    .shein-cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .shein-cat-circle {
        width: 70px !important;
        height: 70px !important;
    }
    
    .shein-cat-label {
        font-size: 11px !important;
    }
}

/* Mobile Styles (480px and below) */
@media (max-width: 480px) {
    .container { 
        padding: 0 15px; 
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .nav-menu {
        padding: 0 12px;
    }

    /* Header */
    .main-header { 
        padding: 8px 0 !important; 
    }

    .mobile-header-top {
        gap: 8px;
    }

    .logo img {
        width: 95px !important;
        height: auto !important;
    }

    .mobile-search-row {
        padding: 8px 0;
    }

    .mobile-search-row .search-container {
        margin: 0;
    }

    .mobile-search-row .search-input {
        padding: 8px 36px 8px 10px;
        font-size: 12px;
    }

    .mobile-search-row .search-btn {
        width: 28px;
        height: 28px;
    }

    .header{
        padding-bottom: 8px;
    }

    .header-actions { 
        gap: 6px;
    }

    .header-action { 
        font-size: 16px; 
        padding: 4px; 
    }

    .action-count {
        font-size: 9px;
        padding: 1px 4px;
        min-width: 14px;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card { 
        border-radius: 6px; 
    }
    
    .product-info { 
        padding: 10px; 
    }
    
    .product-name { 
        font-size: 13px; 
        min-height: 35px;
    }
    
    .current-price { 
        font-size: 14px; 
    }
    
    .add-to-cart-btn { 
        padding: 8px; 
        font-size: 12px; 
    }

    /* Filter Sidebar */
    .filter-sidebar { 
        padding: 15px; 
    }
    
    .filter-title { 
        font-size: 14px; 
    }
    
    .filter-label { 
        font-size: 13px; 
    }

        /* Footer */
    .footer-main {
        padding: 32px 0 18px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: left;
    }

    .footer-column {
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-column:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .footer-title {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .footer-description,
    .newsletter-text,
    .footer-links a {
        font-size: 14px;
        line-height: 1.6;
    }

    .social-links {
        justify-content: flex-start;
        gap: 10px;
    }

    .newsletter-input-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-input,
    .newsletter-btn {
        width: 100%;
        min-height: 42px;
        border-radius: 6px;
    }

    .newsletter-input {
        margin-bottom: 0;
    }

    .footer-bottom-content {
        gap: 14px;
        text-align: center;
    }

    .footer-bottom-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 14px;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .footer-bottom-links a {
        font-size: 13px;
    }

    .payment-methods {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header { 
        padding: 15px; 
    }
    
    .modal-body { 
        padding: 15px; 
    }

    /* Pagination */
    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Mega menu adjustments for small mobile */
    .shein-cat-circle {
        width: 55px !important;
        height: 55px !important;
    }
    
    .shein-cat-label {
        font-size: 10px !important;
    }

    /* === Make Customer Service + Quick Links side-by-side === */

    /* Turn footer into grid control */
    .footer-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* Make About Us take full width (row 1) */
    .footer-column:nth-child(1) {
        grid-column: 1 / -1;
    }

    /* Customer Service (left column) */
    .footer-column:nth-child(2) {
        grid-column: 1;
    }

    /* Quick Links (right column) */
    .footer-column:nth-child(3) {
        grid-column: 2;
    }

    /* Stay Connected full width below */
    .footer-column:nth-child(4) {
        grid-column: 1 / -1;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .product-grid { 
        grid-template-columns: 1fr; 
    }
    
    .nav-link {
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .header-actions { 
        gap: 6px; 
    }
    
    .action-count {
        font-size: 8px;
        padding: 1px 3px;
        min-width: 12px;
    }

    .product-info { 
        padding: 8px; 
    }
    
    .add-to-cart-btn {
        font-size: 11px;
        padding: 6px;
    }
    
    .shein-cat-circle {
        width: 50px !important;
        height: 50px !important;
    }

        .footer-content {
        gap: 18px;
    }

    .footer-bottom-links {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

/* Hover Effects for Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .product-card:hover .product-image { 
        transform: none; 
    }

    .product-actions {
        opacity: 1;
        position: relative;
        top: auto;
        right: auto;
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
    }

    .nav-link:hover { 
        color: inherit; 
    }
    
    .nav-item:active .nav-link { 
        color: var(--sheaker-orange); 
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .product-card:hover { 
        transform: none; 
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .filter-sidebar,
    .product-actions,
    .modal {
        display: none !important;
    }

    .main-content { 
        margin: 0; 
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}