:root {
    --index2-primary: #0047AB; /* Cobalt Blue */
    --index2-secondary: #002855; /* Navy Blue */
    --index2-accent: #f97316; /* Orange for CTAs and Badges */
    --index2-bg: #f3f4f6;
    --index2-card: #ffffff;
    --index2-border: #e5e7eb;
    --index2-text: #111827;
    --index2-text-muted: #6b7280;
    --index2-success: #10b981;
    --index2-danger: #ef4444;
    
    --index2-shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --index2-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --index2-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
}

body.index2-page {
    background-color: var(--index2-bg);
}

/* Header Adjustments - Keeping Original but Refining */
header {
    background: var(--index2-secondary) !important;
}

.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}
.header-top {
    background: var(--index2-secondary);
    color: white;
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-links {
    display: flex;
    gap: 20px;
}

.header-top-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: 0.2s;
}

.header-top-links a:hover {
    color: white;
}

/* Main Header Redesign Override */
header.index2-header {
    background: #fff;
    border-bottom: 2px solid var(--index2-primary);
    padding: 15px 0;
    box-shadow: var(--index2-shadow-soft);
}

.header-inner-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.search-v2 {
    flex: 1;
    max-width: 800px;
}

.search-bar-v2 {
    display: flex;
    border: 2px solid var(--index2-primary);
    border-radius: 8px;
    overflow: hidden;
}

.search-bar-v2 input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    outline: none;
    font-size: 0.95rem;
}

.search-bar-v2 button {
    background: var(--index2-primary);
    color: #fff;
    border: none;
    width: 60px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
}

.search-bar-v2 button:hover {
    background: var(--index2-secondary);
}

.nav-icons-v2 {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-icon-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--index2-secondary);
    font-weight: 700;
    font-size: 0.85rem;
}

.nav-icon-item i {
    font-size: 1.6rem;
    color: var(--index2-primary);
}

/* Hero Section Alignment */
.hero-block {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 30px;
    min-height: 500px; 
}

.hero-sidebar {
    width: 280px;
    flex-shrink: 0;
    height: 100%;
}

.hero-main {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: block; /* Ensure it behaves as a block in the flex container */
}

/* Custom Slider Styles */
.custom-slider-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border: 1px solid var(--index2-border);
    box-shadow: var(--index2-shadow-soft);
}

.custom-slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.custom-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Important to fill the area like in reference sites */
    display: block !important;
}

.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--index2-secondary);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: 0.3s;
    font-size: 1.2rem;
}

.slider-controls button:hover {
    background: var(--index2-primary);
    color: #fff;
}

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

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

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

.slider-dots .dot.active {
    background: #fff;
    width: 25px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
}

.slider-dots .dot.active {
    background: var(--index2-primary);
    width: 30px;
    border-radius: 10px;
}

/* Benefits below Hero */
.benefits-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    padding: 30px 20px;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 1px solid var(--index2-border);
    box-shadow: var(--index2-shadow-soft);
    gap: 20px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 220px;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--index2-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.benefit-text h5 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: var(--index2-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benefit-text p {
    font-size: 0.75rem;
    color: var(--index2-text-muted);
    margin: 2px 0 0 0;
}

/* Featured Categories Section */
.featured-categories {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--index2-border);
    padding-bottom: 10px;
}

.section-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--index2-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.scroll-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.scroll-btn:hover {
    border-color: var(--index2-primary);
    color: var(--index2-primary);
    background: #f8fafc;
}

.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--index2-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.category-card:hover {
    border-color: var(--index2-primary);
    box-shadow: var(--index2-shadow-lg);
    transform: translateY(-5px);
}

.category-card i {
    font-size: 2rem;
    color: var(--index2-primary);
}

.category-card span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--index2-text);
}

/* Modern Product Card for index2 */
.pcard-v2 {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--index2-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--index2-shadow-soft);
    text-decoration: none !important;
    color: inherit !important;
}

.pcard-v2, .pcard-v2 a, .pcard-v2-name, .pcard-v2-sku, .pcard-v2-price-main {
    text-decoration: none !important;
}

.pcard-v2 a {
    color: inherit !important;
}

.pcard-v2:hover {
    box-shadow: var(--index2-shadow-lg);
    border-color: rgba(0, 71, 171, 0.3);
    transform: translateY(-8px);
}

