/**
 * WP Vendor Nexus - Frontend Shop Styles
 * BreakDay Design System v2.2
 *
 * Styles pour l'affichage des boutiques sur le frontend.
 *
 * @package MarketPlace\Nexus
 * @since 1.0.0
 */

/* Design tokens are loaded as a dependency via wp_enqueue_style */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACCENT COLOR OVERRIDE
   La variable --nx-accent-color est injectée inline par le layout.
   Elle remplace la couleur primaire pour les éléments interactifs.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-front[style*="--nx-accent-color"] .nx-shop-front-tier {
    background: var(--nx-accent-color);
    color: var(--bd-white, #fff);
    border-color: var(--nx-accent-color);
}

/* Accent color on WooCommerce product prices */
.nx-shop-front[style*="--nx-accent-color"] ul.products li.product .price {
    color: var(--nx-accent-color);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VARIABLES - Nexus / BreakDay v2.2
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    --nx-primary: var(--bd-y);
    --nx-primary-hover: var(--bd-dark);
    --nx-secondary: var(--bd-mgray);
    --nx-success: var(--bd-ok);
    --nx-warning: var(--bd-y);
    --nx-text: var(--bd-dark);
    --nx-text-light: var(--bd-mgray);
    --nx-bg: var(--bd-white);
    --nx-bg-light: var(--bd-lgray);
    --nx-bg-dark: #1a1a1d;
    --nx-text-dark: #f5f5f5;
    --nx-border-dark: #333333;
    --nx-border: var(--bd-border);
    --nx-shadow: var(--bd-shadow-card);
    --nx-shadow-lg: var(--bd-shadow-lg);
    --nx-radius: var(--bd-r-input);
    --nx-radius-lg: var(--bd-r-card);
    --nx-transition: 0.2s ease;
    --nx-container-width: 1400px;
    --nx-gap: 24px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT DEFAULT.PHP — Classes .nx-shop-front-*
   Styles de base pour le layout unifié des boutiques vendeurs.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nx-shop-front {
    max-width: var(--nx-container-width, 1400px);
    margin: 0 auto;
    padding: 0 20px 60px;
    font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    color: var(--nx-text, var(--bd-dark));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.nx-shop-front.nx-theme-light {
    background-color: var(--nx-bg, var(--bd-white));
}

.nx-shop-front-banner {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    margin-bottom: 0;
}

.nx-shop-front-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nx-shop-front-header {
    padding: 32px 0 24px;
}

/* Logo vendeur — arrondi neutre (pas de jaune) */
.nx-shop-front-logo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--bd-r-sm);
    border: 3px solid var(--bd-white);
    box-shadow: var(--bd-shadow-card);
    margin-bottom: 16px;
}

.nx-shop-front-name {
    font-size: var(--bd-fs-t1);
    font-weight: var(--font-weight-bold, 700);
    margin: 0 0 8px;
    color: var(--nx-text, var(--bd-dark));
    line-height: 1.2;
}

/* Badge tier — zone vendeur, primitives neutres uniquement */
.nx-shop-front-tier {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--bd-fs-cap);
    font-weight: var(--font-weight-bold, 700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--bd-r-pill);
    border: 1px solid var(--bd-border);
    margin-bottom: 8px;
}

.nx-shop-front-count {
    display: block;
    font-size: var(--bd-fs-bs);
    color: var(--bd-mgray);
    margin-bottom: 8px;
}

.nx-shop-front-bio {
    font-size: var(--bd-fs-b);
    line-height: 1.6;
    color: var(--bd-mgray);
    max-width: 680px;
    padding: 16px 0;
}

