/**
 * SuperMarket Replica Desktop Grid & Carousel Stylesheet
 * Location: /css-modules/desktop-frontpage.css
 */

.pipstore-supermarket-container {
    margin: 20px auto 50px auto;
    padding: 0 15px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
}

.margin-top-15 { margin-top: 15px !important; }
.margin-top-20 { margin-top: 20px !important; }
.margin-top-25 { margin-top: 25px !important; }

/* 1. Top Section Flexbox Row */
.pipstore-top-hero-row {
    display: flex;
    gap: 20px;
    width: 80%;
    align-items: stretch;
    margin-left: 20%;
}

.pipstore-hero-main-slider {
    flex: 3;
    min-width: 0;
    height: 450px;
}

/* Standalone Hero Slider */
.pipstore-desktop-hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #0f1115;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pipstore-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.pipstore-slide-item {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    width: 100%;
}

.pipstore-slide-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.pipstore-slide-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.pipstore-slider-prev,
.pipstore-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 17, 21, 0.75);
    color: #ecc53a;
    border: 1px solid rgba(236, 197, 58, 0.4);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.pipstore-slider-prev:hover,
.pipstore-slider-next:hover {
    background: #ecc53a;
    color: #0f1115;
    border-color: #ecc53a;
}

.pipstore-slider-prev { left: 15px; }
.pipstore-slider-next { right: 15px; }

.pipstore-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.pipstore-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pipstore-slider-dot.active {
    background: #ecc53a;
    width: 26px;
    border-radius: 10px;
}

.pipstore-hero-bestselling {
    flex: 1;
    min-width: 250px;
}

/* 2. Main 2-Column Body Layout */
.pipstore-main-body-row {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.pipstore-sidebar-col {
    width: 19%;
    flex-shrink: 0;
    margin-top: 1%;
}

.pipstore-content-col {
    flex-grow: 1;
    min-width: 0;
}

/* 3. Product Grids (Legacy Support) */
.pipstore-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.pipstore-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.pipstore-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex-grow: 1;
}

/* 4. MAIN COLUMN CAROUSEL SLIDER ENGINE */
.pipstore-carousel-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
}

.pipstore-carousel-track {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth;
    padding: 4px 2px 10px 2px !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.pipstore-carousel-track::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari */
}

/* 1-Row Carousel (4 Cards View for Category Sliders & Main Product Grids) */
.pipstore-carousel-1row .brand-product-card {
    flex: 0 0 calc((100% - 3 * 12px) / 4) !important;
    min-width: calc((100% - 3 * 12px) / 4) !important;
    box-sizing: border-box !important;
}

/* 1-Row Carousel (5 Cards View for Listing Tabs) */
.pipstore-carousel-1row-5 .brand-product-card {
    flex: 0 0 calc((100% - 4 * 12px) / 5) !important;
    min-width: calc((100% - 4 * 12px) / 5) !important;
    box-sizing: border-box !important;
}

/* Flash Sale Independent Single Row Carousel Track (6 Cards View) */
.pipstore-carousel-flash-row .brand-product-card {
    flex: 0 0 calc((100% - 5 * 12px) / 6) !important;
    min-width: calc((100% - 5 * 12px) / 6) !important;
    box-sizing: border-box !important;
}

/* Carousel Navigation Arrows */
.pipstore-carousel-arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #0f1115 !important;
    color: #ecc53a !important;
    border: 1px solid #ecc53a !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.pipstore-carousel-arrow:hover {
    background: #ecc53a !important;
    color: #0f1115 !important;
}

.pipstore-carousel-arrow.prev { left: -14px !important; }
.pipstore-carousel-arrow.next { right: -14px !important; }

/* 5. Category Slider Layout */
.categoryslider-wrapper {
    display: flex;
    gap: 15px;
}

.item-cat-image {
    width: 220px !important;
    height: 350px !important;
    flex-shrink: 0;
}

.item-cat-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px;
}

.page-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.page-title-categoryslider {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    color: #0f1115;
}

.item-sub-cat ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
}

