/* Catalogue tendeurs & terminaisons — styles UI (cartes, filtres, fil d'Ariane, lightbox) */

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

#tendeur-catalogue .section-intro {
    margin: -4px 0 16px;
    color: #666;
    font-size: 0.95rem;
    max-width: 72ch;
    line-height: 1.55;
}

#tendeur-catalogue h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    border-left: 4px solid var(--green-logo, #64b446);
    padding-left: 20px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tendeur-back-btn {
    display: inline-block;
    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;
    text-decoration: none;
    font-family: inherit;
}

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

.gamme-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.gamme-filter button {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #444;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.gamme-filter button:hover:not(:disabled) {
    border-color: var(--green-logo, #64b446);
    color: var(--green-logo, #64b446);
}

.gamme-filter button.active {
    background: #fff;
    border-color: var(--green-logo, #64b446);
    border-width: 2px;
    color: var(--green-logo, #64b446);
}

.gamme-filter button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tendeur-family-grid,
.tendeur-product-grid {
    display: grid;
    gap: 28px;
}

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

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

.tendeur-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;
}

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

.tendeur-pick-card .product-card-body {
    background: #fff;
    padding: 0 14px 16px;
    flex-grow: 1;
}

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

.tendeur-pick-card .product-img {
    height: 200px;
    background: #fff;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
}

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

.tendeur-pick-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.35s ease;
}

.tendeur-pick-card:hover .product-img img {
    transform: scale(1.03);
}

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

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

.tendeur-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);
}

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

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

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

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

.tendeur-detail-header.has-gallery .tendeur-detail-hero,
.tendeur-detail-hero.tendeur-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;
}

.tendeur-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;
}

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

#tendeur-detail-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: var(--anthracite, #333);
    line-height: 1.35;
}

#tendeur-detail-meta {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tendeur-table-scroll {
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    overflow: auto;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

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

.tendeur-catalog-table thead th {
    background: #fff;
    color: var(--anthracite, #333);
    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;
}

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

.tendeur-catalog-table tbody tr:hover {
    background: #fafafa;
}

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

.tendeur-col-nom {
    max-width: 220px;
    line-height: 1.35;
}

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

.tendeur-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;
}

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

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

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

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

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

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

.tendeur-detail-gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
}

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

.tendeur-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;
}

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

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

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

.tendeur-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;
}

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

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

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

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

.tendeur-lightbox-close,
.tendeur-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;
}

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

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

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

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

@media (max-width: 900px) {
    .tendeur-detail-header.has-gallery .tendeur-detail-hero,
    .tendeur-detail-hero.tendeur-detail-hero--gallery {
        max-width: min(340px, 100%);
    }
}

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

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

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

    .tendeur-lightbox-prev {
        left: 8px;
    }

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

/* Hero produit — image seule, sans cadre blanc derrière */
.tendeurs-product-hero.product-page-hero .product-gallery {
    height: auto;
    max-height: none;
    width: auto;
    max-width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    display: block;
}

.tendeurs-product-hero.product-page-hero .product-gallery img:not(.fil-hero-logo) {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 360px;
    object-fit: unset;
    object-position: center center;
    transform: none;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .tendeurs-product-hero.product-page-hero .product-gallery img:not(.fil-hero-logo) {
        max-height: 280px;
    }
}
