/* ============================================
   ECOMMERCE - PRODUCT CARDS & UI ENHANCEMENTS
   Simple, clean styles for product functionality
   ============================================ */

/* ============================================
   MOBILE HEADER - Hide on desktop
   ============================================ */
.mobile-header {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        background: #fff;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        height: 52px;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

.mob-logo img {
    width: 80px !important;
    height: 28px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.mobile-search-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.mob-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    height: 34px;
}

.mob-search-input-wrap:focus-within {
    border-color: #1677FF;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.mob-search-icon {
    color: #999;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.mob-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 0.85rem;
    padding: 0 !important;
    outline: none !important;
    min-width: 0;
}

.mob-search-input::placeholder {
    color: #999;
    font-size: 0.8rem;
}

.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-action-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #555;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}

.mobile-action-btn:hover {
    background: #f0f0f0;
    color: #1677FF;
}

.mobile-action-btn i {
    font-size: 1rem;
}

.header-wishlist-badge,
.mobile-action-btn .header-wishlist-badge {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    min-width: 14px !important;
    height: 14px !important;
    background: #FF4D4F !important;
    color: #fff !important;
    font-size: 0.55rem !important;
    font-weight: 600 !important;
    border-radius: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide mobile header on desktop */
@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
    .mobile-categories-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ============================================
   HEADER - DESKTOP - ALWAYS VISIBLE STYLES
   Base styles (overridden by media queries)
   ============================================ */
.main-header {
    background: #fff !important;
    height: 60px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1050 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

.header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    height: 100% !important;
    padding: 0 24px !important;
    max-width: 1800px !important;
    margin: 0 auto !important;
}

.logo-img {
    width: 130px !important;
    height: 44px !important;
    object-fit: contain !important;
}

.search-box {
    display: flex !important;
    align-items: center !important;
    background: #fff !important;
    border: 2px solid #1677FF !important;
    border-radius: 30px !important;
    overflow: visible !important;
    flex: 1 !important;
    max-width: 700px !important;
    height: 42px;
}

.search-category-dropdown {
    display: flex !important;
    align-items: center;
    background: #f5f7fa !important;
    border-right: 1px solid #e5e5e5 !important;
    padding: 0 10px;
}

.search-category-select {
    background: transparent !important;
    border: none !important;
    padding: 6px 6px !important;
    font-size: 0.8rem !important;
    color: #333 !important;
    cursor: pointer;
    min-width: 70px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 12px;
}

.search-input-wrap .search-icon {
    color: #999;
    font-size: 0.9rem;
    margin-right: 6px;
}

.search-input {
    border: none !important;
    background: transparent !important;
    flex: 1;
    font-size: 0.85rem !important;
    padding: 0 !important;
    outline: none;
}

.search-btn {
    background: #1677FF !important;
    color: #fff !important;
    border: none !important;
    padding: 0 16px !important;
    font-size: 0.85rem;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background: #0d42c7 !important;
}

.header-icon-btns {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.header-icon-btn {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f5f7fa !important;
    border: none !important;
    border-radius: 10px !important;
    color: #444 !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.2s;
    position: relative;
}

.header-icon-btn:hover {
    background: #e8ecf0 !important;
    color: #1677FF !important;
}

.header-icon-btn .badge {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    min-width: 18px !important;
    height: 18px !important;
    background: #FF4D4F !important;
    color: #fff !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ============================================
   SECTION CONTAINER - DEFAULT
   ============================================ */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e8e8;
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F1111;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F1111;
    margin: 0;
}

.header-title .subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 2px 0 0 0;
}

/* ============================================
   CATEGORIES SECTION - SIDEBAR STYLE
   ============================================ */
.categories-section {
    padding: 24px 0;
    background: #f8f9fa;
}

.categories-section .section-container {
    max-width: 1600px;
}

.alibaba-category-layout {
    display: flex;
    gap: 20px;
}

.category-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e8e8e8;
}

.sidebar-header i {
    font-size: 1.1rem;
    color: #1677FF;
}

.sidebar-header span {
    font-size: 1rem;
    font-weight: 700;
    color: #0F1111;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.category-menu-item:last-child {
    border-bottom: none;
}

.category-menu-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.category-menu-item a:hover,
.category-menu-item.active a {
    background: #e8f4ff;
    color: #1677FF;
}

.category-menu-item i:first-child {
    color: #888;
    font-size: 1rem;
}

.category-menu-item.active i:first-child {
    color: #1677FF;
}

.category-menu-item .count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.category-content {
    flex: 1;
    min-width: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .categories-section {
        padding: 16px 0;
    }
    
    .alibaba-category-layout {
        flex-direction: column;
    }
    
    .category-sidebar {
        width: 100%;
        display: none;
    }
    
    .category-sidebar.active {
        display: block;
    }
    
    .category-content {
        width: 100%;
    }
}

/* ============================================
   DESKTOP STICKY SIDEBAR (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .categories-section {
        position: relative;
    }
    
    .alibaba-category-layout {
        display: flex;
        gap: 24px;
        align-items: stretch;
        min-height: calc(100vh - 200px);
    }
    
    .category-sidebar {
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 96px;
        height: calc(100vh - 130px);
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
        z-index: 100;
    }
    
    .category-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    
    .category-sidebar::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 3px;
    }
    
    .category-sidebar::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    .category-sidebar::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }
    
    .category-content {
        flex: 1;
        min-width: 0;
        padding-bottom: 40px;
    }
    
    .sidebar-header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
        border-bottom: 1px solid #e8e8e8;
        padding: 20px 24px;
        border-radius: 16px 16px 0 0;
    }
    
    .sidebar-header span {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .sidebar-header i {
        font-size: 1.1rem;
    }
    
    .sidebar-filter {
        padding: 16px 20px;
    }
    
    .category-menu {
        padding: 8px 12px;
    }
    
    .category-menu-item a {
        padding: 14px 18px;
        border-radius: 10px;
        margin: 2px 0;
    }
    
    .category-menu-item a:hover {
        background: linear-gradient(135deg, rgba(22,119,255,0.08) 0%, rgba(22,119,255,0.03) 100%);
    }
    
    .sidebar-filter .filter-section {
        padding: 16px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sidebar-filter .filter-section:last-child {
        border-bottom: none;
    }
    
    .sidebar-filter label {
        font-weight: 600;
        font-size: 0.85rem;
        color: #374151;
        display: block;
        margin-bottom: 10px;
    }
    
    .sidebar-filter .price-inputs {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .sidebar-filter .price-inputs input {
        flex: 1;
        padding: 10px 14px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        font-size: 0.9rem;
    }
    
    .sidebar-filter .price-inputs input:focus {
        border-color: #1677FF;
        box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
    }
    
    .sidebar-filter .price-inputs span {
        color: #9ca3af;
    }
    
    .sidebar-filter .btn-apply-filter {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, #1677FF 0%, #0d42c7 100%);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .sidebar-filter .btn-apply-filter:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(22,119,255,0.3);
    }
    
    .sidebar-filter select {
        width: 100%;
        padding: 12px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        font-size: 0.9rem;
        background: #fff;
        cursor: pointer;
    }
    
    .sidebar-filter select:focus {
        border-color: #1677FF;
        box-shadow: 0 0 0 3px rgba(22,119,255,0.1);
        outline: none;
    }
}

/* Large Desktop (1600px+) */
@media (min-width: 1600px) {
    .categories-section .section-container,
    .section-container {
        max-width: 1800px;
    }
}

/* ============================================
   DESKTOP HORIZONTAL SCROLL ENHANCEMENTS (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    /* New Arrivals - Enhanced scroll buttons */
    .new-arrivals-wrapper {
        padding: 0 40px;
    }
    
    .new-arrivals-wrapper .scroll-btn {
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .new-arrivals-wrapper:hover .scroll-btn {
        opacity: 1;
        visibility: visible;
    }
    
    .new-arrivals-wrapper .scroll-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(22, 119, 255, 0.3);
    }
    
    .new-arrivals-wrapper .scroll-btn.left {
        left: 0;
    }
    
    .new-arrivals-wrapper .scroll-btn.right {
        right: 0;
    }
    
    /* New Arrivals track - show subtle scrollbar on hover */
    .new-arrivals-track {
        scrollbar-width: thin;
        scrollbar-color: #c1c1c1 transparent;
    }
    
    .new-arrivals-track::-webkit-scrollbar {
        display: none;
        height: 6px;
    }
    
    .new-arrivals-wrapper:hover .new-arrivals-track::-webkit-scrollbar {
        display: block;
    }
    
    .new-arrivals-track::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .new-arrivals-track::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    
    /* Flash Sale - Enhanced scroll buttons */
    .flash-products-wrapper {
        padding: 0 40px;
    }
    
    .flash-products-wrapper .flash-scroll-btn {
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .flash-products-wrapper:hover .flash-scroll-btn {
        opacity: 1;
        visibility: visible;
    }
    
    .flash-products-wrapper .flash-scroll-btn:hover {
        transform: scale(1.1);
    }
    
    .flash-products {
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.3) transparent;
    }
    
    .flash-products::-webkit-scrollbar {
        display: none;
        height: 6px;
    }
    
    .flash-products-wrapper:hover .flash-products::-webkit-scrollbar {
        display: block;
    }
    
    .flash-products::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.4);
        border-radius: 3px;
    }
    
    /* Recently Viewed - Enhanced scroll buttons */
    .recently-viewed-wrapper {
        padding: 0 40px;
    }
    
    .recently-viewed-wrapper .scroll-btn {
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        width: 36px;
        height: 36px;
    }
    
    .recently-viewed-wrapper:hover .scroll-btn {
        opacity: 1;
        visibility: visible;
    }
    
    .recently-viewed-track {
        scrollbar-width: thin;
        scrollbar-color: #c1c1c1 transparent;
    }
    
    .recently-viewed-track::-webkit-scrollbar {
        display: none;
        height: 4px;
    }
    
    .recently-viewed-wrapper:hover .recently-viewed-track::-webkit-scrollbar {
        display: block;
    }
    
    .recently-viewed-track::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
}