.item-sub-cat ul li a {
    color: #64748b;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}

.item-sub-cat ul li a:hover {
    color: #0f1115;
}

/* 6. Auto-Resizing Banners */
.pipstore-auto-banner-box img {
    width: 100% !important;
    height: 320px !important;
    object-fit: cover !important;
    border-radius: 8px;
}

.pipstore-banners-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pipstore-banners-3 img {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover !important;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

/* 7. Product Cards */
.brand-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    transition: all 0.2s ease;
    position: relative;
}

.brand-product-card:hover {
    border-color: #ecc53a;
    box-shadow: 0 8px 20px rgba(15, 17, 21, 0.08);
    transform: translateY(-2px);
}

.product-thumb {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 6px;
    z-index: 1;
}

.product-thumb a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 2;
}

.product-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #ffffff;
    pointer-events: none;
}

.sale-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ecc53a;
    color: #0f1115;
    font-size: 13px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 3;
    pointer-events: none;
}

.rating-stars-gold {
    color: #ecc53a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    margin-top: 6px !important;
    line-height: 1.2 !important;
    display: block !important;
}

.brand-product-card h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 6px 0;
    height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 2;
}

.brand-product-card h4 a {
    color: #0f1115;
    text-decoration: none;
    display: block;
}

.brand-product-card h4 a:hover {
    color: #ecc53a;
}

.brand-product-card .price {
    font-size: 15px;
    font-weight: 900;
    color: #0f1115;
    margin-bottom: 8px;
}

.btn-brand-addtocart {
    display: block;
    width: 100%;
    background: #0f1115;
    color: #ecc53a !important;
    text-align: center;
    padding: 8px 0;
    border-radius: 4px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 5;
    transition: all 0.2s ease;
}

.btn-brand-addtocart:hover {
    background: #ecc53a;
    color: #0f1115 !important;
}

/* 8. Sidebar Mini Cards */
.pipstore-sidebar-mini-card {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.pipstore-sidebar-mini-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mini-card-img img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.mini-card-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px 0;
    line-height: 1.3;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 188px;
}

.mini-card-info h4 a {
    color: #0f1115;
    text-decoration: none;
}

.mini-card-info .price {
    font-size: 16px;
    font-weight: 900;
    color: #0f1115;
}

.pipstore-sidebar-rec-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.pipstore-sidebar-rec-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.brand-charcoal-card {
    background: #0f1115;
    color: #ffffff;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ecc53a;
    margin: 15px 0;
}

.brand-charcoal-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-charcoal-card li {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.brand-charcoal-card li:last-child { margin-bottom: 0; }
.brand-charcoal-card i { font-size: 16px; color: #ecc53a; }
.brand-charcoal-card strong { color: #ecc53a; font-size: 11px; display: block; }
.brand-charcoal-card p { font-size: 9px; color: #94a3b8; margin: 0; }

/* 9. Titles & Accents */
.pipstore-gold-mod .modtitle {
    position: relative;
    border-bottom: 3px solid #ecc53a;
    margin-bottom: 15px;
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pipstore-gold-mod h4 {    
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;     
}

.pipstore-gold-mod .modtitle span {
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    color: #0f1115;
}

.pipstore-gold-mod .modtitle .viewall {
    font-size: 14px;
    font-weight: 800;
    color: #0f1115;
    text-decoration: none;
    text-transform: uppercase;
    background: #ecc53a;
    padding: 3px 10px;
    border-radius: 4px;
}

.pipstore-countdown-clock {
    font-size: 20px;
    font-weight: 900;
    color: #0f1115;
    background: #ecc53a;
    padding: 3px 10px;
    border-radius: 15px;
    font-family: monospace;
}

.ltabs-tabs-wrap ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 7px; }
.ltabs-tabs-wrap .ltabs-tab { background: #f1f5f9; padding: 6px 14px; border-radius: 4px; font-size: 14px; font-weight: 800; cursor: pointer; color: #334155; }
.ltabs-tabs-wrap .ltabs-tab.tab-sel { background: #0f1115; color: #ecc53a; }