/* Catalogue filets — styles UI (cartes, navigation, tableaux) */

#fil-catalogue.specs-section.container {
    padding-top: 44px;
    padding-bottom: 48px;
}

.fil-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 18px;
    font-size: 0.88rem;
    color: #666;
}

.fil-breadcrumb button {
    border: none;
    background: none;
    padding: 0;
    color: var(--green-logo, #64b446);
    font-weight: 600;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.fil-breadcrumb button:hover {
    text-decoration: underline;
}

.fil-breadcrumb [aria-current="page"] {
    color: #333;
    font-weight: 600;
}

.fil-catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
}

.fil-search-input {
    flex: 1;
    min-width: 220px;
    max-width: 440px;
    padding: 10px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 0.9rem;
}

.fil-search-input:focus {
    outline: none;
    border-color: var(--green-logo, #64b446);
    box-shadow: 0 0 0 3px rgba(100, 180, 70, 0.2);
}

.fil-search-clear {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.fil-search-clear:hover {
    border-color: var(--green-logo, #64b446);
    color: var(--green-logo, #64b446);
}

.fil-search-results[hidden] {
    display: none !important;
}

.fil-search-meta {
    font-size: 0.88rem;
    color: #555;
    margin: 0 0 12px;
}

.fil-catalog-level {
    scroll-margin-top: 88px;
}

.fil-catalog-level[hidden] {
    display: none !important;
}

.fil-level-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--anthracite, #333);
    margin: 0 0 20px;
}

.fil-back-btn {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #444;
    border-radius: 999px;
    padding: 8px 16px;
    margin: 0 0 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.fil-back-btn:hover {
    border-color: var(--green-logo, #64b446);
    color: var(--green-logo, #64b446);
}

.fil-family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.fil-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.fil-pick-card {
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fil-pick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fil-pick-card .product-card-body {
    background: #fff;
    padding: 0 14px 16px;
}

.fil-pick-card:focus-visible {
    outline: 3px solid rgba(100, 180, 70, 0.45);
    outline-offset: 2px;
}

.fil-pick-card .product-img {
    height: 200px;
    background: #fff;
    margin-bottom: 0;
}

.fil-product-grid .fil-pick-card .product-img {
    height: 180px;
}

.fil-pick-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.fil-product-grid .product-card h3 {
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fil-pick-card .product-card-body p {
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: #666;
}

.fil-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #5a7d8f;
    background: linear-gradient(160deg, #eef4f8, #dce8ef);
}

.fil-detail-header {
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
}

@media (min-width: 993px) {
    .fil-detail-header:not(.has-gallery) {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 20px;
        align-items: center;
    }
}

.fil-detail-header.has-gallery {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    overflow: visible;
}

.fil-detail-header.has-gallery > div:not(.fil-detail-hero) {
    width: 100%;
    min-width: 0;
    order: 2;
}

.fil-detail-header.has-gallery .fil-detail-hero,
.fil-detail-hero.fil-detail-hero--gallery {
    order: 1;
    width: 100%;
    max-width: min(340px, 100%);
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
    border: none;
    background: transparent;
    margin: 0;
}

.fil-detail-hero {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fil-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.fil-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.fil-table-scroll {
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    overflow: auto;
    background: #fff;
}

.fil-catalog-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.fil-catalog-table thead th {
    background: #fff;
    border-bottom: 2px solid #e8e8e8;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    padding: 10px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.fil-catalog-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.fil-col-ref {
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .fil-detail-header,
    .fil-detail-header.has-gallery {
        align-items: flex-start;
        text-align: left;
    }

    .fil-detail-hero,
    .fil-detail-header.has-gallery .fil-detail-hero {
        margin: 0;
        max-width: min(340px, 100%);
    }

    .fil-detail-gallery {
        margin: 0;
    }
}

/* Hero page filets — desktop : image à gauche du texte */
@media (min-width: 993px) {
    .filets-product-hero.product-page-hero .product-gallery {
        position: relative;
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        justify-self: start;
    }
}

/* Hero page filets — même visuel que la carte d'accueil (filet.png + logo) */
.filets-product-hero.product-page-hero .product-gallery {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.filets-product-hero.product-page-hero .product-gallery .fil-hero-photo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 360px;
    object-fit: unset;
    object-position: center center;
    transform: none;
    border-radius: 0;
    box-shadow: none;
}

.filets-product-hero.product-page-hero .product-gallery .fil-hero-logo {
    position: absolute;
    left: 12px;
    bottom: 8px;
    width: 68px;
    max-width: 28%;
    height: auto;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.95;
}

.fil-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.fil-detail-gallery-main {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    max-height: 220px;
    font: inherit;
}

.fil-detail-gallery-main img.fil-img--zoom,
.fil-detail-gallery-main > img:first-of-type {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
}

.fil-detail-gallery-logo {
    position: absolute;
    left: 10px;
    bottom: 8px;
    width: 68px;
    max-width: 32%;
    height: auto;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.92;
    z-index: 1;
}

.fil-detail-gallery-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
}

.fil-detail-gallery-thumb {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    font: inherit;
}

.fil-detail-gallery-thumb.is-active {
    border-color: var(--green-logo, #64b446);
}

.fil-detail-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

.fil-img--zoom {
    transform: scale(1.05);
    transform-origin: center center;
}

.fil-detail-gallery-hint {
    font-size: 0.78rem;
    color: #888;
    margin: 6px 0 0;
}

.fil-detail-gallery-main {
    border: none;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.fil-detail-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fil-detail-gallery-thumb {
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px;
    background: #fff;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.fil-detail-gallery-thumb.is-active {
    border-color: var(--green-logo, #64b446);
}

.fil-detail-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fil-photo-cell {
    width: 100px;
    padding: 8px !important;
}

.fil-photo-slot {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    border: 1px dashed #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fil-photo-ph {
    font-size: 0.65rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

.fil-photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.fil-photo-img.is-visible {
    display: block;
}

.fil-photo-slot.has-photo .fil-photo-ph {
    display: none;
}

.fil-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fil-lightbox[hidden] {
    display: none !important;
}

.fil-lightbox-panel {
    position: relative;
    max-width: min(920px, 96vw);
    max-height: 92vh;
    width: 100%;
}

.fil-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.fil-lightbox-caption {
    color: #eee;
    text-align: center;
    margin: 12px 0 0;
    font-size: 0.9rem;
}

.fil-lightbox-close,
.fil-lightbox-nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.fil-lightbox-close:hover,
.fil-lightbox-nav:hover {
    background: #fff;
    color: var(--green-logo, #64b446);
}

.fil-lightbox-close {
    top: -12px;
    right: -12px;
}

.fil-lightbox-prev {
    left: -56px;
    top: 50%;
    transform: translateY(-50%);
}

.fil-lightbox-next {
    right: -56px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .fil-lightbox-prev {
        left: 8px;
    }

    .fil-lightbox-next {
        right: 8px;
    }

    .filets-product-hero.product-page-hero .product-gallery .fil-hero-photo {
        max-height: none;
    }
}
