/* ============================================================
   HOME.CSS - HOMEPAGE, SLIDER, PRODUCTS, CATEGORIES
   ============================================================ */

/* 1. MAIN SLIDER */
.main-slider-wrapper {
    position: relative;
    border: 1px solid #ddd;
    border-top: none;
    overflow: hidden;
    height: 300px !important;
    margin-bottom: 0 !important;
}

.main-slick-slider {
    background: #000;
    height: 100%;
}

.slide-item,
.slide-item img {
    height: 300px !important;
    width: 100%;
    object-fit: cover;
}

.slide-item img {
    opacity: 0.8;
}

.slide-overlay {
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    color: #fff;
    z-index: 5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    max-width: 500px;
}

.overlay-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

@media (max-width: 767px) {
    .overlay-title {
        font-size: 20px !important;
        /* Smaller text on mobile */
        margin-bottom: 10px;
    }

    .overlay-text {
        font-size: 12px !important;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .overlay-button {
        padding: 8px 15px;
        font-size: 11px;
    }
}

.overlay-text {
    font-size: 16px;
    margin-bottom: 25px;
}

.overlay-button {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 10px 25px;
    font-weight: 700;
    border-bottom: 3px solid #003366;
    cursor: pointer;
}

/* Slider Controls */
.slick-prev-custom,
.slick-next-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.slick-prev-custom {
    left: 0;
}

.slick-next-custom {
    right: 0;
}

.slick-prev-custom:hover,
.slick-next-custom:hover {
    background: var(--accent-color);
}

.slick-dots {
    position: absolute !important;
    bottom: 20px !important;
    left: 0;
    right: 0;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20;
    text-align: center;
    width: 100%;
}

.slick-dots li button {
    background: #fff !important;
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.slick-dots li.slick-active button {
    background: var(--accent-color) !important;
    opacity: 1;
}

/* 2. ADVANTAGES */
.advantages-section {
    padding: 20px 0;
}

.advantage-item {
    text-align: center;
    padding: 15px;
}

.advantage-item i {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.advantage-item p {
    font-size: 11px;
    /* Smaller, cleaner */
    font-weight: 700;
    color: #444;
    line-height: 1.3;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* Mobile Advantages (Compact) */
@media (max-width: 767px) {
    .advantages-section {
        padding: 8px 0;
        margin: 5px 0 0 0;
    }

    .advantage-item {
        padding: 2px 5px;
        margin-bottom: 5px;
    }

    .advantage-item i {
        font-size: 2rem !important;
        margin-bottom: 0px !important;
        line-height: 1;
    }

    .advantage-item p {
        font-size: 10px;
        line-height: 1.1;
        margin-bottom: 0;
        font-weight: 600;
        padding-top: 2px;
    }
}

/* 3. SPLIT BLOCKS (Import/Domestic) */
.catalog-split-section {
    margin-top: 25px !important;
    /* Mobile gap */
}

@media (min-width: 768px) {
    .catalog-split-section {
        margin-top: 30px !important;
    }
}

.catalog-split-card {
    display: block;
    text-decoration: none;
    border-radius: 0 !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.split-card-inner {
    height: 250px;
    display: flex;
    /* Center content */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    position: relative;
    transition: transform 0.5s ease;
}

.split-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.split-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 80, 157, 0.9), rgba(0, 61, 122, 0.8));
    opacity: 0.9;
}

.split-card-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.split-card-title {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.split-card-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.split-card-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 25px;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    transition: 0.3s;
}

/* Hover Effects */
.catalog-split-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.catalog-split-card:hover .split-card-inner {
    transform: scale(1.02);
}

.catalog-split-card:hover .split-card-btn {
    background: #fff;
    color: var(--accent-color);
}

/* Mobile Split Cards */
@media (max-width: 767px) {
    .split-card-content i.fa-3x {
        font-size: 1.5em !important;
        margin-bottom: 5px !important;
    }

    .split-card-title {
        font-size: 16px;
    }

    .split-card-inner {
        height: 180px;
        padding: 15px;
    }
}

/* 7. ПЛИТКА КАТЕГОРИЙ */
.cat-tile {
    display: block;
    position: relative;
    overflow: hidden;
    background: #000;
    width: 100%;
    margin-bottom: 0;
}

.cat-tile.tall {
    height: 280px;
    /* Fixed height for top blocks */
}

.cat-tile.small {
    height: 200px;
    /* Fixed height for bottom blocks */
}

.cat-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    opacity: 0.85;
    /* Slightly dark for text contrast */
    position: absolute;
    /* Force fit */
    top: 0;
    left: 0;
}

.cat-tile:hover img {
    transform: scale(1.05);
    opacity: 0.6;
    /* Darken on hover */
}

.cat-tile-label {
    position: absolute;
    bottom: 20px;
    left: 0;
    background: var(--accent-color);
    color: #fff;
    padding: 6px 15px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    z-index: 5;
}

/* 4. PRODUCTS & TABS */
#product-tabs-wrapper h3,
#product-tabs-wrapper .box-heading {
    display: none;
}

