/* ============================================================
   EURO-DREWNO — Katalog Produktów  |  catalog.css
   Design System 2.1 — dopracowany, spójny z O firmie / Realizacje
   ============================================================ */

/* ─── 0. FOUNDATIONS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --ed-gold: #a67c52;
    --ed-gold-light: #c49a6c;
    --ed-dark: #1a1a1a;
    --ed-dark-card: #232323;
    --ed-text: #333333;
    --ed-text-light: #777777;
    --ed-bg-warm: #f7f3ee;
    --ed-bg-cream: #faf7f2;
    --ed-border: #e8e0d5;
    --ed-radius-lg: 20px;
    --ed-radius-md: 14px;
    --ed-radius-pill: 50px;
    --ed-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
    --ed-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
    --ed-transition: 0.4s cubic-bezier(.25, .46, .45, .94);
    --ed-max-width: 1280px;
}

/* ─── 0b. GLOBAL MOBILE OVERFLOW PREVENTION ─────────────────── */
/* Zapobiega h-scroll na wąskich ekranach — catch-all dla stron katalogowych */
.ed-catalog-hero,
.ed-catalog-intro,
.ed-catalog-body,
.ed-catalog-main,
.ed-catalog-notfound,
.ed-filter-bar,
.ed-product-grid,
.ed-feat-card,
.ed-product-card {
    box-sizing: border-box;
    max-width: 100%;
}

/* ─── 1. HERO — identycznie jak O firmie / Realizacje ────────── */
.ed-catalog-hero {
    position: relative;
    min-height: 480px;
    background-image: url("https://eurodrewno.sylwiaturdev.com/wp-content/uploads/2026/03/Gemini_Generated_Image_7rwzmj7rwzmj7rwz-scaled.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin: 20px 20px;
    border-radius: var(--ed-radius-lg);
    padding-top: 200px;
}

.ed-catalog-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.20) 0%,
            rgba(0, 0, 0, 0.60) 100%);
}

.ed-catalog-hero__inner {
    position: relative;
    z-index: 1;
    padding: 0 60px 50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ed-catalog-hero__text {
    flex: 1;
}

.ed-catalog-hero__title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(52px, 7vw, 90px);
    font-weight: 800;
    color: #FFFFFF !important;
    margin: 0;
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4) !important;
}

.ed-catalog-hero__sub {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.80);
    margin: 0;
    line-height: 1.5;
    max-width: 400px;
    text-align: right;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.ed-breadcrumb {
    display: none;
}

/* ─── 2. SECTION INTRO (pod hero) ────────────────────────────── */
.ed-catalog-intro {
    max-width: 820px;
    margin: 0 auto;
    padding: 90px 24px 30px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.ed-catalog-intro__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ed-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 18px;
}

.ed-catalog-intro__heading {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: var(--ed-text);
    margin: 0 0 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.ed-catalog-intro__heading span {
    color: var(--ed-gold);
}

.ed-catalog-intro__desc {
    font-size: 16px;
    color: var(--ed-text-light);
    line-height: 1.7;
    margin: 0;
}

/* ─── 3. PRODUCT SECTION ─────────────────────────────────────── */
.ed-catalog-body {
    background: var(--ed-bg-warm);
    padding: 80px 24px;
    margin: 0;
}

.ed-catalog-main {
    max-width: var(--ed-max-width);
    margin: 0 auto;
}

/* ─── 4. PRODUCT GRID ────────────────────────────────────────── */
.ed-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ─── 5. PRODUCT CARD ─────────────────────────────────────────── */
/* Obie klasy (ed-product-card i ed-feat-card) renderują identycznie */
.ed-product-card,
.ed-feat-card {
    position: relative;
    background: #FFFFFF;
    border-radius: var(--ed-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--ed-shadow-card);
    transition: box-shadow var(--ed-transition),
        transform var(--ed-transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ed-product-card:hover,
.ed-feat-card:hover {
    box-shadow: var(--ed-shadow-hover);
    transform: translateY(-6px);
}

.ed-product-card.ed-hidden,
.ed-feat-card.ed-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

/* ─── 6. CARD IMAGE ──────────────────────────────────────────── */
.ed-product-card__img-wrap,
.ed-feat-card__img-wrap {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    text-decoration: none;
    background: #ede7df;
}

.ed-product-card__img,
.ed-feat-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(.25, .46, .45, .94);
}

.ed-product-card:hover .ed-product-card__img,
.ed-feat-card:hover .ed-feat-card__img {
    transform: scale(1.05);
}

/* Hover overlay */
.ed-product-card__hover-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.45) 100%);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.ed-product-card:hover .ed-product-card__hover-btn {
    opacity: 1;
}

/* ─── 7. BADGE ───────────────────────────────────────────────── */
.ed-product-card__badge,
.ed-feat-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: var(--ed-radius-pill);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(30, 30, 30, 0.80);
    color: #FFFFFF;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.ed-product-card__badge--avail,
.ed-feat-card__badge--avail {
    background: rgba(34, 120, 55, 0.88);
}

/* ─── 8. CARD BODY — MINIMALNA WERSJA DLA KATALOGU ───────────── */
.ed-product-card__body,
.ed-feat-card__body {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

/* ─── 9. TITLE ───────────────────────────────────────────────── */
.ed-product-card__title,
.ed-feat-card__title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ed-text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.ed-product-card__title a,
.ed-feat-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .25s;
}

.ed-product-card__title a:hover,
.ed-feat-card__title a:hover {
    color: var(--ed-gold);
}

