/**
 * WEF Frontend Styles
 * Stili base per tutti i widget. Le proprietà personalizzabili sono gestite da Elementor.
 */

/* ===== COMMON ===== */
.wef-filter-container {
    position: relative;
}

.wef-filter-title {
    margin: 0 0 15px 0;
}

.wef-editor-notice {
    padding: 15px;
    background: #f0f0f1;
    border: 1px dashed #c3c4c7;
    color: #50575e;
    text-align: center;
    font-size: 13px;
    border-radius: 4px;
}

.wef-hidden {
    display: none !important;
}

.wef-loading {
    position: relative;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wef-loading::after {
    content: "";
    position: absolute;
    top: calc(50% - 15px);
    left: calc(50% - 15px);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wef-spin 1s linear infinite;
    z-index: 10;
}

@keyframes wef-spin {
    to {
        transform: rotate(360deg);
    }
}

.wef-hidden-term {
    display: none;
}

/* ===== LOADING STATE ===== */
.wef-loading {
    position: relative;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wef-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: wef-spin 0.7s linear infinite;
    z-index: 10;
}

@keyframes wef-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ATTRIBUTE FILTER ===== */
.wef-attr-section {
    margin-bottom: 10px;
}

.wef-attr-section-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.wef-accordion-toggle {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wef-accordion-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

/* Icon swap: show closed icon by default, open icon when open */
.wef-icon-open {
    display: none;
}
.wef-open .wef-icon-open {
    display: inline-flex;
}
.wef-open .wef-icon-closed {
    display: none;
}

.wef-attr-separator {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 15px 0;
}

/* ===== CHECKBOX / RADIO ===== */
.wef-terms-list {
    display: flex;
    flex-direction: column;
}

.wef-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.wef-filter-item:hover {
    opacity: 0.8;
}

.wef-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    aspect-ratio: 1 / 1;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    min-width: 0;
    min-height: 0;
}

.wef-check-input[type="radio"] {
    border-radius: 50%;
}

.wef-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.wef-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.wef-check-input[type="radio"]:checked::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.wef-filter-label {
    flex: 1;
}

/* ===== SELECT DROPDOWN ===== */
.wef-select,
.wef-cat-dropdown,
.wef-sort-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    font-size: inherit;
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.15s ease;
}

.wef-select:focus,
.wef-cat-dropdown:focus,
.wef-sort-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== RANGE SLIDER ===== */
.wef-range-slider-wrap {
    position: relative;
    padding: 10px 0 5px;
}

.wef-range-track {
    position: relative;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin: 8px 0;
}

.wef-range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
}

.wef-range-slider-wrap input[type="range"] {
    position: absolute;
    top: 6px;
    width: 100%;
    height: 6px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

.wef-range-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2563eb;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.wef-range-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.wef-range-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #2563eb;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wef-range-values {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.wef-range-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
}

.wef-range-separator {
    color: #9ca3af;
}

/* ===== COLOR SWATCHES ===== */
.wef-swatches-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wef-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    background: none;
}

.wef-color-swatch:hover {
    border-color: #333;
    transform: scale(1.1);
}

.wef-color-swatch.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #2563eb;
}

/* ===== BUTTON / LABEL ===== */
.wef-buttons-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wef-button-term {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: inherit;
    transition: all 0.15s ease;
}

.wef-button-term:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.wef-button-term.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* ===== TERM COUNT ===== */
.wef-term-count,
.wef-cat-count {
    font-size: 0.85em;
    opacity: 0.7;
    margin-left: 4px;
}

.wef-term-count.badge-style,
.wef-cat-count.badge-style {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    opacity: 1;
}

/* ===== SHOW MORE ===== */
.wef-show-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.wef-show-more:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ===== BACK TO PARENT ===== */
.wef-back-to-parent {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.wef-back-to-parent .wef-back-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    line-height: 1;
}

.wef-back-to-parent .wef-back-icon i,
.wef-back-to-parent .wef-back-icon svg {
    transition: color 0.15s ease, fill 0.15s ease;
}

.wef-back-to-parent .wef-back-label {
    line-height: 1.4;
}

/* ===== CATEGORY FILTER ===== */
.wef-cat-list {
    display: flex;
    flex-direction: column;
}

.wef-cat-grid {
    display: grid;
    gap: 12px;
}

