/**
 * Product Configurator - Frontend Main Styles
 * Note: Variables CSS définies dans variables.css
 */

/* ============================================
   FIX Z-INDEX POUR LES TOOLTIPS
   ============================================ */
.fixed-title-and-price:not(.is-sticky) {
    z-index: auto !important;
}

/* ============================================
   PRICE "À PARTIR DE"
   ============================================ */
.pc-price-from {
    display: inline;
    font-size: 0.85em;
    font-weight: 400;
    color: var(--pc-text-light);
    margin-right: 4px;
}

/* Sur les pages catalogue - garder sur la même ligne */
.products .pc-price-from {
    display: inline;
    font-size: 0.85em;
    margin-right: 4px;
}

/* ============================================
   WOODMART PRICE OVERRIDE - Forcer affichage permanent
   ============================================ */

/* Forcer l'affichage du wrap-price */
.wd-product .wrap-price,
.product-grid-item .wrap-price,
.products .wrap-price,
.wrap-price {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    transform: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* Forcer l'affichage du swap-wrapp et swap-elements */
.wrap-price .swap-wrapp,
.wrap-price .swap-elements {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: relative !important;
    height: auto !important;
}

/* Prix toujours visible sur une seule ligne */
.wrap-price .price,
.swap-elements .price {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 4px;
    opacity: 1 !important;
    visibility: visible !important;
    white-space: nowrap;
}

/* "À partir de" en inline */
.wrap-price .price .pc-price-from,
.swap-elements .price .pc-price-from {
    display: inline !important;
    margin-right: 4px;
}

/* Montant du prix en inline */
.wrap-price .price .woocommerce-Price-amount,
.swap-elements .price .woocommerce-Price-amount,
.wrap-price .price > span,
.swap-elements .price > span {
    display: inline !important;
}

/* Désactiver les transitions/animations de hover sur le prix */
.wd-product:hover .wrap-price,
.product-grid-item:hover .wrap-price {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Cacher les éléments de prix dupliqués au hover */
.wrap-price .swap-wrapp .swap-elements:not(:first-child) {
    display: none !important;
}

/* ============================================
   VARIATIONS CONTAINER
   ============================================ */
.pc-variations-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

/* ============================================
   NON-VARIATION ATTRIBUTES
   ============================================ */
.pc-non-variation-attributes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pc-attribute-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pc-attribute-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--pc-text);
}

.pc-attribute-label label {
    margin: 0;
}

.pc-attribute-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* ============================================
   DROPDOWN (SELECT)
   ============================================ */
.pc-dropdown {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.pc-dropdown:hover,
.pc-dropdown:focus {
    border-color: var(--pc-primary);
    outline: none;
}

.pc-dropdown option {
    padding: 8px;
}

/* ============================================
   SWATCHES
   ============================================ */

/* Masquer le label de l'attribut Couleur (pa_color) spécifiquement */
.variations th.label label[for="pa_color"],
.variations .label label[for="pa_color"],
label[for="pa_color"] {
    display: none !important;
}

/* Masquer aussi la cellule th parente si vide visuellement */
.variations tr:has(select[name="attribute_pa_color"]) > th.label {
    display: none;
}

.pc-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pc-swatch-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pc-swatch-item:hover {
    transform: translateY(-2px);
}

.pc-swatch-item:hover .pc-swatch-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.pc-swatch-item.pc-selected .pc-swatch-image,
.pc-swatch-item.pc-selected .pc-swatch-color,
.pc-swatch-item.pc-selected .pc-swatch-text {
    box-shadow: 0 0 0 3px var(--pc-primary);
}

/* Swatch Image/Color/Text */
.pc-swatch-image,
.pc-swatch-color,
.pc-swatch-text {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--pc-border);
    transition: all 0.2s ease;
}

.pc-swatch-image {
    background-size: cover;
    background-position: center;
}