/* ─── 10. DESCRIPTION ───────────────────────────────────────── */
.ed-product-card__desc {
    font-size: 14px;
    color: var(--ed-text-light);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── 11. DIMENSIONS TABLE ───────────────────────────────────── */
/* ed-feat-card__dims: tabela HTML <table>, ed-product-card__dims: flex div */
.ed-product-card__dims,
.ed-feat-card__dims {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    font-family: 'Inter', sans-serif;
}

.ed-feat-card__dims th,
.ed-feat-card__dims td {
    padding: 5px 0;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid #f0e8dc;
}

.ed-feat-card__dims th {
    color: #999;
    font-weight: 400;
    width: 90px;
}

.ed-feat-card__dims td {
    color: var(--ed-text);
    font-weight: 600;
}

.ed-product-card__dim-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0e8dc;
}

.ed-dim-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.ed-dim-val {
    font-size: 13px;
    color: var(--ed-text);
    font-weight: 600;
}

/* ─── 11a. VARIANTS — UKRYTE w katalogu ──────────────────────── */
.ed-product-variants {
    display: none;
}

/* ─── 12. PRICE — UKRYTA w katalogu ──────────────────────────── */
.ed-product-card__price {
    display: none;
}

/* ─── 13. INQUIRY BUTTON — pill shape, ciemny ────────────────── */
.ed-product-card__inquiry-btn {
    margin-top: auto;
    padding: 14px 24px;
    background: var(--ed-dark);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--ed-radius-pill);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.ed-product-card__inquiry-btn:hover:not(:disabled) {
    background: var(--ed-gold);
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(166, 124, 82, 0.35);
}

.ed-product-card__inquiry-btn.added {
    background: #2e7d32;
    color: #FFFFFF !important;
    cursor: default;
}

.ed-product-card__inquiry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── 14. SIDEBAR (hidden — floating cart is used instead) ──── */
.ed-catalog-sidebar {
    display: none;
}

/* ─── 15. „NIE ZNALAZŁEŚ?" CTA SECTION ──────────────────────── */
.ed-catalog-notfound {
    padding: 100px 24px;
    text-align: center;
    background: #FFFFFF;
}

.ed-catalog-notfound__inner {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

.ed-catalog-notfound__inner h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--ed-text);
    margin: 0 0 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.ed-catalog-notfound__inner h2 span {
    color: var(--ed-gold);
}

.ed-catalog-notfound__inner p {
    font-size: 16px;
    color: var(--ed-text-light);
    margin: 0 0 40px;
    line-height: 1.7;
}

.ed-nf-cta {
    display: inline-block;
    padding: 16px 52px;
    background: var(--ed-gold);
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--ed-radius-pill);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(166, 124, 82, 0.25);
    position: relative;
    z-index: 1;
}

.ed-nf-cta:hover {
    background: var(--ed-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: #FFFFFF !important;
}

/* ─── 16. FILTER BAR ──────────────────────────────────── */
.ed-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px 32px 16px;
    background: #fff;
    border-bottom: 1px solid #f0e8dc;
}

.ed-filter-btn {
    padding: 8px 22px;
    border: 1.5px solid #ddd;
    border-radius: 50px;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ed-filter-btn:hover {
    border-color: var(--ed-gold);
    color: #fff;
    background: var(--ed-gold);
}

.ed-filter-btn.active {
    background: var(--ed-dark);
    border-color: var(--ed-dark);
    color: #FFFFFF !important;
}

/* ─── 17. RESPONSIVE — Tablet (≤1024px, ale >768px) ───────────── */
@media (max-width: 1024px) {
    .ed-catalog-hero {
        min-height: 280px;
        margin: 0 16px;
    }

    .ed-catalog-hero__inner {
        padding: 0 40px 40px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ed-catalog-hero__sub {
        text-align: left;
        margin-top: 12px;
    }

    .ed-catalog-body {
        padding: 60px 20px;
    }

    /* 2 kolumny na tablecie — zachowane dla szerokości > 768px */
    .ed-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .ed-catalog-intro {
        padding: 60px 20px 20px;
        padding-right: 80px; /* przestrzeń na FAB */
    }
}

/* ─── 18. RESPONSIVE — Mobile (≤768px) ──────────────────────── */
@media (max-width: 768px) {
    .ed-catalog-hero {
        min-height: 240px;
        margin: 0 12px;
        border-radius: 0 0 16px 16px;
    }

    .ed-catalog-hero__inner {
        padding: 0 24px 28px;
    }

    .ed-catalog-hero__title {
        font-size: 42px;
    }

    .ed-catalog-hero__sub {
        font-size: 14px;
    }

    .ed-catalog-body {
        padding: 40px 16px;
    }

    /* Na mobile dalej 1 kolumna — grid zmniejszamy precyzyjnie */
    .ed-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .ed-product-card__body {
        padding: 18px 18px 14px;
    }

    .ed-catalog-intro {
        padding: 48px 70px 10px 16px; /* padding-right zostawia miejsce na FAB */
    }

    .ed-catalog-notfound {
        padding: 60px 16px;
    }

    /* Filter bar — poziomy scroll zamiast pionowego zawijania */
    .ed-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 16px 12px;
        gap: 8px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;
    }

    .ed-filter-bar::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
}

/* ─── 19. RESPONSIVE — Small Mobile (≤480px) ─────────────────── */
@media (max-width: 480px) {
    .ed-catalog-hero__title {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .ed-catalog-hero__inner {
        padding: 0 16px 20px;
    }

    .ed-product-card__title {
        font-size: 18px;
    }

    /* Na bardzo małym ekranie (< 480px) przejdź na 1 kolumnę */
    .ed-product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ed-catalog-intro {
        padding: 40px 60px 10px 16px;
    }
}