/* ============================================
   DESKTOP PRODUCT GRID IMPROVEMENTS
   ============================================ */
@media (min-width: 1024px) and (max-width: 1399px) {
    .products-grid,
    .products-section {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .product-card {
        max-width: 100%;
    }
}

@media (min-width: 1400px) {
    .products-grid,
    .products-section {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .new-arrival-card {
        width: 240px;
    }
    
    .flash-product-item {
        width: 240px;
    }
}

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid,
.products-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 0;
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============================================
   PRODUCT IMAGE
   ============================================ */
.product-card .product-img,
.product-img {
    position: relative;
    background: #fafafa;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.product-card .product-img img,
.product-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-card:hover .product-img img {
    transform: scale(1.03);
}

/* ============================================
   PRODUCT BADGES
   ============================================ */
.product-card .tag-hot,
.tag-hot {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #FF4D4F;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 2;
}

.product-card .discount-badge,
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #52c41a;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 2;
}

/* ============================================
   WISHLIST BUTTON
   ============================================ */
.product-card .wishlist-btn,
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card:hover .wishlist-btn {
    opacity: 1;
}

.product-card .wishlist-btn i,
.wishlist-btn i {
    color: #666;
    font-size: 0.9rem;
}

.product-card .wishlist-btn:hover i,
.wishlist-btn.active i {
    color: #FF4D4F;
}

/* ============================================
   QUICK VIEW BUTTON
   ============================================ */
.product-card .quick-view-btn,
.quick-view-btn {
    position: absolute;
    top: 44px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    color: #666;
    font-size: 0.8rem;
    padding: 0;
    overflow: hidden;
}

.product-card:hover .quick-view-btn,
.product-card:hover .quick-view-btn span {
    opacity: 1;
}

.quick-view-btn i {
    font-size: 0.85rem;
}

.quick-view-btn span {
    display: none;
}

.quick-view-btn:hover {
    background: #1677FF;
    color: #fff;
}

/* ============================================
   PRODUCT BODY
   ============================================ */
.product-card .product-body,
.product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ============================================
   PRODUCT TITLE
   ============================================ */
.product-card .product-title,
.product-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0F1111;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

.product-card .product-title a {
    text-decoration: none;
    color: inherit;
}

.product-card .product-title:hover {
    color: #C7511F;
}

/* ============================================
   PRODUCT PRICE
   ============================================ */
.product-card .product-price,
.product-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card .current-price,
.current-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F1111;
}

.product-card .old-price,
.old-price {
    font-size: 0.8rem;
    color: #767676;
    text-decoration: line-through;
}

/* ============================================
   PRODUCT ACTIONS - BUTTONS SIDE BY SIDE
   ============================================ */
.product-card .product-actions,
.product-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    width: 100%;
}