.custom-tabs-home {
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.custom-tabs-home li a {
    color: #444;
    font-weight: 700;
    padding: 12px 20px;
    border: none;
    text-transform: uppercase;
}

.custom-tabs-home li.active a {
    color: var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    background: transparent;
}

/* Product Grid */
#product-tabs-wrapper .product-layout {
    width: 25%;
    float: left;
    margin-bottom: 20px;
    display: flex;
}

#product-tabs-wrapper .product-thumb {
    padding: 15px;
    transition: all 0.3s ease;
    background: #fff;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

#product-tabs-wrapper .product-thumb:hover {
    border-color: var(--accent-color) !important;
    box-shadow: 0 3px 10px rgba(0, 80, 157, 0.2) !important;
    transform: translateY(-2px);
}

#product-tabs-wrapper .product-thumb .image {
    padding: 0;
    margin-bottom: 10px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#product-tabs-wrapper .product-thumb .image img {
    max-height: 100%;
    object-fit: contain;
    width: auto;
}

#product-tabs-wrapper .product-thumb .caption {
    padding: 0 !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: unset !important;
}

#product-tabs-wrapper .product-thumb .caption h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 40px;
}

#product-tabs-wrapper .product-thumb .caption .price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

/* GRID VIEW MODE - Vertical button layout for desktop */
#product-tabs-wrapper .button-group-wrap {
    flex-direction: column;
    align-items: stretch;
}

#product-tabs-wrapper .quantity-selector {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
}

#product-tabs-wrapper .quantity-selector .qty-input {
    width: 100% !important;
    flex-grow: 1;
    font-size: 16px;
    font-weight: bold;
}

#product-tabs-wrapper .quantity-selector button {
    font-size: 20px;
    height: 42px;
}

#product-tabs-wrapper .btn-add-cart-new {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 10px;
}

/* Mobile Product Grid */
@media (max-width: 767px) {
    #product-tabs-wrapper .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    #product-tabs-wrapper .product-layout {
        width: 50% !important;
        float: left;
        padding-left: 5px;
        padding-right: 5px;
    }

    #product-tabs-wrapper .product-thumb .image {
        height: 120px;
    }
}

/* Tablet Product Grid */
@media (min-width: 768px) and (max-width: 991px) {
    #product-tabs-wrapper .product-layout {
        width: 33.3333% !important;
    }
}

    .product-thumb .caption h4 {
        font-size: 12px;
    }
}
/* ============================================================
   TABLET HOME RESPONSIVE (768px - 991px)
   ============================================================ */

@media (min-width: 768px) and (max-width: 991px) {
    /* Slider adjustments */
    .main-slider-wrapper {
        height: 250px !important;
    }
    
    .slide-item,
    .slide-item img {
        height: 250px !important;
    }
    
    .slide-overlay {
        left: 40px;
        max-width: 400px;
    }
    
    .overlay-title {
        font-size: 26px;
    }
    
    .overlay-text {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    /* Split Cards - full height maintained */
    .split-card-inner {
        height: 200px;
        padding: 20px;
    }
    
    .split-card-title {
        font-size: 18px;
    }
    
    .split-card-subtitle {
        font-size: 12px;
    }
    
    /* Advantages - 3 per row on tablet */
    .advantages-section .col-md-2 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    
    .advantage-item p {
        font-size: 10px;
    }
    
    /* Category tiles - adjust heights */
    .cat-tile.tall {
        height: 220px;
    }
    
    .cat-tile.small {
        height: 160px;
    }
    
    /* Product tabs - show 3 per row */
    #product-tabs-wrapper .product-layout {
        width: 33.333% !important;
    }
    
    #product-tabs-wrapper .product-thumb .image {
        height: 130px;
    }
    
    #product-tabs-wrapper .product-thumb .caption h4 {
        font-size: 13px;
        min-height: 35px;
    }
}