/* État vide — chrome BreakDay */
.nx-shop-front-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--bd-white);
    border-radius: var(--bd-r-card);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow-card);
    color: var(--bd-mgray);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT DE BASE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-page {
    background-color: var(--bd-lgray);
    font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    color: var(--nx-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.nx-shop-article {
    margin: 0;
    padding: 0;
}

.nx-container {
    max-width: var(--nx-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BANNIÈRE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-banner-section {
    position: relative;
    margin-bottom: 0;
}

.nx-shop-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.nx-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, color-mix(in srgb, var(--bd-dark) 30%, transparent));
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   EN-TÊTE DE LA BOUTIQUE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-header-section {
    background: var(--bd-white);
    padding: 40px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--bd-border);
}

.nx-shop-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: start;
}

/* Logo */
.nx-shop-logo-wrapper {
    flex-shrink: 0;
}

/* Logo vendeur — arrondi neutre */
.nx-shop-logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--bd-r-sm);
    box-shadow: var(--bd-shadow-card);
    border: 4px solid var(--bd-white);
    margin-top: -60px;
    background: var(--bd-white);
}

/* Contenu */
.nx-shop-header-content {
    flex: 1;
}

.nx-shop-title {
    margin: 0 0 12px 0;
    font-size: var(--bd-fs-hl);
    font-weight: var(--font-weight-bold, 700);
    color: var(--bd-dark);
    line-height: 1.2;
}

.nx-shop-description {
    margin: 0 0 16px 0;
    font-size: var(--bd-fs-b);
    line-height: 1.6;
    color: var(--bd-mgray);
}

.nx-shop-stats {
    display: flex;
    gap: 24px;
    font-size: var(--bd-fs-bs);
    color: var(--bd-mgray);
}

.nx-stat strong {
    color: var(--bd-dark);
    margin-right: 4px;
}

/* Carte de contact — chrome BreakDay (pas d'accent vendeur ici) */
.nx-shop-contact-card {
    background: var(--bd-lgray);
    padding: 20px;
    border-radius: var(--bd-r-card);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow-card);
    min-width: 250px;
}

.nx-contact-title {
    margin: 0 0 16px 0;
    font-size: var(--bd-fs-b);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--bd-dark);
}

.nx-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px 0;
    font-size: var(--bd-fs-bs);
    color: var(--bd-mgray);
}

.nx-contact-item:last-child {
    margin-bottom: 0;
}

.nx-contact-item a {
    color: var(--bd-dark);
    text-decoration: none;
    font-weight: var(--font-weight-semibold, 600);
}

.nx-contact-item a:hover {
    text-decoration: underline;
    color: var(--bd-dark);
}

.nx-icon {
    font-size: var(--bd-fs-b);
    width: 20px;
    text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION PRODUITS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-products-section {
    padding: 0 0 60px 0;
}

.nx-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.nx-products-title {
    margin: 0;
    font-size: var(--bd-fs-t1);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--bd-dark);
}

.nx-products-count {
    font-weight: 400;
    color: var(--bd-mgray);
}

/* Select de tri — chrome BreakDay */
.nx-sort-select {
    padding: 10px 16px;
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-r-input);
    background: var(--bd-white);
    font-size: var(--bd-fs-bs);
    color: var(--bd-dark);
    cursor: pointer;
    font-family: var(--font-sans, 'Inter', sans-serif);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GRILLE DE PRODUITS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-products-grid {
    display: grid;
    gap: var(--nx-gap);
}

/* Intégration WooCommerce dans le layout boutique */
.nx-shop-front ul.products {
    display: grid;
    gap: var(--nx-gap, 1.5rem);
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.nx-shop-front ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
.nx-shop-front ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.nx-shop-front ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }

/* Boutons WooCommerce — accent vendeur (pas le jaune BreakDay) */
.nx-shop-front .button,
.nx-shop-front .added_to_cart,
.nx-shop-front a.button {
    background-color: var(--nx-accent-color, var(--bd-dark)) !important;
    color: var(--bd-white) !important;
    border-radius: var(--bd-r-pill) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARTE PRODUIT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Zone vendeur — primitives neutres uniquement, pas de --bd-y */
.nx-product-card {
    background: var(--bd-white);
    border-radius: var(--bd-r-card);
    overflow: hidden;
    box-shadow: var(--bd-shadow-card);
    border: 1px solid var(--bd-border);
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition), transform var(--nx-transition);
}