.pcard-v2 .badge-promo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(234, 88, 12, 0.2);
}

.pcard-v2-img {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 10px;
    overflow: hidden;
}

.pcard-v2-img a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.pcard-v2-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.pcard-v2:hover .pcard-v2-img img {
    transform: scale(1.08);
}

.pcard-v2-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pcard-v2-sku {
    font-size: 0.65rem;
    color: var(--index2-text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.pcard-v2-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--index2-text);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.pcard-v2-price-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.pcard-v2-price-old {
    font-size: 0.75rem;
    color: var(--index2-text-muted);
    text-decoration: line-through;
}

.pcard-v2-price-main {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--index2-primary);
}

.pcard-v2-buy-zone {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-buy-v2 {
    background: linear-gradient(135deg, #0047AB 0%, #002855 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 71, 171, 0.2);
}

.btn-buy-v2:hover {
    background: linear-gradient(135deg, #0056d2 0%, #0047AB 100%);
    box-shadow: 0 6px 15px rgba(0, 71, 171, 0.3);
    transform: translateY(-2px);
}

.btn-buy-v2:active {
    transform: translateY(0);
}

/* Sidebar Update */
.sidebar-filters-v2 {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--index2-border);
    box-shadow: var(--index2-shadow-soft);
    position: sticky;
    top: 90px;
}

.sidebar-title-v2 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--index2-secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--index2-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cat-list-v2 {
    list-style: none;
}

.cat-list-v2 li {
    margin-bottom: 5px;
}

.cat-link-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--index2-text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.cat-link-v2:hover {
    background: #eff6ff;
    color: var(--index2-primary);
    padding-left: 18px;
}

.cat-link-v2.active {
    background: var(--index2-primary);
    color: #fff;
}

.cat-badge-v2 {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.active .cat-badge-v2 {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Responsive Grid index2 */
.index2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

@media (max-width: 991px) {
    .container {
        padding: 20px 10px !important;
    }
    .hero-block, .main-layout-v2 {
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        gap: 15px !important;
    }
    .hero-sidebar, .hero-main, .content-right {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        position: static !important;
    }
    .sidebar-filters-v2 {
        height: auto !important;
        max-height: none !important;
    }
    .cat-list-v2 {
        max-height: 300px !important; /* Keep it scrollable but more flexible */
    }
    .hero-main {
        order: -1; /* Put banner above categories on mobile */
    }
}

/* Benefits Bar Mobile (Grid 2x2) */
@media (max-width: 991px) {
    .benefits-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding: 20px 15px !important;
        justify-content: stretch !important;
    }
    .benefit-item {
        min-width: 0 !important;
        gap: 10px !important;
        justify-content: flex-start !important;
    }
    .benefit-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
    }
    .benefit-text h5 {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
    }
    .benefit-text p {
        font-size: 0.72rem !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 768px) {
    .index2-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .pcard-v2 {
        padding: 10px;
        border-radius: 12px;
    }
    .pcard-v2-img {
        height: 130px;
    }
    .pcard-v2-name {
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
        height: 38px !important; /* Forces 2-3 lines consistency */
    }
    .pcard-v2-sku {
        font-size: 0.6rem !important;
    }
    .pcard-v2-price-main {
        font-size: 0.95rem !important;
    }
    .pcard-v2-price-old {
        font-size: 0.7rem !important;
    }
    /* Fix for Buy Zone on Mobile (2 Columns) */
    .pcard-v2-buy-zone > div {
        flex-direction: column !important;
        gap: 6px !important;
    }
    .qty-control {
        width: 100% !important;
        height: 36px !important;
        justify-content: space-between;
    }
    .qty-control button {
        width: 35px !important;
    }
    .qty-control input {
        flex: 1 !important;
    }
    .btn-buy-v2 {
        width: 100% !important;
        height: 36px !important;
        font-size: 0.75rem !important;
        padding: 8px !important;
        margin-top: 0 !important;
    }
}

/* Quantity Control Styles */
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    height: 42px;
}

.qty-control button {
    width: 30px;
    height: 100%;
    border: none;
    background: #f8fafc;
    color: var(--index2-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.qty-control button:hover {
    background: var(--index2-primary);
    color: #fff;
}

.qty-control input {
    flex: 1;
    width: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    outline: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--index2-secondary);
    background: #fff;
    -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
