/* Mobile Base - Prevent Overflow */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .site-content,
    .site-main,
    #page,
    .entry-content,
    .generate-sections-inside-container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}

/* Mobile - Horizontal Scroll for Catalog Nav */
@media (max-width: 768px) {
    .home-catalog-nav-outer {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .home-catalog-nav {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding: 0 10px !important;
        max-width: 100vw !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }
    
    .home-catalog-nav::-webkit-scrollbar {
        display: none;
    }
    
    .home-catalog-nav img {
        max-width: none !important;
    }
    
    .catalog-nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 70px !important;
        max-width: 85px !important;
        padding: 0 4px !important;
        box-sizing: border-box !important;
    }
    
    .catalog-nav-img {
        width: 70px !important;
        height: 90px !important;
        min-width: 70px !important;
    }
    
    .catalog-nav-item h3 {
        font-size: 9px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}


/* AliPearl Homepage */
.alipearl-hero { position: relative; width: 100%; overflow: hidden; background: #000; }
.alipearl-slider { position: relative; width: 100%; padding-top: 40%; }
.alipearl-slides { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.alipearl-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s ease; }
.alipearl-slide.active { opacity: 1; }
.alipearl-slide-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; z-index: 2; padding: 20px; width: 100%; max-width: 800px; }
.alipearl-slide-content h1 { font-size: 48px; font-weight: 700; margin: 0 0 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.alipearl-slide-content p { font-size: 20px; margin: 0 0 30px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.alipearl-hero-btn { display: inline-block; padding: 16px 40px; background: #fff; color: #111; text-decoration: none; font-weight: 600; font-size: 16px; border-radius: 4px; }
.alipearl-hero-btn:hover { background: #111; color: #fff; }
.alipearl-slider-prev, .alipearl-slider-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: #fff; border: none; width: 50px; height: 50px; font-size: 30px; cursor: pointer; z-index: 10; border-radius: 4px; }
.alipearl-slider-prev { left: 20px; }
.alipearl-slider-next { right: 20px; }
.alipearl-slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.alipearl-slider-dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.alipearl-slider-dots span.active { background: #fff; }

/* Catalog Nav - 10 items in 1 row */
.home-catalog-nav-outer { background: #f8f8f8; padding: 30px 0; }
.home-catalog-nav { display: flex; flex-direction: row; justify-content: center; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.catalog-nav-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-decoration: none; padding: 0 10px; }
.catalog-nav-img { width: 150px; height: 220px; border-radius: 8px; overflow: hidden; margin-bottom: 10px; background: #fff; display: block; }
.catalog-nav-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-nav-item h3 { font-size: 12px; font-weight: 500; color: #333; text-align: center; margin: 0; line-height: 1.2; }

@media (max-width: 1024px) {
    .home-catalog-nav { flex-wrap: wrap; gap: 20px; }
    .catalog-nav-item { width: calc(10% - 20px); }
}
.home-catalog-nav {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding: 0 15px !important;
}

@media (max-width: 768px) {
    .alipearl-slider { padding-top: 50%; }
    .alipearl-slide-content h1 { font-size: 32px; }
    .home-catalog-nav-outer { padding: 20px 0; }
    .catalog-nav-img { width: 100px; height: 130px; }
}
@media (max-width: 480px) {
    .alipearl-slider { padding-top: 60%; }
    .alipearl-slide-content h1 { font-size: 24px; }
    .catalog-nav-img { width: 80px; height: 100px; }
}

/* ============================================
   PRODUCT LIST - 4 Columns Grid
   ============================================ */
.product-list-container-2024 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 20px;
}

.product-list-container-2024 .section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 30px;
    color: #111;
}

.product-list-grid-2024 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card-2024 {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card-2024:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-card-img-2024 {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #f8f8f8;
}

.product-card-img-2024 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-tag-2024 {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
}

.product-tag-2024.new { background: #111; }
.product-tag-2024.sale { background: #ff6b6b; }
.product-tag-2024.hot { background: #e74c3c; }

.product-card-info-2024 {
    padding: 15px;
}

.product-name-2024 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-2024 {
    margin-bottom: 8px;
}

.product-price-2024 .current-price {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.product-price-2024 .original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-rating-2024 {
    font-size: 12px;
    color: #f39c12;
}

.product-rating-2024 .reviews {
    color: #999;
    margin-left: 5px;
}

.view-all-btn {
    display: block;
    width: 200px;
    margin: 30px auto 0;
    padding: 12px 30px;
    background: #111;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.view-all-btn:hover {
    background: #333;
}

@media (max-width: 1024px) {
    .product-list-grid-2024 { grid-template-columns: repeat(3, 1fr); }
}
.home-catalog-nav {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding: 0 15px !important;
}

@media (max-width: 768px) {
    .product-list-grid-2024 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-list-container-2024 { padding: 30px 15px; }
}
/* Mobile - Horizontal Scroll for Catalog Nav */
@media (max-width: 768px) {
    .home-catalog-nav {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding: 0 15px !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .home-catalog-nav::-webkit-scrollbar {
        display: none;
    }
    
    .catalog-nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 90px !important;
        padding: 0 8px !important;
    }
    
    .catalog-nav-img {
        width: 80px !important;
        height: 100px !important;
    }
}
/* Mobile - Horizontal Scroll for Catalog Nav */
@media (max-width: 768px) {
    .home-catalog-nav-outer {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    .home-catalog-nav {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding: 0 10px !important;
        max-width: 100vw !important;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }
    
    .home-catalog-nav::-webkit-scrollbar {
        display: none;
    }
    
    .home-catalog-nav img {
        max-width: none !important;
    }
    
    .catalog-nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 70px !important;
        max-width: 85px !important;
        padding: 0 4px !important;
        box-sizing: border-box !important;
    }
    
    .catalog-nav-img {
        width: 70px !important;
        height: 90px !important;
        min-width: 70px !important;
    }
    
    .catalog-nav-item h3 {
        font-size: 9px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Force Mobile Bounds - Highest Priority */
@media screen and (max-width: 768px) {
    html {
        overflow-x: hidden !important;
    }
    
    body {
        overflow-x: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    #page {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .generate-sections-inside-container {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .site-content {
        overflow-x: hidden !important;
    }
    
    .alipearl-slider {
        max-width: 100vw !important;
        background-size: cover !important;
    }
    
    .alipearl-slide {
        max-width: 100vw !important;
    }
    
    .home-catalog-nav-outer {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .home-catalog-nav {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .home-catalog-nav::-webkit-scrollbar {
        display: none;
    }
    
    .catalog-nav-item {
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .catalog-nav-img img {
        max-width: 70px !important;
        height: auto !important;
    }
}

/* ============================================
   PRODUCT SECTIONS - Homepage
   ============================================ */
.product-section-2024 {
    padding: 50px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-section-header-2024 {
    text-align: center;
    margin-bottom: 40px;
}

.product-section-header-2024 h2 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.product-section-header-2024 p {
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Section Background Colors */
.best-seller-section {
    background: linear-gradient(180deg, #FFF8F5 0%, #FFF5F2 100%);
}

.every-day-section {
    background: linear-gradient(180deg, #F5F8FF 0%, #F0F5FF 100%);
}

.new-arrivals-section {
    background: linear-gradient(180deg, #F5FFF8 0%, #F0FFF5 100%);
}

/* Product Grid */
.product-list-grid-2024 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card */
.product-card-2024 {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card-2024:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-card-img-2024 {
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #fafafa;
}

.product-card-img-2024 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card-info-2024 {
    padding: 15px;
}

.product-card-info-2024 h3 {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-2024 {
    font-size: 16px;
    font-weight: 600;
    color: #C39B5B;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .product-list-grid-2024 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-section-2024 {
        padding: 30px 15px;
    }
    
    .product-list-grid-2024 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-section-header-2024 h2 {
        font-size: 22px;
    }
    
    .product-card-info-2024 {
        padding: 10px;
    }
    
    .product-card-info-2024 h3 {
        font-size: 12px;
    }
    
    .product-price-2024 {
        font-size: 14px;
    }
}