.product-card .action-btn,
.action-btn {
    flex: 1 1 auto !important;
    min-width: calc(50% - 4px) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn i {
    font-size: 0.85rem;
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #20BD5A;
}

/* Cart Button */
.btn-cart {
    background: #1677FF;
    color: #fff;
}

.btn-cart:hover {
    background: #0958D9;
}

.btn-cart.added {
    background: #52c41a;
}

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

/* ============================================
   NEW ARRIVALS SECTION - Like Flash Sale
   ============================================ */
.new-arrivals-section {
    padding: 24px 0;
    background: #fff;
}

.new-arrivals-section .section-container {
    max-width: 1600px;
}

.new-arrivals-section .view-all-link {
    color: #1677FF;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.new-arrivals-section .view-all-link:hover {
    color: #0d42c7;
}

.new-arrivals-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-arrivals-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
    flex: 1;
}

.new-arrivals-track::-webkit-scrollbar {
    display: none;
}

.new-arrival-card {
    flex-shrink: 0;
    width: 220px;
    position: relative;
}

.new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #1677FF;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 3;
}

.scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.scroll-btn:hover {
    background: #1677FF;
    color: #fff;
    border-color: #1677FF;
}
}

.new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #1677FF;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 3;
}

.scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 2;
}

.scroll-btn:hover {
    background: #1677FF;
    color: #fff;
    border-color: #1677FF;
}

