/* ===========================
   LED STIL - DYNAMIC BLOCKS CSS
   Styles for homepage editor blocks.
   Main block styles live in category-template.css.
   This file contains additions and overrides.
   =========================== */

/* =====================
   BLOCK WRAPPER
   ===================== */
.dynamic-block {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
    position: relative;
}

.dynamic-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94,141,195,0.25), transparent);
}

.dynamic-block:nth-child(even) {
    background: linear-gradient(135deg, #f1f5f9 0%, #e8eef6 100%);
}

.dynamic-block:nth-child(odd) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

/* =====================
   SLIDER CLICK CURSOR
   ===================== */
.slide[data-link] {
    cursor: pointer;
}

/* =====================
   PRODUCTS GRID IN SECTIONS
   ===================== */
.section-content .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.block-sections .product-actions {
    padding: 0 1.2rem 1.2rem;
    display: flex;
    flex-direction: row;
    gap: 0.7rem;
    width: 100%;
    margin-top: auto;
}

.block-sections .product-actions button {
    flex: 1 1 0;
    padding: 0.7em 0.5em;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: 0 1px 3px rgba(45, 74, 111, 0.07);
    letter-spacing: -0.01em;
    appearance: none;
}

.block-sections .product-actions button i {
    font-size: 0.95em;
}

.block-sections .btn-add-to-cart {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(45, 74, 111, 0.1);
}

.block-sections .btn-add-to-cart:hover:not(:disabled) {
    background: linear-gradient(135deg, #0f2540 0%, #1e3a5f 50%, #0f2540 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(45, 74, 111, 0.13);
    transform: translateY(-1px);
}

.block-sections .btn-buy-now {
    background: #fff;
    color: #2d4a6f;
    border: 1.5px solid #1e3a5f;
    box-shadow: 0 1px 3px rgba(45, 74, 111, 0.04);
}

.block-sections .btn-buy-now:hover:not(:disabled) {
    background: #f8fbff;
    border-color: #0f2540;
    color: #0f2540;
    box-shadow: 0 4px 14px rgba(45, 74, 111, 0.08);
    transform: translateY(-1px);
}

.block-sections .product-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1024px) {
    .section-content .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .block-sections .product-card {
        min-height: 0;
        max-height: none;
        height: auto;
    }

    .dynamic-block {
        padding: 1.75rem 0;
    }

    .block-sections .sections-tabs {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 10px;
        margin: 0 -4px 20px;
        padding: 0 4px 8px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .block-sections .sections-tabs::-webkit-scrollbar {
        display: none;
    }

    .block-sections .section-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 16px;
        border-radius: 18px;
        font-size: 0.92rem;
        line-height: 1.2;
        scroll-snap-align: start;
        box-shadow: 0 8px 20px rgba(26, 47, 79, 0.08);
    }

    .block-sections .product-card {
        border-radius: 18px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
    }

    .block-sections .product-image {
        height: 190px;
    }

    .block-sections .product-info {
        padding: 14px 14px 10px;
    }

    .block-sections .product-name {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .block-sections .product-price {
        margin-top: 10px;
    }

    .block-sections .price-current {
        font-size: 1.08rem;
    }

    .block-sections .product-actions {
        gap: 8px;
        padding: 0 14px 14px;
    }

    .block-sections .product-actions button {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 12px;
        font-size: 0.82rem;
    }

    .block-sections .product-actions button i {
        font-size: 0.9rem;
    }
}

@media (max-width: 560px) {
    .section-content .products-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .block-sections .product-card {
        min-height: 0;
        max-height: none;
        max-width: 420px;
        margin: 0 auto;
    }

    .block-sections .product-image {
        height: 210px;
    }

    .block-sections .product-info {
        padding: 16px 16px 12px;
    }

    .block-sections .product-name {
        font-size: 0.98rem;
    }

    .block-sections .price-current {
        font-size: 1.15rem;
    }

    .block-sections .product-actions {
        flex-direction: column;
        padding: 0 16px 16px;
    }

    .block-sections .product-actions button {
        width: 100%;
    }

    .block-sections .section-tab {
        padding: 9px 14px;
        font-size: 0.88rem;
    }
}