.pc-swatch-text {
    background: var(--pc-bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

/* Swatch Sizes - Standard (carrés) */
.pc-swatch-size-small .pc-swatch-image,
.pc-swatch-size-small .pc-swatch-color,
.pc-swatch-size-small .pc-swatch-text {
    width: 40px;
    height: 40px;
}

.pc-swatch-size-medium .pc-swatch-image,
.pc-swatch-size-medium .pc-swatch-color,
.pc-swatch-size-medium .pc-swatch-text {
    width: 60px;
    height: 60px;
}

.pc-swatch-size-large .pc-swatch-image,
.pc-swatch-size-large .pc-swatch-color,
.pc-swatch-size-large .pc-swatch-text {
    width: 80px;
    height: 80px;
}

/* Swatch Sizes - Spécifique pa_color (rectangles verticaux) */
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-size-small .pc-swatch-text {
    width: 20px;
    height: 46px;
}

.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-size-medium .pc-swatch-text {
    width: 25px;
    height: 58px;
}

.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-size-large .pc-swatch-text {
    width: 30px;
    height: 70px;
}

/* Swatch Shapes - Standard */
.pc-swatch-shape-square .pc-swatch-image,
.pc-swatch-shape-square .pc-swatch-color,
.pc-swatch-shape-square .pc-swatch-text {
    border-radius: 4px;
}

.pc-swatch-shape-rounded .pc-swatch-image,
.pc-swatch-shape-rounded .pc-swatch-color,
.pc-swatch-shape-rounded .pc-swatch-text {
    border-radius: 8px;
}

.pc-swatch-shape-circle .pc-swatch-image,
.pc-swatch-shape-circle .pc-swatch-color,
.pc-swatch-shape-circle .pc-swatch-text {
    border-radius: 50%;
}

/* Swatch Shapes - Spécifique pa_color (bords arrondis verticaux) */
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-shape-square .pc-swatch-text {
    border-radius: 6px;
}

.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-shape-rounded .pc-swatch-text {
    border-radius: 10px;
}

.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-image,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-color,
.pc-swatches[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-text,
[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-image,
[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-color,
[data-attribute="pa_color"] .pc-swatch-shape-circle .pc-swatch-text {
    border-radius: 15px;
}

/* Swatch Tooltip (Popup) */
.pc-swatch-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #1d1d1d;
    background-color: #1d1d1d !important;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
    min-width: 100px;
}

.pc-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1d1d1d;
}

.pc-swatch-tooltip-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.pc-swatch-tooltip-desc {
    display: block;
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}

.pc-swatch-tooltip-price {
    display: block;
    font-size: 11px;
    color: var(--wd-primary-color, #c89b5f);
    margin-top: 4px;
}

.pc-swatch-tooltip-price .woocommerce-Price-amount {
    color: inherit;
}

/* Masquer les labels par défaut (remplacés par la popup) */
.pc-swatch-label,
.pc-swatch-price {
    display: none;
}

/* Si on veut quand même les afficher sous le swatch */
.pc-swatches.pc-show-labels-below .pc-swatch-label {
    display: block;
    font-size: 11px;
    color: var(--pc-text);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 5px;
}

.pc-swatches.pc-show-labels-below .pc-swatch-price {
    display: block;
    font-size: 10px;
    color: var(--wd-primary-color, #c89b5f);
}

.pc-swatches.pc-show-labels-below .pc-swatch-price .woocommerce-Price-amount {
    color: inherit;
}

.pc-swatches.pc-show-labels-below .pc-swatch-price.pc-free {
    color: var(--pc-success);
}

/* ============================================
   SLIDER
   ============================================ */
.pc-slider-container {
    width: 100%;
}

.pc-slider-input {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}

.pc-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--pc-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.pc-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.pc-slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--pc-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.pc-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--pc-text-light);
}

.pc-slider-value {
    font-weight: 600;
    color: var(--pc-primary);
    font-size: 14px;
}

/* ============================================
   TOGGLE
   ============================================ */
.pc-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pc-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s;
}

.pc-toggle.pc-active {
    background: var(--pc-primary);
}

.pc-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pc-toggle.pc-active .pc-toggle-thumb {
    transform: translateX(24px);
}

.pc-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pc-toggle-label {
    font-weight: 500;
}

.pc-toggle-price {
    font-size: 12px;
    color: var(--wd-primary-color, #c89b5f);
}

.pc-toggle-price .woocommerce-Price-amount {
    color: inherit;
}

/* ============================================
   RADIO
   ============================================ */
.pc-radio-group {
    display: flex;
    gap: 15px;
}

.pc-radio-vertical {
    flex-direction: column;
}

.pc-radio-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.pc-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid var(--pc-border);
    border-radius: var(--pc-radius);
    transition: all 0.2s;
}

.pc-radio-item:hover {
    border-color: var(--pc-primary);
}

.pc-radio-item.pc-selected,
.pc-radio-item:has(input:checked) {
    border-color: var(--pc-primary);
    background: rgba(34, 113, 177, 0.05);
}

.pc-radio-item input {
    margin: 0;
}

.pc-radio-control {
    display: none;
}

.pc-radio-label {
    font-weight: 500;
}

.pc-radio-price {
    font-size: 12px;
    color: var(--wd-primary-color, #c89b5f);
    margin-left: auto;
}

.pc-radio-price .woocommerce-Price-amount {
    color: inherit;
}

.pc-radio-price.pc-free {
    color: var(--pc-success);
}

/* ============================================
   CARDS
   ============================================ */
.pc-cards-grid {
    display: grid;
    grid-template-columns: repeat(var(--pc-columns, 3), 1fr);
    gap: 15px;
}

.pc-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--pc-border);
    border-radius: var(--pc-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pc-card-item:hover {
    border-color: var(--pc-primary);
    transform: translateY(-2px);
}

.pc-card-item.pc-selected {
    border-color: var(--pc-primary);
    background: rgba(34, 113, 177, 0.05);
    box-shadow: 0 0 0 1px var(--pc-primary);
}

/* Card Styles */
.pc-cards-bordered .pc-card-item {
    border-width: 2px;
}

.pc-cards-shadow .pc-card-item {
    border: none;
    box-shadow: var(--pc-shadow);
}

.pc-cards-shadow .pc-card-item.pc-selected {
    box-shadow: 0 0 0 2px var(--pc-primary), var(--pc-shadow);
}

.pc-cards-minimal .pc-card-item {
    border: none;
    padding: 10px;
}

.pc-cards-minimal .pc-card-item.pc-selected {
    background: rgba(34, 113, 177, 0.1);
}

.pc-card-image {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.pc-card-placeholder {
    width: 100%;
    height: 80px;
    background: var(--pc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--pc-text-light);
    margin-bottom: 10px;
    border-radius: var(--pc-radius);
}

.pc-card-label {
    font-weight: 500;
    font-size: 14px;
}

.pc-card-price {
    font-size: 12px;
    color: var(--wd-primary-color, #c89b5f);
    margin-top: 5px;
}

.pc-card-price .woocommerce-Price-amount {
    color: inherit;
}

.pc-card-price.pc-free {
    color: var(--pc-success);
}

/* ============================================
   DIMENSION FIELDS
   ============================================ */
.pc-dimension-fields {
    margin: 20px 0;
    padding: 20px;
    background: var(--pc-bg);
    border-radius: var(--pc-radius);
}

.pc-dimension-field {
    margin-bottom: 20px;
}

.pc-dimension-field:last-of-type {
    margin-bottom: 15px;
}

.pc-dimension-field label.pc-dimension-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.35;
    cursor: default;
}

.pc-dimension-label .pc-dimension-label-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pc-dimension-label .pc-attr-tooltip-wrap {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.pc-unit {
    font-weight: 400;
    color: var(--pc-text-light);
}

.pc-slider-wrapper {
    padding: 0 10px;
}

.pc-dimension-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--pc-primary), #90caf9);
    border-radius: 4px;
    outline: none;
}

.pc-dimension-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--pc-primary);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.pc-dimension-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
}

.pc-dim-min,
.pc-dim-max {
    color: var(--pc-text-light);
}

.pc-dim-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--pc-primary);
}