/* ============================================
   FLASH SALE SECTION
   ============================================ */
.flash-sale-section {
    padding: 24px 0;
    background: linear-gradient(135deg, #0d42c7 0%, #1677FF 100%);
    margin: 24px 0;
}

.flash-sale-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.flash-sale-section .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-sale-section .header-title i {
    font-size: 1.5rem;
    color: #FFD700;
}

.flash-sale-section .header-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.flash-sale-section .view-all-link {
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.flash-sale-section .view-all-link:hover {
    background: rgba(255,255,255,0.3);
}

.flash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.flash-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-title i {
    font-size: 1.75rem;
    color: #FFD700;
}

.flash-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.flash-title p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.countdown-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timer-label {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 500;
}

.timer-blocks {
    display: flex;
    align-items: center;
    gap: 3px;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    min-width: 44px;
}

.timer-num {
    font-size: 1rem;
    font-weight: 800;
    color: #1677FF;
    line-height: 1;
}

.timer-lbl {
    font-size: 0.55rem;
    color: #666;
    font-weight: 600;
}

.timer-sep {
    font-size: 1rem;
    font-weight: 700;
    color: #FFD700;
}

.flash-products-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-products {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
    flex: 1;
}

.flash-products::-webkit-scrollbar {
    display: none;
}

.flash-product-item {
    flex-shrink: 0;
    width: 220px;
}

.flash-products .product-card {
    background: #fff;
}

.flash-scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 2;
}

.flash-scroll-btn:hover {
    background: #1677FF;
    color: #fff;
    border-color: #1677FF;
}

/* ============================================
   STOCK PROGRESS
   ============================================ */
.stock-progress {
    margin-bottom: 8px;
}

.progress-bar {
    height: 5px;
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #FF4D4F;
    border-radius: 3px;
}

.progress-text {
    font-size: 0.7rem;
    color: #FFD700;
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

/* ============================================
   RECENTLY VIEWED SECTION
   ============================================ */
.recently-viewed-section {
    padding: 32px 0;
}

.recently-viewed-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.recently-viewed-section .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recently-viewed-section .header-title i {
    font-size: 1.5rem;
    color: #1677FF;
}

.recently-viewed-section .header-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F1111;
    margin: 0;
}

.btn-clear-history {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-clear-history:hover {
    background: #f5f5f5;
    color: #FF4D4F;
    border-color: #FF4D4F;
}

.recently-viewed-wrapper {
    position: relative;
}

.recently-viewed-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
}

.recently-viewed-track::-webkit-scrollbar {
    display: none;
}

.recently-viewed-item {
    flex-shrink: 0;
    width: 160px;
}

.recently-viewed-item a {
    display: block;
    text-decoration: none;
}

.recently-viewed-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.recently-viewed-info {
    padding: 8px 0;
}

.recently-viewed-info h4 {
    font-size: 0.8rem;
    font-weight: 500;
    color: #0F1111;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recently-viewed-info .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0F1111;
}

/* ============================================
   EMPTY STATES & LOADERS
   ============================================ */
.section-loader {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #1677FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.section-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.section-empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 16px;
}

.section-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.section-empty-state p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .products-grid,
    .products-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .product-card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid #e8e8e8;
        border-right: 1px solid #e8e8e8;
    }
    
    .product-card .product-img {
        padding: 8px;
    }
    
    .product-card .product-body {
        padding: 8px;
    }
    
    .product-card .product-title {
        font-size: 0.8rem;
    }
    
    .product-card .current-price {
        font-size: 0.9rem;
    }
    
    .product-card .product-actions {
        gap: 4px;
    }
    
    .product-card .action-btn {
        padding: 8px 4px;
        font-size: 0.7rem;
    }
    
    .product-card .wishlist-btn,
    .product-card .quick-view-btn {
        opacity: 1;
        width: 26px;
        height: 26px;
        display: flex !important;
    }
    
    .product-card .wishlist-btn {
        top: 6px;
        right: 6px;
    }
    
    .product-card .quick-view-btn {
        top: 38px;
        right: 6px;
    }
    
    .product-card .quick-view-btn span {
        display: none;
    }
    
    .product-card .quick-view-btn i {
        font-size: 0.75rem;
    }
    
    .new-arrivals-section,
    .flash-sale-section,
    .recently-viewed-section {
        padding: 20px 0;
    }
    
    .new-arrival-card,
    .flash-product-item {
        width: 180px;
    }
    
    .recently-viewed-item {
        width: 130px;
    }
    
    .recently-viewed-item img {
        height: 130px;
    }
}