.nx-product-card:hover {
    border-color: var(--bd-border-strong);
    box-shadow: var(--bd-shadow-card);
    transform: translateY(-2px);
}

/* Image */
.nx-product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bd-lgray);
}

.nx-product-link {
    display: block;
    width: 100%;
    height: 100%;
}

.nx-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--nx-transition);
}

.nx-product-card:hover .nx-product-image {
    transform: scale(1.05);
}

.nx-product-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 48px;
    color: var(--bd-border);
}

/* Badge — zone vendeur */
.nx-product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: var(--bd-fs-cap);
    font-weight: var(--font-weight-bold, 700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--bd-r-pill);
    color: var(--bd-white);
}

.nx-badge-outofstock {
    background: var(--bd-err);
}

/* Informations */
.nx-product-info {
    padding: 20px;
}

.nx-product-categories {
    font-size: var(--bd-fs-cap);
    font-weight: var(--font-weight-bold, 700);
    color: var(--bd-mgray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.nx-product-title {
    margin: 0 0 12px 0;
    font-size: var(--bd-fs-b);
    font-weight: var(--font-weight-semibold, 600);
    line-height: 1.4;
}

.nx-product-title a {
    color: var(--bd-dark);
    text-decoration: none;
}

.nx-product-title a:hover {
    color: var(--bd-mgray);
}

.nx-product-price {
    font-size: var(--bd-fs-bl);
    font-weight: var(--font-weight-bold, 700);
    color: var(--bd-dark);
    margin-bottom: 16px;
    font-family: var(--font-sans);
}

.nx-product-price del {
    color: var(--bd-mgray);
    font-weight: 400;
    font-size: var(--bd-fs-bs);
    margin-right: 8px;
}

.nx-product-price ins {
    text-decoration: none;
    color: var(--bd-err);
}

/* Boutons — zone vendeur, accent vendeur ou neutre */
.nx-product-actions {
    display: flex;
    gap: 10px;
}

.nx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: var(--bd-fs-bs);
    font-weight: var(--font-weight-semibold, 600);
    text-decoration: none;
    border-radius: var(--bd-r-pill);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--nx-transition);
    flex: 1;
    font-family: var(--font-sans, 'Inter', sans-serif);
}

/* Bouton primaire — accent vendeur, primitives neutres en fallback */
.nx-btn-primary {
    background: var(--nx-accent-color, var(--bd-dark));
    color: var(--bd-white);
    border-color: transparent;
}

.nx-btn-primary:hover {
    background: var(--nx-accent-color, var(--bd-dark));
    border-color: var(--bd-dark);
    color: var(--bd-white);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ÉTATS VIDES ET ERREURS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-no-products,
.nx-shop-error {
    text-align: center;
    padding: 60px 20px;
    background: var(--bd-white);
    border-radius: var(--bd-r-card);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow-card);
}

.nx-no-products p,
.nx-shop-error p {
    margin: 0;
    font-size: var(--bd-fs-b);
    color: var(--bd-mgray);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTENU PERSONNALISÉ
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-content-section {
    padding: 40px 0;
}

.nx-shop-custom-content {
    background: var(--bd-white);
    padding: 30px;
    border-radius: var(--bd-r-card);
    box-shadow: var(--bd-shadow-card);
    border: 1px solid var(--bd-border);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VARIANTES HEADER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Header centré */
.nx-shop-front-header.nx-header-centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header aligné à gauche */
.nx-shop-front-header.nx-header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.nx-header-left .nx-shop-front-name {
    margin: 0;
    flex: 1;
}

.nx-header-left .nx-shop-front-tier,
.nx-header-left .nx-shop-front-count {
    display: inline;
}

/* Header pleine largeur (full-bleed) */
.nx-shop-front-header.nx-header-full-bleed {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: var(--bd-white);
    background: var(--bd-dark);
    overflow: hidden;
}

/* Bannière intégrée dans le header full-bleed (en arrière-plan absolu) */
.nx-header-full-bleed > .nx-shop-front-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.nx-header-full-bleed > .nx-shop-front-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

/* Overlay sombre sur la bannière full-bleed */
.nx-header-full-bleed > .nx-shop-front-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--bd-dark) 60%, transparent);
    pointer-events: none;
}