/* Input éditable pour la valeur de dimension */
input.pc-dim-input {
    width: 80px !important;
    max-width: 100px !important;
    text-align: center !important;
    font-weight: 700;
    font-size: 16px;
    color: var(--pc-primary);
    border: 2px solid var(--pc-primary);
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
    -moz-appearance: textfield;
}

input.pc-dim-input::-webkit-outer-spin-button,
input.pc-dim-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input.pc-dim-input:focus {
    outline: none;
    border-color: var(--pc-primary-dark, #1565c0);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* ============================================
   SLIDER À CRANS (MODE PAR LAMES)
   ============================================ */
.pc-slats-mode {
    position: relative;
}

.pc-slats-slider-wrapper {
    position: relative;
    padding-bottom: 35px;
}

/* Slider à crans - Track */
.pc-slats-slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

/* Slider à crans - Thumb */
.pc-slats-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--pc-primary);
    border-radius: 50%;
    cursor: grab;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    z-index: 10;
}

.pc-slats-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pc-slats-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.pc-slats-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--pc-primary);
    border-radius: 50%;
    cursor: grab;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Marqueurs des crans */
.pc-slats-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    pointer-events: none;
    margin: 0 21px; /* Alignement avec le centre du thumb du slider */
}

.pc-slat-marker {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 4px;
    text-align: center;
}

.pc-slat-tick {
    width: 5px;
    height: 5px;
    margin-top: 9px;
    background: white;
    border-radius: 9999px;
}

.pc-slat-label {
    margin-top: 15px;
    font-size: 11px;
    font-weight: 600;
    color: #9e9e9e;
    transition: color 0.2s ease;
}

.pc-slat-marker.pc-active .pc-slat-label {
    color: var(--pc-primary);
}

/* Labels du slider à crans */
.pc-slats-labels {
    margin-top: 25px;
}