@media (max-width: 480px) {
    .new-arrival-card,
    .flash-product-item {
        width: 150px;
    }
    
    .recently-viewed-item {
        width: 110px;
    }
    
    .recently-viewed-item img {
        height: 110px;
    }
}

/* ============================================
   NOTIFICATION PANEL - SIDEBAR STYLE
   ============================================ */
.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1100;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.notification-panel.active {
    right: 0;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1099;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay.active {
    display: block;
    opacity: 1;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

.notification-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-header-left h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0F1111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-header-left h5 i {
    color: #1677FF;
}

.notification-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mark-all-read-btn {
    background: none;
    border: none;
    color: #1677FF;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.mark-all-read-btn:hover {
    text-decoration: underline;
}

.notification-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}

.notification-close-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.notification-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #e8e8e8;
    overflow-x: auto;
}

.notification-tab {
    padding: 8px 16px;
    border: none;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.notification-tab.active {
    background: #1677FF;
    color: #fff;
}

.notification-tab:hover:not(.active) {
    background: #e8e8e8;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.notification-footer {
    padding: 16px 20px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.notification-footer a {
    color: #1677FF;
    font-weight: 600;
    text-decoration: none;
}

.notification-footer a:hover {
    text-decoration: underline;
}

.notification-back-btn {
    display: none;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e6f0fa;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.notification-icon.order,
.notification-icon.order_status {
    background: #e6f4ff;
    color: #1677FF;
}

.notification-icon.new_product,
.notification-icon.products {
    background: #f6ffed;
    color: #52C41A;
}

.notification-icon.price_drop {
    background: #fff7e6;
    color: #FAAD14;
}

.notification-icon.event,
.notification-icon.events {
    background: #fff1f0;
    color: #FF4D4F;
}

.notification-icon.promotion {
    background: #f9f0ff;
    color: #722ED1;
}

.notification-icon.announcement {
    background: #f5f5f5;
    color: #666;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-message {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 6px;
}

.notification-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.notification-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-unread-dot {
    position: absolute;
    top: 18px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: #1677FF;
    border-radius: 50%;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

@media (max-width: 991px) {
    .notification-back-btn {
        display: flex;
    }
    
    .notification-panel {
        width: 100%;
        right: -100%;
        z-index: 1105;
    }
    
    .notification-overlay {
        z-index: 1104;
    }
    
    .notification-panel.active {
        bottom: 60px;
        height: calc(100vh - 60px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ============================================
   HEADER STYLES - DESKTOP & MOBILE
   ============================================ */

/* Desktop */
@media (min-width: 993px) {
    .main-header {
        height: 60px !important;
        top: 36px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
    
    .header-inner {
        gap: 20px !important;
        padding: 0 24px !important;
    }
}

/* Tablet (768px - 992px) - top-announcement hidden, main-header at top */
@media (min-width: 769px) and (max-width: 992px) {
    .main-header {
        height: 60px !important;
        top: 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
}
    
    .logo-img {
        width: 130px !important;
        height: 44px !important;
    }
    
    .search-box {
        border: 2px solid #1677FF !important;
        border-radius: 24px !important;
        background: #fff !important;
        height: 42px;
    }
    
    .search-category-dropdown {
        display: block !important;
    }
    
    .search-input-wrap {
        flex: 1;
    }
    
    .search-btn {
        display: block !important;
    }
    
    .header-icon-btns {
        gap: 8px !important;
    }
    
    .header-icon-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
        background: #f5f7fa !important;
        border: none !important;
        color: #444 !important;
    }
    
    .header-icon-btn:hover {
        background: #e8ecf0 !important;
        color: #1677FF !important;
    }
    
    .header-icon-btn i {
        font-size: 1.1rem !important;
    }
    
    .header-icon-btn .badge {
        position: absolute !important;
        top: 2px !important;
        right: 2px !important;
        min-width: 16px !important;
        height: 16px !important;
        font-size: 0.6rem !important;
        background: #FF4D4F !important;
        color: #fff !important;
        border-radius: 8px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-header {
        height: 56px !important;
        top: 0 !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    }
    
    .header-inner {
        padding: 0 12px !important;
        gap: 8px !important;
    }
    
    .logo-wrap {
        flex-shrink: 0 !important;
    }
    
    .logo-img {
        width: 90px !important;
        height: 32px !important;
    }
    
    .search-container {
        flex: 1 !important;
        min-width: 0 !important;
        margin: 0 6px !important;
    }
    
    .search-box {
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        height: 36px;
    }
    
    .search-box:focus-within {
        border-color: #1677FF !important;
        box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
    }
    
    .search-category-dropdown {
        display: none !important;
    }
    
    .search-input-wrap {
        padding: 0 10px;
    }
    
    .search-input-wrap .search-icon {
        font-size: 0.85rem;
        color: #999;
    }
    
    .search-input {
        border: none !important;
        background: transparent !important;
        font-size: 0.8rem !important;
        padding: 0 !important;
    }
    
    .search-btn {
        display: none !important;
    }
    
    .header-icon-btns {
        gap: 2px !important;
    }
    
    .header-icon-btn {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .header-icon-btn i {
        font-size: 1rem !important;
        color: #555 !important;
    }
    
    .header-icon-btn:hover {
        background: #f0f0f0 !important;
    }
    
    .header-icon-btn:hover i {
        color: #1677FF !important;
    }
    
    .header-icon-btn .badge {
        position: absolute !important;
        top: 1px !important;
        right: 1px !important;
        min-width: 14px !important;
        height: 14px !important;
        font-size: 0.55rem !important;
        background: #FF4D4F !important;
        color: #fff !important;
        border-radius: 7px !important;
        padding: 0 3px !important;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .main-header {
        height: 50px !important;
    }
    
    .header-inner {
        padding: 0 8px !important;
        gap: 4px !important;
    }
    
    .logo-img {
        width: 70px !important;
        height: 26px !important;
    }
    
    .search-box {
        height: 32px;
        border-radius: 6px;
    }
    
    .header-icon-btn {
        width: 30px !important;
        height: 30px !important;
    }
    
    .header-icon-btn i {
        font-size: 0.9rem !important;
    }
    
    .header-icon-btn .badge {
        min-width: 12px !important;
        height: 12px !important;
        font-size: 0.5rem !important;
    }
}

/* ============================================
   RESPONSIVE FOR SECTIONS
   ============================================ */
@media (max-width: 768px) {
    .section-container {
        padding: 0 12px;
    }
    
    .categories-section {
        padding: 16px 0;
    }
    
    .new-arrivals-section {
        padding: 16px 0;
    }
    
    .new-arrival-card {
        width: 180px;
    }
    
    .scroll-btn {
        display: none;
    }
    
    .new-arrivals-track {
        gap: 12px;
    }
}