/* ===========================
   LED STIL - HOME PAGE STYLES
   Main page specific styles
   =========================== */

/* =====================
   SECTION TITLE
   ===================== */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-800, #1a2f4f) 0%, var(--primary-600, #4a6fa5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* =====================
   PRODUCT CARDS
   ===================== */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid rgba(102,126,234,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102,126,234,0.15);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f7fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-info {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    flex: 1;
}

.product-price {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a2f4f, #4a6fa5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Add to cart button on product card */
.product-card .btn-cart {
    margin: 0 20px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #5e8dc3 0%, #79abe5 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-card .btn-cart:hover {
    background: linear-gradient(135deg, #4a6fa5 0%, #5e8dc3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94,141,195,0.4);
}

/* =====================
   SECTIONS TABS - TRANSITION
   ===================== */
.block-sections .sections-tabs {
    gap: 12px;
    margin-bottom: 32px;
}

.block-sections .section-tab {
    background: #f4f8fc;
    color: #31537d;
    border: 1px solid rgba(74, 111, 165, 0.18);
    box-shadow: 0 6px 18px rgba(26, 47, 79, 0.06);
}

.block-sections .section-tab:hover {
    background: #eaf2fb;
    border-color: rgba(74, 111, 165, 0.3);
    box-shadow: 0 10px 24px rgba(26, 47, 79, 0.1);
}

.block-sections .section-tab.active {
    background: linear-gradient(135deg, #1a2f4f 0%, #4a6fa5 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(26, 47, 79, 0.22);
}

.section-content {
    display: none;
    opacity: 0;
}

.section-content.active {
    display: block;
    animation: sectionFadeIn 0.4s ease forwards;
}

.block-sections .products-grid {
    align-items: stretch;
}

.block-sections .product-card {
    height: 100%;
    border-color: rgba(26, 47, 79, 0.08);
    box-shadow: 0 2px 16px rgba(45, 74, 111, 0.07), 0 1.5px 6px rgba(45, 74, 111, 0.04);
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    perspective: 1000px;
}

.block-sections .product-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 28px rgba(45, 74, 111, 0.1), 0 2px 8px rgba(45, 74, 111, 0.08);
    background: linear-gradient(135deg, #f1f5f9 0%, #e8ecf1 100%);
}

.block-sections .product-image {
    background: linear-gradient(180deg, #f5f8fb 0%, #e8eff7 100%);
    border-bottom: 1px solid rgba(74, 111, 165, 0.08);
}

.block-sections .product-image img {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
    filter: drop-shadow(0 2px 8px rgba(45, 74, 111, 0.08));
}

.block-sections .product-card:hover .product-image img {
    transform: scale(1.03) rotate(-0.5deg);
    filter: drop-shadow(0 4px 12px rgba(45, 74, 111, 0.1));
}

.block-sections .product-image:empty::after {
    content: 'LED STIL';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(49, 83, 125, 0.38);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.block-sections .product-name {
    color: #1a2f4f;
}

.block-sections .price-current {
    background: linear-gradient(135deg, #1a2f4f 0%, #5b8dc7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   NEWS BLOCK
   ===================== */
.news-block {
    width: 100%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid rgba(102,126,234,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.news-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102,126,234,0.15);
}

.news-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-item a:hover .news-title {
    color: #4a6fa5;
}

.news-excerpt {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #5e8dc3;
    transition: gap 0.2s ease;
    margin-top: auto;
}

.news-item a:hover .news-link {
    gap: 10px;
}

/* =====================
   IMAGE GRID BLOCK
   ===================== */
.image-grid .grid-item {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid .grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.image-grid .grid-item img {
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.image-grid .grid-item:hover img {
    transform: scale(1.06);
}

/* =====================
   CATEGORY CARDS
   ===================== */
.category-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid rgba(102,126,234,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102,126,234,0.15);
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f7fa;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-image img {
    transform: scale(1.08);
}

.category-name {
    padding: 16px 16px 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    line-height: 1.35;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .section-title {
        margin-bottom: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-image {
        height: 180px;
    }

    .category-image {
        height: 140px;
    }

    .price-current {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 12px 14px 14px;
    }

    .product-name {
        font-size: 0.88rem;
    }

    .news-item {
        padding: 20px;
    }
}