.pc-slats-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    color: var(--pc-primary);
}

.pc-slats-main {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.pc-slats-count {
    font-size: 24px;
}

.pc-slats-unit {
    font-size: 16px;
}

.pc-slats-height {
    font-size: 13px;
    font-weight: 500;
    color: var(--pc-text-light);
}

/* Premier et dernier marqueur - positionnement */
.pc-slat-marker:first-child {
    left: 0 !important;
    transform: translateX(0);
}

.pc-slat-marker:first-child .pc-slat-label {
    margin-left: 0;
}

.pc-slat-marker:last-child {
    left: 100% !important;
    transform: translateX(-100%);
}

.pc-slat-marker:last-child .pc-slat-label {
    margin-right: 0;
}

/* Cas avec un seul élément */
.pc-slats-markers:has(.pc-slat-marker:only-child) .pc-slat-marker {
    left: 50% !important;
    transform: translateX(-50%);
}

/* Calculated Price */
.pc-calculated-price {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--pc-border);
    font-size: 18px;
}

.pc-price-label {
    color: var(--pc-text-light);
}

.pc-price-value {
    font-weight: 700;
    color: var(--pc-primary);
}

/* Price From */
.pc-price-from {
    font-size: 12px;
    color: var(--pc-text-light);
    font-weight: 400;
}

/* ============================================
   RECOMMENDED PRODUCTS
   ============================================ */
.pc-recommended-products {
    margin: 30px 0;
    padding: 20px;
    background: var(--pc-bg);
    border-radius: var(--pc-radius);
}

.pc-recommended-title {
    margin: 0 0 20px;
    font-size: 18px;
}

.pc-recommended-grid {
    display: grid;
    grid-template-columns: repeat(var(--pc-rec-columns, 3), 1fr);
    gap: 20px;
}

.pc-recommended-item {
    background: #fff;
    border-radius: var(--pc-radius);
    overflow: hidden;
    box-shadow: var(--pc-shadow);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.pc-recommended-item:hover {
    transform: translateY(-3px);
}

.pc-recommended-image {
    flex-shrink: 0;
}

.pc-recommended-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.pc-recommended-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pc-recommended-name {
    font-weight: 600;
    margin-bottom: 5px;
    flex-grow: 1;
}

.pc-recommended-price {
    color: var(--pc-primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.pc-recommended-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.pc-recommended-view {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--pc-primary);
    border: 1px solid var(--pc-primary);
    border-radius: var(--pc-radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
}

.pc-recommended-view:hover {
    background: var(--pc-primary);
    color: #fff;
}

.pc-recommended-add {
    width: 100%;
    padding: 10px;
    background: var(--pc-primary);
    color: #fff;
    border: none;
    border-radius: var(--pc-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.pc-recommended-add:hover {
    background: var(--pc-primary-hover);
}

.pc-recommended-add.pc-added {
    background: var(--pc-success);
}

/* ============================================
   POPUP TRIGGER BUTTON
   ============================================ */
.pc-popup-trigger-container {
    width: 100%;
}

.pc-popup-trigger-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid var(--pc-border);
    border-radius: var(--pc-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-text);
    transition: all 0.2s ease;
    gap: 10px;
}

.pc-popup-trigger-button:hover {
    border-color: var(--pc-primary);
    background: #f8f9fa;
}

.pc-popup-trigger-button:focus {
    outline: none;
    border-color: var(--pc-primary);
    box-shadow: 0 0 0 3px rgba(var(--pc-primary-rgb, 0, 115, 170), 0.2);
}

.pc-popup-button-text {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--pc-primary);
}

.pc-popup-current-selection {
    flex: 1;
    text-align: left;
    color: #666;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-popup-current-selection:not(:empty) {
    padding-left: 10px;
    border-left: 1px solid var(--pc-border);
    margin-left: 10px;
}

.pc-popup-button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: transform 0.2s;
}

.pc-popup-trigger-button:hover .pc-popup-button-arrow {
    color: var(--pc-primary);
}

/* État avec sélection - bouton identique + checkbox verte */
/* Masquer le texte "Choisir" mais garder le ::before visible */
.pc-popup-trigger-container.has-selection .pc-popup-button-text {
    font-size: 0;
}

/* Checkbox verte pour indiquer la sélection */
.pc-popup-trigger-container.has-selection .pc-popup-button-text::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0;
    vertical-align: middle;
    background-color: #28a745;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .pc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pc-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pc-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .pc-recommended-grid {
        grid-template-columns: 1fr;
    }
    
    .pc-radio-horizontal {
        flex-direction: column;
    }
}