.wef-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.wef-cat-item:hover {
    opacity: 0.8;
}

.wef-cat-item.wef-selected {
    font-weight: 600;
    background-color: rgba(37, 99, 235, 0.06);
    border-radius: 4px;
    padding: 4px 6px;
    margin: 0 -6px;
}

/* Nascondi l'input nativo — usiamo .wef-check-box come indicatore visuale */
.wef-cat-check-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none;
}

/* Checkbox visuale custom — immune da stili del tema */
.wef-check-box {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    background-color: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
    cursor: pointer;
    vertical-align: middle;
    box-sizing: border-box;
}

/* Stato checked — attivato dal sibling input:checked */
.wef-cat-check-input:checked+.wef-check-box,
.wef-check-box.wef-checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.wef-cat-check-input:checked+.wef-check-box::after,
.wef-check-box.wef-checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Radio: cerchio */
.wef-cat-check-input[type="radio"]+.wef-check-box {
    border-radius: 50%;
}

.wef-cat-check-input[type="radio"]:checked+.wef-check-box::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    font-size: 0;
}

.wef-cat-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wef-cat-children {
    padding-left: 20px;
}

.wef-subcat-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #9ca3af;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.wef-subcat-toggle:hover {
    color: #374151;
}

/* ===== SORT ORDER ===== */
.wef-sort-order {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wef-sort-label {
    font-weight: 500;
    white-space: nowrap;
}

.wef-sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wef-sort-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: inherit;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wef-sort-btn:hover {
    background: #f3f4f6;
}

.wef-sort-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.wef-sort-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wef-sort-list-item {
    padding: 6px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.wef-sort-list-item:hover {
    color: #2563eb;
}

.wef-sort-list-item.active {
    color: #2563eb;
}

.wef-indicator-bold {
    font-weight: 700;
}

.wef-indicator-underline {
    text-decoration: underline;
}

.wef-sort-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.wef-sort-icon {
    font-size: 0.85em;
    opacity: 0.7;
}

/* ===== ACTIVE FILTERS (CHIPS) ===== */
.wef-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.wef-chips-vertical {
    flex-direction: column;
    align-items: flex-start;
}

.wef-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.15s ease;
    animation: wef-fadeIn 0.3s ease;
}

.wef-chip:hover {
    background: #e2e8f0;
}

.wef-chip-prefix {
    font-weight: 600;
    margin-right: 2px;
}

/* Icona rimozione chip — inline come icona pulsante nativo Elementor */
.wef-chip-remove {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 0 0 4px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.5;
    transition: all 0.15s ease;
    font-size: inherit;
    vertical-align: middle;
    text-decoration: none !important;
}

.wef-chip-remove:hover {
    opacity: 1;
}

/* Forza stili su tutti gli elementi interni generati da Elementor Icons_Manager */
.wef-chip-remove i,
.wef-chip-remove svg,
.wef-chip-remove span {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 1em;
    height: 1em;
    font-size: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    fill: currentColor;
    vertical-align: middle;
}

.wef-hover-scale:hover {
    transform: scale(1.2);
}

.wef-hover-rotate:hover {
    transform: rotate(90deg);
}

/* ===== CLEAR ALL — Pulsante, non link ===== */
.wef-clear-all {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    color: #ef4444;
    font-size: 0.85em;
    padding: 6px 12px !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    line-height: 1.4;
}

.wef-clear-all:hover {
    color: #dc2626;
    background-color: rgba(239, 68, 68, 0.06) !important;
    text-decoration: none !important;
}

.wef-clear-all:focus,
.wef-clear-all:active {
    text-decoration: none !important;
    outline: none !important;
}

/* Icona del pulsante cancella */
.wef-clear-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.wef-clear-icon i,
.wef-clear-icon svg,
.wef-clear-icon span {
    width: 1em;
    height: 1em;
    font-size: inherit;
    fill: currentColor;
    color: inherit;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.wef-clear-all-below {
    display: flex;
    margin-top: 10px;
}

.wef-empty-text {
    color: #9ca3af;
    font-size: 0.9em;
    font-style: italic;
}

/* ===== RESET BUTTON ===== */
.wef-reset-wrap {
    display: inline-block;
}

.wef-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: inherit;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.wef-reset-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.wef-reset-btn.wef-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.wef-reset-icon {
    transition: transform 0.3s ease;
}

.wef-reset-btn:hover .wef-icon-anim-rotate {
    transform: rotate(-180deg);
}

.wef-reset-btn:hover .wef-icon-anim-scale {
    transform: scale(1.2);
}

/* ===== ANIMATIONS ===== */
@keyframes wef-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wef-slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wef-chip-slide {
    animation: wef-slideIn 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .wef-sort-order {
        flex-direction: column;
        align-items: flex-start;
    }

    .wef-sort-select {
        width: 100%;
    }

    .wef-range-values {
        flex-wrap: wrap;
    }
}

/* ===== LAYOUT SWITCHER WIDGET ===== */
.wef-layout-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.wef-layout-btn {
    display: inline-flex;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
    color: inherit;
    line-height: 1;
    text-decoration: none;
    outline: none;
}

.wef-layout-btn:focus {
    outline: none;
}

.wef-layout-btn.active {
    font-weight: bold;
}

.wef-layout-label {
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.wef-layout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== LAYOUT SWITCHER OVERRIDES ===== */
.wef-layout-1 .elementor-loop-container {
    grid-template-columns: 1fr !important;
}

.wef-layout-2 .elementor-loop-container {
    grid-template-columns: repeat(2, 1fr) !important;
}

.wef-layout-3 .elementor-loop-container {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .wef-layout-3 .elementor-loop-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {

    .wef-layout-2 .elementor-loop-container,
    .wef-layout-3 .elementor-loop-container {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================================================
   PRODUCT IMAGE WIDGET
   ============================================================================= */

/* --- Container --- */
.wef-pi-container {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    text-decoration: none;
    color: inherit;
    line-height: 0;
}

/* --- Image layers (background) --- */
.wef-pi-primary,
.wef-pi-secondary {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.4s ease;
}

/* Primary on top, secondary hidden by default (essential for transparent/cutout images) */
.wef-pi-primary { z-index: 3; }
.wef-pi-secondary { z-index: 2; opacity: 0; }

/* For "original" ratio — container needs padding-bottom trick */
.wef-pi-container:not([style*="aspect-ratio"]):not([style*="padding-bottom"]) {
    padding-bottom: 100%; /* fallback 1:1 */
}

/* --- HOVER EFFECTS (swap mode) --- */

/* Fade: cross-fade primary out, secondary in */
.wef-pi-effect-fade .wef-pi-primary { opacity: 1; }
.wef-pi-effect-fade:hover .wef-pi-primary { opacity: 0; }
.wef-pi-effect-fade:hover .wef-pi-secondary { opacity: 1; }

/* Slide Left */
.wef-pi-effect-slide-left .wef-pi-primary { transform: translateX(0); }
.wef-pi-effect-slide-left .wef-pi-secondary { opacity: 1; }
.wef-pi-effect-slide-left:hover .wef-pi-primary { transform: translateX(-100%); }

/* Slide Right */
.wef-pi-effect-slide-right .wef-pi-primary { transform: translateX(0); }
.wef-pi-effect-slide-right .wef-pi-secondary { opacity: 1; }
.wef-pi-effect-slide-right:hover .wef-pi-primary { transform: translateX(100%); }

/* Slide Up */
.wef-pi-effect-slide-up .wef-pi-primary { transform: translateY(0); }
.wef-pi-effect-slide-up .wef-pi-secondary { opacity: 1; }
.wef-pi-effect-slide-up:hover .wef-pi-primary { transform: translateY(-100%); }

/* Slide Down */
.wef-pi-effect-slide-down .wef-pi-primary { transform: translateY(0); }
.wef-pi-effect-slide-down .wef-pi-secondary { opacity: 1; }
.wef-pi-effect-slide-down:hover .wef-pi-primary { transform: translateY(100%); }

/* Flip X */
.wef-pi-effect-flip-x { perspective: 800px; }
.wef-pi-effect-flip-x .wef-pi-primary { backface-visibility: hidden; transform: rotateY(0); }
.wef-pi-effect-flip-x .wef-pi-secondary { opacity: 1; backface-visibility: hidden; transform: rotateY(180deg); }
.wef-pi-effect-flip-x:hover .wef-pi-primary { transform: rotateY(-180deg); }
.wef-pi-effect-flip-x:hover .wef-pi-secondary { transform: rotateY(0); z-index: 4; }

/* Flip Y */
.wef-pi-effect-flip-y { perspective: 800px; }
.wef-pi-effect-flip-y .wef-pi-primary { backface-visibility: hidden; transform: rotateX(0); }
.wef-pi-effect-flip-y .wef-pi-secondary { opacity: 1; backface-visibility: hidden; transform: rotateX(180deg); }
.wef-pi-effect-flip-y:hover .wef-pi-primary { transform: rotateX(-180deg); }
.wef-pi-effect-flip-y:hover .wef-pi-secondary { transform: rotateX(0); z-index: 4; }

/* Zoom In (cross-fade + scale) */
.wef-pi-effect-zoom-in .wef-pi-primary { transform: scale(1); opacity: 1; }
.wef-pi-effect-zoom-in:hover .wef-pi-primary { transform: scale(1.2); opacity: 0; }
.wef-pi-effect-zoom-in:hover .wef-pi-secondary { opacity: 1; }

/* Zoom Out (cross-fade + scale) */
.wef-pi-effect-zoom-out .wef-pi-primary { transform: scale(1); opacity: 1; }
.wef-pi-effect-zoom-out:hover .wef-pi-primary { transform: scale(0.8); opacity: 0; }
.wef-pi-effect-zoom-out:hover .wef-pi-secondary { opacity: 1; }

/* Zoom (only primary, no swap) */
.wef-pi-hover-zoom .wef-pi-primary { transition: transform 0.4s ease; }

/* --- OVERLAY (z-index 1 = below images, above container background) --- */
.wef-pi-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* Link wrapper for product page */
.wef-pi-image-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Trigger: hover — hidden by default, shown on hover */
.wef-pi-overlay-hover .wef-pi-overlay { opacity: 0; }
.wef-pi-overlay-hover:hover .wef-pi-overlay { opacity: 1; }

/* Trigger: hover-reverse — visible by default, hidden on hover */
.wef-pi-overlay-hover-reverse:hover .wef-pi-overlay { opacity: 0; }

/* --- BADGES --- */
.wef-pi-badges-group {
    position: absolute;
    z-index: 10;
    display: flex;
    --badge-offset: 10px;
}

.wef-pi-badges-stack { flex-direction: column; }
.wef-pi-badges-inline { flex-direction: row; }

.wef-pi-badges-top-left { top: var(--badge-offset); left: var(--badge-offset); }
.wef-pi-badges-top-right { top: var(--badge-offset); right: var(--badge-offset); }
.wef-pi-badges-bottom-left { bottom: var(--badge-offset); left: var(--badge-offset); }
.wef-pi-badges-bottom-right { bottom: var(--badge-offset); right: var(--badge-offset); }

.wef-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.wef-badge i, .wef-badge svg {
    color: var(--wef-icon-color, inherit);
    fill: var(--wef-icon-color, currentColor);
}

/* Icon position: default left, reversed = right */
.wef-badge-icon-right { flex-direction: row-reverse; }

.wef-badge i, .wef-badge svg {
    font-size: inherit;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* Badge visibility: hover only */
.wef-badge-vis-hover {
    opacity: 0;
    pointer-events: none;
}
.wef-pi-container:hover .wef-badge-vis-hover {
    opacity: 1;
    pointer-events: auto;
}

/* Badge transitions */
.wef-badge-tr-fade.wef-badge-vis-hover { opacity: 0; }
.wef-pi-container:hover .wef-badge-tr-fade.wef-badge-vis-hover { opacity: 1; }

.wef-badge-tr-slide.wef-badge-vis-hover { transform: translateY(-10px); }
.wef-pi-container:hover .wef-badge-tr-slide.wef-badge-vis-hover { transform: translateY(0); }

.wef-badge-tr-scale.wef-badge-vis-hover { transform: scale(0.5); }
.wef-pi-container:hover .wef-badge-tr-scale.wef-badge-vis-hover { transform: scale(1); }

/* --- GALLERY DOTS --- */
.wef-pi-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wef-pi-container:hover .wef-pi-dots {
    opacity: 1;
}

.wef-pi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.wef-pi-dot:hover,
.wef-pi-dot.active {
    background-color: #fff;
    transform: scale(1.3);
}