/* Tous les éléments du header au-dessus de la bannière */
.nx-header-full-bleed > .nx-shop-front-logo,
.nx-header-full-bleed > .nx-shop-front-name,
.nx-header-full-bleed > .nx-shop-front-tier,
.nx-header-full-bleed > .nx-shop-front-count,
.nx-header-full-bleed > .nx-shop-front-bio {
    position: relative;
    z-index: 1;
}

.nx-header-full-bleed .nx-shop-front-name {
    color: var(--bd-white);
}

.nx-header-full-bleed .nx-shop-front-tier,
.nx-header-full-bleed .nx-shop-front-count {
    color: rgba(255, 255, 255, 0.7);
}

.nx-header-full-bleed .nx-shop-front-bio {
    color: rgba(255, 255, 255, 0.7);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   THÈME SOMBRE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-shop-front.nx-theme-dark {
    background-color: var(--dark-bg, #0a0a0b);
    color: var(--bd-white);
}

.nx-theme-dark .nx-shop-front-header {
    background: transparent;
}

.nx-theme-dark .nx-shop-front-name {
    color: var(--bd-white);
}

.nx-theme-dark .nx-shop-front-bio {
    color: rgba(255, 255, 255, 0.7);
}

.nx-theme-dark .nx-shop-front-tier {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bd-white);
}

/* Dark theme adjustments for WooCommerce elements */
.nx-theme-dark ul.products li.product {
    color: var(--nx-text-dark, #f5f5f5);
}
.nx-theme-dark ul.products li.product a {
    color: inherit;
}
.nx-theme-dark .woocommerce-result-count,
.nx-theme-dark .woocommerce-ordering select {
    color: var(--nx-text-dark, #f5f5f5);
    background: var(--nx-bg-dark, #1a1a1a);
    border-color: var(--nx-border-dark, #333);
}

.nx-theme-dark .nx-shop-front-empty {
    background: var(--dark-card, #151517);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.nx-theme-dark .nx-shop-front-count {
    color: rgba(255, 255, 255, 0.5);
}

/* Thème sombre — template complet (shop-template.php) */
.nx-theme-dark.content-area,
.nx-theme-dark .nx-shop-header-section {
    background-color: var(--dark-bg, #0a0a0b);
    color: var(--bd-white);
}

.nx-theme-dark .nx-shop-title {
    color: var(--bd-white);
}

.nx-theme-dark .nx-shop-description {
    color: rgba(255, 255, 255, 0.7);
}

.nx-theme-dark .nx-shop-stats {
    color: rgba(255, 255, 255, 0.7);
}

.nx-theme-dark .nx-shop-stats .nx-stat strong {
    color: var(--bd-white);
}

.nx-theme-dark .nx-shop-products-section {
    background-color: var(--dark-bg, #0a0a0b);
}

.nx-theme-dark .nx-products-title {
    color: var(--bd-white);
}

.nx-theme-dark .nx-product-card {
    background: var(--dark-card, #151517);
    border-color: rgba(255, 255, 255, 0.1);
}

.nx-theme-dark .nx-product-card:hover {
    border-color: var(--bd-white);
    box-shadow: var(--bd-shadow-card);
}

.nx-theme-dark .nx-product-title a {
    color: var(--bd-white);
}

.nx-theme-dark .nx-product-price {
    color: var(--bd-white);
}

.nx-theme-dark .nx-product-categories {
    color: rgba(255, 255, 255, 0.5);
}

.nx-theme-dark .nx-no-products {
    background: var(--dark-card, #151517);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.nx-theme-dark .nx-shop-contact-card {
    background: var(--dark-card, #151517);
    border-color: rgba(255, 255, 255, 0.1);
}

.nx-theme-dark .nx-contact-title {
    color: var(--bd-white);
}

.nx-theme-dark .nx-contact-item {
    color: rgba(255, 255, 255, 0.7);
}

.nx-theme-dark .nx-contact-item a {
    color: var(--bd-white);
}

.nx-theme-dark .nx-sort-select {
    background: var(--dark-card, #151517);
    color: var(--bd-white);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {

    .nx-shop-header {
        grid-template-columns: auto 1fr;
    }

    .nx-shop-contact-card {
        grid-column: 1 / -1;
        margin-top: 20px;
    }
}

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

    .nx-shop-logo {
        width: 80px;
        height: 80px;
        margin-top: -40px;
        border-radius: var(--bd-r-sm);
    }

    .nx-shop-title {
        font-size: var(--bd-fs-t1);
    }

    .nx-shop-front ul.products.columns-3,
    .nx-shop-front ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nx-shop-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nx-shop-logo-wrapper {
        display: flex;
        justify-content: center;
    }

    .nx-shop-stats {
        justify-content: center;
    }

    .nx-products-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .nx-shop-front ul.products {
        grid-template-columns: 1fr;
    }

    .nx-shop-header-section {
        padding: 30px 0;
    }

    .nx-products-title {
        font-size: var(--bd-fs-t2);
    }

    .nx-header-left {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .nx-header-full-bleed {
        padding: 40px 16px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACCESSIBILITÉ
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
    .nx-product-card,
    .nx-product-image,
    .nx-btn {
        transition: none;
    }

    .nx-product-card:hover {
        transform: none;
    }

    .nx-product-card:hover .nx-product-image {
        transform: none;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT MASONRY (CSS columns natif)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nx-layout-masonry .nx-products-grid {
    display: block;
    columns: 3 280px;
    column-gap: var(--nx-gap);
}

.nx-layout-masonry .nx-product-card {
    break-inside: avoid;
    margin-bottom: var(--nx-gap);
    display: inline-block;
    width: 100%;
}

@media (max-width: 768px) {
    .nx-layout-masonry .nx-products-grid {
        columns: 2 200px;
    }
}

@media (max-width: 480px) {
    .nx-layout-masonry .nx-products-grid {
        columns: 1;
    }
}

/* Focus visible (WCAG AAA — contraste 21:1) */
.nx-btn:focus-visible,
.nx-product-title a:focus-visible,
.nx-sort-select:focus-visible,
.nx-product-link:focus-visible,
.nx-contact-item a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bd-dark);
}

/* ─── Grille produits universelle (partials/products-section.php) ─── */
.nx-shop-front-products .nxt-product-grid,
.nx-shop-front-products.nxt-product-grid {
    --nxt-cols: 3;
    display: grid !important;
    grid-template-columns: repeat(var(--nxt-cols), minmax(0, 1fr)) !important;
    gap: 1.5rem;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}
.nx-shop-front-products .nxt-product-grid[data-columns="1"] { --nxt-cols: 1; }
.nx-shop-front-products .nxt-product-grid[data-columns="2"] { --nxt-cols: 2; }
.nx-shop-front-products .nxt-product-grid[data-columns="3"] { --nxt-cols: 3; }
.nx-shop-front-products .nxt-product-grid[data-columns="4"] { --nxt-cols: 4; }
.nx-shop-front-products .nxt-product-grid[data-columns="5"] { --nxt-cols: 5; }
.nx-shop-front-products .nxt-product-grid[data-columns="6"] { --nxt-cols: 6; }

.nx-shop-front-products .nxt-product-card {
    width: auto !important;
    max-width: none !important;
    float: none !important;
    margin: 0 !important;
}

@media (max-width: 900px) {
    .nx-shop-front-products .nxt-product-grid { --nxt-cols: 2 !important; }
}
@media (max-width: 520px) {
    .nx-shop-front-products .nxt-product-grid { --nxt-cols: 1 !important; }
}

.nxt-product-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}
.nxt-product-card:hover { transform: translateY(-2px); }

.nxt-product-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bd-lgray);
    border-radius: var(--bd-r-sm);
    margin-bottom: .75rem;
}
.nxt-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nxt-product-card__img--placeholder {
    display: block;
    width: 100%;
    height: 100%;
}
.nxt-product-card__body { display: flex; flex-direction: column; gap: .25rem; }
.nxt-product-card__title { font-size: var(--bd-fs-b); margin: 0; font-weight: var(--font-weight-medium, 500); }
.nxt-product-card__price { font-size: var(--bd-fs-bs); opacity: .85; }

.nx-shop-front-products {
    padding: 3rem clamp(20px, 5vw, 80px);
    width: 100%;
    box-sizing: border-box;
}
.nx-shop-front-products__title {
    margin: 0 0 1.5rem;
    font-size: clamp(1.5rem, 2.2vw, 2rem);
}
.nx-shop-front-products__pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BADGE LOYALTY — Boutique publique (perk débloqué dès le rang Challenger)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nx-shop-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    margin-top: 8px;
    border-radius: var(--bd-r-pill);
    font-family: var(--bd-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

.nx-shop-rank-badge__symbol {
    font-size: 14px;
    line-height: 1;
}

/* Challenger : neutre clair, premier débloquage */
.nx-shop-rank-badge--challenger {
    background: var(--bd-lgray);
    color: var(--bd-dark);
    border: 1px solid var(--bd-border-strong);
}

/* Élite : doré (warn token) sur fond doux */
.nx-shop-rank-badge--elite {
    background: var(--bd-warn-soft);
    color: var(--bd-warn-text);
    border: 1px solid var(--bd-warn);
}

/* Diamond : noir profond, premium */
.nx-shop-rank-badge--diamond {
    background: var(--bd-dark);
    color: var(--bd-white);
    border: 1px solid var(--bd-dark);
}

/* BreakDay OG : gradient doré, ultra-premium */
.nx-shop-rank-badge--og {
    background: linear-gradient(135deg, #FFD60A 0%, #B8860B 50%, #FFCC00 100%);
    color: var(--bd-dark);
    border: 1px solid #B8860B;
    box-shadow: 0 0 0 1px rgba(184, 134, 11, 0.3), 0 4px 12px rgba(255, 204, 0, 0.25);
}

/* Sur fond sombre (thème dark des layouts) — inversion adaptative */
.nx-theme-dark .nx-shop-rank-badge--challenger {
    background: rgba(255, 255, 255, 0.1);
    color: var(--bd-white);
    border-color: var(--bd-line-on-dark);
}
.nx-theme-dark .nx-shop-rank-badge--diamond {
    background: var(--bd-white);
    color: var(--bd-dark);
}

/* Profil éditorial commun : contenu visible et lisible par tous les templates. */
.nx-shop-editorial-profile {
    padding: clamp(40px, 6vw, 80px) 20px;
    background: var(--bd-white);
    color: var(--bd-dark);
}

.nx-shop-editorial-profile__inner {
    width: min(920px, 100%);
    margin: 0 auto;
}

.nx-shop-editorial-profile h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 4vw, 38px);
}

.nx-shop-editorial-profile__identity {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 14px;
}

.nx-shop-editorial-profile__universes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.nx-shop-editorial-profile__universes li {
    padding: 7px 12px;
    border: 1px solid var(--bd-border);
    border-radius: var(--bd-r-pill);
    background: var(--bd-lgray);
    font-size: 14px;
}

.nx-shop-editorial-profile__story {
    margin-top: 28px;
}

.nx-shop-editorial-profile__story h3 {
    margin: 0 0 10px;
}

.nx-shop-editorial-profile__story p {
    margin: 0;
    line-height: 1.7;
}

.nx-shop-editorial-profile__faq h3 {
    margin: 28px 0 10px;
}

.nx-shop-editorial-profile__faq details {
    border-top: 1px solid var(--bd-border);
    padding: 14px 0;
}

.nx-shop-editorial-profile__faq details:last-child {
    border-bottom: 1px solid var(--bd-border);
}

.nx-shop-editorial-profile__faq summary {
    cursor: pointer;
    font-weight: 700;
}

.nx-shop-editorial-profile__faq p {
    margin: 10px 0 0;
    line-height: 1.65;
}
