/* ==========================================================================
   PDC Shop Archive - Page Boutique
   Barre catégories horizontale + produits en liste horizontale
   ========================================================================== */

/* --------------------------------------------------------------------------
   BANNER H1 GRADIENT
   -------------------------------------------------------------------------- */

.shop-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    overflow: hidden;
    width: 100%;
}

.shop-banner--gradient {
    background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary) 40%, var(--color-primary-hover) 100%);
}

.shop-banner__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 1200px;
    width: 100%;
}

.shop-banner__title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.shop-banner__content .term-description,
.shop-banner__content .page-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-top: 10px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   FIL D'ARIANE
   -------------------------------------------------------------------------- */

.shop-archive-breadcrumb-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 0;
}

.shop-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.shop-breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-breadcrumb__item::after {
    content: '/';
    color: var(--color-text-muted, #999);
    margin-left: 4px;
}

.shop-breadcrumb__item:last-child::after {
    display: none;
}

.shop-breadcrumb__item a {
    color: var(--color-text-secondary, #666);
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-breadcrumb__item a:hover {
    color: var(--color-primary, #ffb606);
}

.shop-breadcrumb__item--current {
    color: var(--color-text-muted, #999);
}

/* --------------------------------------------------------------------------
   CONTENEUR PRINCIPAL (1100px comme page produit)
   -------------------------------------------------------------------------- */

.shop-archive-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* --------------------------------------------------------------------------
   DESCRIPTION CATÉGORIE (bas de page, SEO)
   -------------------------------------------------------------------------- */

.shop-archive-description {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 10px;
    border-top: 1px solid var(--color-border, #eee);
}

.shop-archive-description__content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-secondary, #666);
}

.shop-archive-description__content p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   FILTRE MARQUES
   -------------------------------------------------------------------------- */

.pdc-brand-filter {
    margin-bottom: 15px;
    padding: 12px 0;
}

.pdc-brand-filter__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary, #666);
    margin: 0 0 10px 0;
}

.pdc-brand-filter__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pdc-brand-filter__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 20px;
    background: var(--color-bg, #fff);
    font-size: 13px;
    color: var(--color-text-secondary, #555);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pdc-brand-filter__item:hover {
    border-color: var(--color-primary, #ffb606);
    color: var(--color-primary, #ffb606);
}

.pdc-brand-filter__item input[type="checkbox"] {
    display: none;
}

.pdc-brand-filter__item.is-checked {
    background: var(--color-primary, #ffb606);
    border-color: var(--color-primary, #ffb606);
    color: #fff;
}

.pdc-brand-filter__count {
    font-size: 11px;
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   MARQUE SUR CARD PRODUIT
   -------------------------------------------------------------------------- */

.pdc-product-row__brand {
    display: inline-block;
    font-size: 12px;
    color: var(--color-text-muted, #999);
    margin-bottom: 4px;
}

.pdc-product-row__brand a {
    color: var(--color-text-muted, #999);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pdc-product-row__brand a:hover {
    color: var(--color-primary, #ffb606);
}

/* --------------------------------------------------------------------------
   OVERRIDE EDUMA : supprimer fond gris du conteneur switch-layout
   -------------------------------------------------------------------------- */

.thim-product-switch-wrap.switch-layout-container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    display: none !important;
}

/* --------------------------------------------------------------------------
   BARRE CATÉGORIES
   -------------------------------------------------------------------------- */

.pdc-shop-categories {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    margin-bottom: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    cursor: grab;
    user-select: none;
}

/* Masquer la scrollbar native */
.pdc-shop-categories::-webkit-scrollbar {
    display: none;
}

.pdc-shop-categories {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pdc-shop-categories.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.pdc-shop-cat-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 8px 20px;
    border: 2px solid var(--color-border, #ddd);
    border-radius: 25px;
    background: var(--color-bg, #fff);
    color: var(--color-text, #333);
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pdc-shop-cat-item:hover {
    border-color: var(--color-primary, #ffb606);
    color: var(--color-primary, #ffb606);
    background: var(--color-bg-secondary, #fff9ea);
}

.pdc-shop-cat-item.active {
    background: var(--color-primary, #ffb606);
    border-color: var(--color-primary, #ffb606);
    color: #fff;
}

.pdc-shop-cat-item .pdc-cat-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 400;
}

.pdc-shop-cat-item.active .pdc-cat-count {
    background: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   SOUS-CATÉGORIES
   -------------------------------------------------------------------------- */

.pdc-shop-subcategories {
    display: flex;
    gap: 8px;
    padding: 0;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.pdc-shop-subcategories::-webkit-scrollbar {
    display: none;
}

.pdc-shop-subcategories {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pdc-shop-subcategories.is-visible {
    max-height: 60px;
    opacity: 1;
    margin-bottom: 20px;
    padding: 5px 0;
}

.pdc-shop-subcat-item {
    flex-shrink: 0;
    padding: 6px 16px;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 20px;
    background: var(--color-bg-secondary, #f8f8f8);
    color: var(--color-text-secondary, #555);
    font-family: Arial, sans-serif;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pdc-shop-subcat-item:hover {
    border-color: var(--color-primary, #ffb606);
    color: var(--color-primary, #ffb606);
}

.pdc-shop-subcat-item.active {
    background: var(--color-bg-tertiary, #fff3d4);
    border-color: var(--color-primary, #ffb606);
    color: var(--color-primary, #d49500);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   SECTIONS PAR CATÉGORIE (page d'accueil boutique)
   -------------------------------------------------------------------------- */

.pdc-shop-section {
    margin-bottom: 40px;
}

.pdc-shop-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary, #ffb606);
}

.pdc-shop-section__title {
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text, #333);
    margin: 0;
}

.pdc-shop-section__see-all {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: var(--color-primary, #ffb606);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.pdc-shop-section__see-all:hover {
    color: var(--color-primary-hover, #e6a400);
}

.pdc-shop-section__see-all::after {
    content: ' →';
}

/* --------------------------------------------------------------------------
   PRODUCT ROW (card horizontale)
   -------------------------------------------------------------------------- */

.pdc-product-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #eee);
    border-radius: 8px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pdc-product-row:hover {
    border-color: var(--color-border-dark, #ddd);
    box-shadow: var(--shadow-md, 0 2px 12px rgba(0, 0, 0, 0.06));
}

/* Image */
.pdc-product-row__image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.pdc-product-row__image a {
    display: block;
    width: 100%;
    height: 100%;
}

.pdc-product-row__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Info (nom + description + prix) */
.pdc-product-row__info {
    flex: 1;
    min-width: 0;
}

.pdc-product-row__info h3 {
    margin: 0 0 6px 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.pdc-product-row__info h3 a {
    color: var(--color-text, #333);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pdc-product-row__info h3 a:hover {
    color: var(--color-primary, #ffb606);
}

.pdc-product-row__desc {
    margin: 0 0 8px 0;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: var(--color-text-secondary, #777);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Note / Avis */
.pdc-product-row__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.pdc-product-row__stars {
    display: inline-flex;
    gap: 1px;
    color: var(--color-primary, #ffb606);
    font-size: 14px;
    line-height: 1;
}

.pdc-product-row__stars .star-empty {
    color: var(--color-border, #ddd);
}

.pdc-product-row__rating-text {
    color: var(--color-text-muted, #999);
    font-size: 12px;
}

/* Prix */
.pdc-product-row__price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text, #333);
}

.pdc-product-row__price del {
    color: var(--color-text-muted, #999);
    font-weight: 400;
    font-size: 13px;
}

.pdc-product-row__price ins {
    text-decoration: none;
    color: var(--color-text, #333);
}

/* Capsule prix final (vert, cliquable pour copier le code) */
.pdc-product-row__final-price {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #90c090;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pdc-product-row__final-price:hover {
    background: #7db87d;
}

.pdc-product-row__final-price-label {
    font-weight: 400;
    font-size: 11px;
    opacity: 0.9;
}

.pdc-product-row__final-price-label strong {
    font-weight: 700;
    font-size: 12px;
}

/* Prix partenaire (prix de base) */
.pdc-product-row__base-price {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--color-text, #333);
    font-weight: 600;
}

.pdc-product-row__base-price-label {
    font-size: 11px;
    color: var(--color-text-muted, #999);
    font-weight: 400;
}

/* Actions (boutons) */
.pdc-product-row__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 160px;
}

/* Boutons */
.pdc-product-row .pdc-btn-view,
.pdc-product-row .pdc-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdc-product-row .pdc-btn-view {
    background: var(--color-bg, #fff);
    color: var(--color-primary, #ffb606);
    border: 2px solid var(--color-primary, #ffb606);
}

.pdc-product-row .pdc-btn-view:hover {
    background: var(--color-bg-secondary, #fff9ea);
    border-color: var(--color-primary-hover, #e6a400);
    color: var(--color-primary-hover, #e6a400);
}

.pdc-product-row .pdc-btn-buy {
    background: #16a34a;
    color: #fff;
    border: 2px solid #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.pdc-product-row .pdc-btn-buy:hover {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

/* --------------------------------------------------------------------------
   CONTENU PRINCIPAL
   -------------------------------------------------------------------------- */

.pdc-shop-content {
    min-height: 200px;
    position: relative;
}

.pdc-shop-content.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.pdc-shop-loader {
    display: none;
    text-align: center;
    padding: 40px 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: var(--color-text-muted, #999);
}

.pdc-shop-content.is-loading .pdc-shop-loader {
    display: block;
}

.pdc-shop-no-products {
    text-align: center;
    padding: 40px 20px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    color: var(--color-text-muted, #999);
}

/* Pagination */
.pdc-shop-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding: 20px 0;
}

.pdc-shop-pagination a,
.pdc-shop-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: var(--color-text-secondary, #666);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdc-shop-pagination a:hover {
    border-color: var(--color-primary, #ffb606);
    color: var(--color-primary, #ffb606);
}

.pdc-shop-pagination span.current {
    background: var(--color-primary, #ffb606);
    border-color: var(--color-primary, #ffb606);
    color: #fff;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   TOAST (copie code promo)
   -------------------------------------------------------------------------- */

.pdc-promo-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--color-bg-tertiary, #333);
    color: var(--color-text, #fff);
    font-family: Arial, sans-serif;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.2));
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.pdc-promo-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   MODE NUIT - Overrides spécifiques
   -------------------------------------------------------------------------- */

[data-theme="dark"] .pdc-shop-cat-item .pdc-cat-count {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pdc-shop-subcat-item.active {
    background: var(--color-bg-tertiary);
    color: var(--color-primary);
}

[data-theme="dark"] .pdc-product-row__image img {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .pdc-promo-toast {
    background: var(--color-bg-tertiary);
    color: #f5f5f5;
    border: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .shop-banner {
        min-height: 160px;
    }

    .shop-banner__title {
        font-size: 1.6rem;
    }

    .shop-banner__content {
        padding: 30px 15px;
    }

    .shop-archive-container {
        padding: 15px;
    }

    .shop-archive-breadcrumb-wrapper {
        padding: 12px 15px 0;
    }

    .shop-breadcrumb__list {
        font-size: 12px;
    }

    .shop-archive-description {
        padding: 20px 15px 10px;
    }

    .pdc-brand-filter__list {
        gap: 6px;
    }

    .pdc-brand-filter__item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .pdc-shop-categories {
        padding: 10px 0;
        gap: 8px;
    }

    .pdc-shop-cat-item {
        padding: 6px 14px;
        font-size: 13px;
    }

    .pdc-shop-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pdc-shop-section__title {
        font-size: 18px;
    }

    /* Product row → stack vertical sur mobile */
    .pdc-product-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .pdc-product-row__image {
        width: 100%;
        height: 180px;
    }

    .pdc-product-row__image img {
        object-fit: contain;
    }

    .pdc-product-row__info {
        width: 100%;
    }

    .pdc-product-row__info h3 {
        font-size: 15px;
    }

    .pdc-product-row__actions {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .pdc-product-row .pdc-btn-view,
    .pdc-product-row .pdc-btn-buy {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .pdc-product-row__image {
        height: 150px;
    }
}
