/* ============================================================
   EURO-DREWNO — Sekcja Produktów  |  ed-products.css
   Wklej: Elementor > Site Settings > Custom CSS
   lub dołącz przez functions.php (patrz ed-products-functions.php)
   ============================================================ */

/* ─── 1. SEKCJA WRAPPER ──────────────────────────────────── */
.ed-products-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 72px 24px 80px;
    font-family: Arial, sans-serif;
}

/* ─── 2. NAGŁÓWEK ────────────────────────────────────────── */
.ed-products-header {
    text-align: center;
    margin-bottom: 52px;
}

.ed-products-supertitle {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #C4956A;
    margin: 0 0 12px;
}

.ed-products-title {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 700;
    color: #5C3D1E;
    margin: 0;
    line-height: 1.2;
}

/* ─── 3. SIATKA 3×2 ──────────────────────────────────────── */
.ed-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--ed-cols, 3), 1fr);
    gap: 24px;
    margin-bottom: 52px;
}

/* ─── 4. KAFELEK ─────────────────────────────────────────── */
.ed-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    /* treść przyklejona do dołu */
    min-height: 320px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;

    /* Fallback tło kiedy brak zdjęcia */
    background-color: #5C3D1E;
    background-size: cover;
    background-position: center;

    /* Stagger fade-in */
    opacity: 0;
    transform: translateY(18px);
    animation: edCardIn 0.5s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 80ms + 100ms);
}

@keyframes edCardIn {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── 5. OVERLAY ────────────────────────────────────────── */
.ed-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.25s ease;
    border-radius: inherit;
}

.ed-card:hover .ed-card__overlay {
    background: rgba(0, 0, 0, 0.60);
}

/* ─── 6. TREŚĆ KAFELKA ───────────────────────────────────── */
.ed-card__content {
    position: relative;
    z-index: 2;
    padding: 24px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* ─── 7. IKONA SVG ───────────────────────────────────────── */
.ed-card__icon {
    display: block;
    width: 40px;
    height: 40px;
    color: #FFFFFF;
    margin-bottom: 4px;
    transition: transform 0.25s ease;
}

.ed-card:hover .ed-card__icon {
    transform: translateY(-3px);
}

.ed-card__icon svg {
    width: 100%;
    height: 100%;
}

/* ─── 8. TYTUŁ ───────────────────────────────────────────── */
.ed-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    line-height: 1.2;
}

/* ─── 9. OPIS ────────────────────────────────────────────── */
.ed-card__desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    line-height: 1.5;
}

/* ─── 10. PRZYCISK W KAFELKU ─────────────────────────────── */
.ed-card__btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    border: 1.5px solid #FFFFFF;
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    align-self: flex-start;
}

.ed-card:hover .ed-card__btn {
    background: #C4956A;
    border-color: #C4956A;
    color: #FFFFFF;
}

/* ─── 11. WYRÓŻNIONY KAFELEK (Zamówienia indywidualne) ───── */
.ed-card--special {
    background-color: #3A2510;
    /* ciemniejszy brąz */
}

.ed-card--special::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2.5px solid #C4956A;
    border-radius: inherit;
    z-index: 3;
    pointer-events: none;
}

.ed-card--special .ed-card__btn {
    border-color: #C4956A;
    background: rgba(196, 149, 106, 0.15);
}

.ed-card--special:hover .ed-card__btn {
    background: #C4956A;
}

/* ─── 12. GŁÓWNY PRZYCISK CTA ────────────────────────────── */
.ed-products-cta-wrap {
    display: flex;
    justify-content: center;
}

.ed-products-cta {
    display: inline-block;
    padding: 15px 48px;
    background: #5C3D1E;
    color: #FFFFFF;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid #5C3D1E;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ed-products-cta:hover {
    background: transparent;
    color: #5C3D1E;
    transform: translateY(-2px);
}

/* ─── 13. RESPONSIVE — TABLET (≤1024px) ────────────────── */
@media (max-width: 1024px) {
    .ed-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .ed-card {
        min-height: 280px;
    }
}

/* ─── 14. RESPONSIVE — MOBILE (≤768px) ─────────────────── */
@media (max-width: 768px) {
    .ed-products-section {
        padding: 48px 16px 56px;
    }

    .ed-products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ed-card {
        min-height: 200px;
    }

    .ed-products-title {
        font-size: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════
   SEKCJA KATEGORII — nowe karty (ed-cat-card)
   Układ: ciemna góra (tekst) + zdjęcie na dole
═══════════════════════════════════════════════════════════ */

/* Sekcja wrapper */
.ed-cat-section {
    max-width: 1500px;
    margin: 0 auto;
    padding: 72px 24px 80px;
    font-family: Arial, sans-serif;
}

/* Siatka */
.ed-cat-grid {
    display: grid;
    grid-template-columns: repeat(var(--ed-cols, 3), 1fr);
    gap: 20px;
    margin-bottom: 52px;
}

/* ─── Karta kategorii ───────────────────────────────────── */
.ed-cat-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;

    /* Stagger fade-in */
    opacity: 0;
    transform: translateY(16px);
    animation: edCatCardIn 0.45s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 80ms + 80ms);
}

@keyframes edCatCardIn {
    to {
        opacity: 1;
        transform: none;
    }
}

.ed-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    border-color: #333333;
}

/* ─── Górna część: ciemne tło + tekst ──────────────────── */
.ed-cat-section .ed-cat-card__top {
    flex: 1 1 auto;
    padding: 32px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 180px;
}

.ed-cat-section h3.ed-cat-card__title,
.ed-cat-section h3.ed-cat-card__title a,
.ed-cat-section .ed-cat-card__title {
    font-size: 26px !important;
    font-weight: 500 !important;
    color: #FFFFFF !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.5px !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.ed-cat-section .ed-cat-card a,
.ed-cat-section .ed-cat-card__title a {
    text-decoration: none !important;
    color: #FFFFFF !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.ed-cat-section .ed-cat-card__desc {
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.55) !important;
    margin: 0 !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    display: block;
}

/* "Więcej" — złoty link */
.ed-cat-card__more {
    display: inline-block;
    margin-top: auto;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #B28256 !important;
    letter-spacing: 0.3px !important;
    transition: color 0.2s, letter-spacing 0.2s;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.ed-cat-card:hover .ed-cat-card__more {
    color: #dcb38a !important;
    letter-spacing: 0.8px !important;
}

/* ─── Dolna część: zdjęcie ──────────────────────────────── */
.ed-cat-card__img-wrap {
    flex: 0 0 auto;
    overflow: hidden;
    position: relative;
    background: #141414;
    border-top: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-cat-card__img {
    width: 100%;
    max-height: 300px;
    height: 300px;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(.7);
}

.ed-cat-card:hover .ed-cat-card__img {
    transform: scale(1.08);
    filter: brightness(.95);
}

/* Placeholder gdy brak zdjęcia */
.ed-cat-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2318;
}

.ed-cat-card__img-placeholder svg {
    width: 80px;
    height: auto;
    opacity: .4;
}

/* ─── Wyróżniony kafelek ────────────────────────────────── */
.ed-cat-card--special {
    outline: 2px solid #C4956A;
    outline-offset: -2px;
}

.ed-cat-card--special .ed-cat-card__top {
    background: #241a0e;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ed-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ed-cat-section {
        padding: 48px 16px 56px;
    }

    .ed-cat-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ed-cat-card__top {
        min-height: 130px;
        padding: 20px 18px 16px;
    }

    .ed-cat-card__title {
        font-size: 19px;
    }

    .ed-cat-card__img-wrap {
        height: 150px;
    }
}