/**
 * Vulcano Ovens - Public CSS
 * Styles for the Frontend (My Account and Smart Finder)
 */

/* ─────────────────────────────────────
   Mon Compte — Mes Fours
   ───────────────────────────────────── */
.vulcano-ovens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.vulcano-oven-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vulcano-oven-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.vulcano-oven-card-img {
    background: #f8fafc;
    padding: 20px;
    text-align: center;
}

.vulcano-oven-card-img img {
    max-height: 160px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.vulcano-oven-card h4 {
    margin: 0;
    padding: 16px 20px 0;
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.vulcano-oven-meta {
    margin: 6px 20px 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.4;
}
.vulcano-oven-meta strong {
    color: #475569;
}

.vulcano-oven-actions {
    margin-top: auto;
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vulcano-oven-actions .button {
    text-align: center;
    width: 100%;
    margin: 0;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.vulcano-oven-actions .vulcano-btn-accessories {
    background-color: #002f6c !important;
    color: #ffffff !important;
    border-color: #002f6c !important;
}
.vulcano-oven-actions .vulcano-btn-accessories:hover {
    background-color: #001f4d !important;
    border-color: #001f4d !important;
}

.vulcano-oven-actions .vulcano-btn-sav {
    background-color: transparent !important;
    color: #cd001a !important;
    border: 2px solid #cd001a !important;
}

.vulcano-oven-actions .vulcano-btn-sav:hover {
    background-color: #cd001a !important;
    color: #ffffff !important;
}

/* Empty state */
.vulcano-ovens-empty {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}
.vulcano-ovens-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.vulcano-ovens-empty p {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
}
.vulcano-ovens-empty-sub {
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Section ajout de four */
.vulcano-add-oven-section {
    margin-top: 40px;
    border-top: 2px solid #e2e8f0;
    padding-top: 32px;
}
.vulcano-add-oven-header {
    margin-bottom: 20px;
}
.vulcano-add-oven-header h4 {
    margin: 0 0 6px;
    color: #1e293b;
    font-size: 1.15rem;
}
.vulcano-add-oven-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Formulaire d'ajout — redesign */
.vulcano-add-oven-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 12px;
}
.vulcano-add-oven-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.vulcano-add-oven-field--full {
    grid-column: 1 / -1;
}
.vulcano-add-oven-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}
.vulcano-add-oven-field label .required {
    color: #cd001a;
}
.vulcano-add-oven-field select,
.vulcano-add-oven-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.vulcano-add-oven-field select:focus,
.vulcano-add-oven-field input:focus {
    border-color: #002f6c;
    box-shadow: 0 0 0 3px rgba(0,47,108,.08);
    outline: none;
}
.vulcano-add-oven-submit {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background: #002f6c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.vulcano-add-oven-submit:hover {
    background: #001f4d;
}

@media (max-width: 600px) {
    .vulcano-add-oven-fields {
        grid-template-columns: 1fr;
    }
    .vulcano-ovens-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .vulcano-add-oven-form {
        padding: 16px;
    }
    .vulcano-add-oven-submit {
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }
    .vulcano-oven-card h4 {
        font-size: 1.05rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .vulcano-oven-card-img {
        padding: 14px;
    }
    .vulcano-oven-card-img img {
        max-height: 130px;
    }
    .vulcano-oven-actions {
        padding: 14px 16px 16px;
    }
}

/* Smart Finder Widget */
.vulcano-smart-finder-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.vulcano-smart-finder-widget h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #002f6c; /* Secondaire Vulcano */
}

#vulcano-smart-finder-form .vsf-row {
    margin-bottom: 15px;
}

#vulcano-smart-finder-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

#vulcano-smart-finder-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

#vulcano-smart-finder-form .vsf-submit {
    margin-bottom: 0;
    margin-top: 20px;
}

#vulcano-smart-finder-form .vsf-btn {
    width: 100%;
    background: #cd001a !important;
    color: #fff !important;
    border-color: #cd001a !important;
    padding: 10px 20px;
    transition: all 0.2s ease;
}

/* Layout Horizontal (Elementor) */
.vsf-layout-row #vulcano-smart-finder-form {
    display: flex;
    align-items: flex-end;
    gap: 15px;
}
.vsf-layout-row #vulcano-smart-finder-form .vsf-row {
    flex: 1;
    margin-bottom: 0;
}
.vsf-layout-row #vulcano-smart-finder-form .vsf-submit {
    flex: 0 0 auto;
    margin-top: 0;
}

/* Custom Select Dropdowns */
.vsf-custom-select-wrapper {
    position: relative;
    width: 100%;
}
.vsf-custom-select-trigger {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
}
.vsf-custom-select-trigger::after {
    content: "▼";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #94a3b8;
}
.vsf-custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.vsf-custom-select-wrapper.open .vsf-custom-select-trigger::after {
    content: "▲";
}
.vsf-custom-select-wrapper.open .vsf-custom-select-options {
    display: block;
}
.vsf-custom-select-options li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    margin: 0;
    color: #1e293b;
}
.vsf-custom-select-options li:last-child {
    border-bottom: none;
}
.vsf-custom-select-options li:hover {
    background: #f8fafc;
    color: #002f6c;
}
.vsf-custom-select-options li.disabled {
    color: #94a3b8;
    background: #f1f5f9;
    cursor: not-allowed;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Compatibility Badge / Single Product */
.vulcano-compatibility-badge {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.5;
}

.vulcano-compatibility-badge strong {
    color: #15803d;
}

/* Header Button */
.vulcano-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #002f6c;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.vulcano-header-btn:hover {
    background-color: #001f4d;
    color: #ffffff;
}

/* ─────────────────────────────────────
   Smart Finder — Page de résultats
   ───────────────────────────────────── */
.vulcano-sfr {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.vulcano-sfr-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #002f6c 0%, #003d8f 100%);
    border-radius: 10px;
    margin-bottom: 28px;
    color: #fff;
}
.vulcano-sfr-header-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}
.vulcano-sfr-header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}
.vulcano-sfr-header-text p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: .75;
}

/* Onglets catégories */
.vulcano-sfr-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}
.vulcano-sfr-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: #64748b;
    background: #f1f5f9;
    transition: all .2s;
    white-space: nowrap;
}
.vulcano-sfr-tab:hover {
    background: #002f6c;
    color: #fff;
}
.vulcano-sfr-tab span {
    opacity: .6;
    font-size: 12px;
}

/* Groupe par catégorie */
.vulcano-sfr-group {
    margin-bottom: 36px;
}
.vulcano-sfr-group-title {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 10px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e2e8f0;
}
.vulcano-sfr-group-title span {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 400;
}

/* Grille produits — colonnes pilotées par le widget Elementor via selectors */
.vulcano-sfr-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fallback shortcode — overridé par Elementor */
    gap: 20px;
}

/* Carte produit */
.vulcano-sfr-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.vulcano-sfr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.vulcano-sfr-card-img {
    display: block;
    background: #f8fafc;
    padding: 12px;
    text-align: center;
}
.vulcano-sfr-card-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 180px;
    mix-blend-mode: multiply;
}
.vulcano-sfr-card-body {
    padding: 14px 16px 18px;
    text-align: center;
}
.vulcano-sfr-card-body h5 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.vulcano-sfr-card-body h5 a {
    text-decoration: none;
    color: #0A0A0A;
    transition: color .2s;
}
.vulcano-sfr-card-body h5 a:hover {
    color: #002f6c;
}
.vulcano-sfr-price {
    color: #cd001a;
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 12px;
}
.vulcano-sfr-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #002f6c;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}
.vulcano-sfr-btn:hover {
    background: #001f4d;
    color: #fff;
}

/* Empty state */
.vulcano-results-empty-state {
    text-align: center;
    padding: 40px 20px;
}
.vulcano-results-empty-state p {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Responsive — Résultats */
@media (max-width: 768px) {
    .vulcano-sfr {
        padding: 0 12px;
    }
    .vulcano-sfr-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 16px 18px;
    }
    .vulcano-sfr-header-text h3 {
        font-size: 16px;
    }
    /* Onglets : scroll horizontal avec snap (au lieu d'empiler en 3-4 lignes) */
    .vulcano-sfr-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 14px;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .vulcano-sfr-tab {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    /* Scrollbar discrète sur mobile */
    .vulcano-sfr-tabs::-webkit-scrollbar { height: 4px; }
    .vulcano-sfr-tabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
    .vulcano-sfr-group-title {
        font-size: 15px;
    }
    /* Grille produits : 2 tuiles par ligne sur mobile/tablette.
       Sélecteur élargi + !important pour battre les inline styles Elementor (responsive control "columns"). */
    .vulcano-sfr-grid,
    .elementor-widget-vulcano_smart_finder_results .vulcano-sfr-grid,
    .elementor-element .vulcano-sfr-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .vulcano-sfr-card-img {
        padding: 8px;
    }
    .vulcano-sfr-card-img img {
        max-height: 130px;
    }
    .vulcano-sfr-card-body {
        padding: 10px 10px 14px;
    }
    .vulcano-sfr-card-body h5 {
        font-size: 13px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        min-height: 2.6em;
    }
    .vulcano-sfr-btn {
        padding: 8px 12px;
        font-size: 12px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Très petits écrans : alléger encore + cartes plus compactes */
@media (max-width: 380px) {
    .vulcano-sfr-grid { gap: 10px; }
    .vulcano-sfr-card-img img { max-height: 110px; }
    .vulcano-sfr-card-body { padding: 8px 8px 12px; }
    .vulcano-sfr-card-body h5 { font-size: 12px; }
    .vulcano-sfr-btn { font-size: 11px; padding: 7px 8px; }
}

/* Smart Finder : layout horizontal → stacking vertical sur mobile/tablette
   Override direct (avec !important) car Elementor peut injecter ses propres styles
   sur le wrapper .vsf-layout-row qui battent une règle moins spécifique. */
@media (max-width: 768px) {
    #vulcano-smart-finder-form,
    .vsf-layout-row #vulcano-smart-finder-form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    #vulcano-smart-finder-form .vsf-row,
    .vsf-layout-row #vulcano-smart-finder-form .vsf-row {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    #vulcano-smart-finder-form .vsf-submit,
    .vsf-layout-row #vulcano-smart-finder-form .vsf-submit {
        width: 100% !important;
        margin-top: 4px !important;
    }
    #vulcano-smart-finder-form .vsf-btn,
    .vsf-layout-row #vulcano-smart-finder-form .vsf-btn {
        width: 100% !important;
    }
}

/* Responsive — Barre de recherche */
@media (max-width: 600px) {
    .vulcano-search-acc-bar {
        flex-wrap: wrap;
        border-radius: 10px !important;
    }
    .vulcano-search-acc-input {
        flex-basis: 100%;
        order: 1;
    }
    .vulcano-search-acc-icon {
        order: 0;
        padding: 0 0 0 8px;
    }
    .vulcano-search-acc-btn {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
        border-radius: 8px !important;
    }
}

/* ─────────────────────────────────────
   Widget Recherche Accessoires (live)
   ───────────────────────────────────── */
.vulcano-search-acc {
    position: relative;
}
/* Barre wrapper : icône + input + bouton en flex */
.vulcano-search-acc-bar {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    padding: 4px;
}
.vulcano-search-acc-bar.is-focused {
    border-color: #002f6c;
    box-shadow: 0 0 0 3px rgba(0,47,108,.1);
}
.vulcano-search-acc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 8px 0 12px;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}
.vulcano-search-acc-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.vulcano-search-acc-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #1e293b;
    box-sizing: border-box;
}
.vulcano-search-acc-input::placeholder {
    color: #94a3b8;
}
.vulcano-search-acc-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background-color: #cd001a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
    line-height: 1.2;
}
.vulcano-search-acc-btn:hover {
    background-color: #a80015;
}
.vulcano-search-acc-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
/* Dropdown résultats (overlay) */
.vulcano-search-acc-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    padding: 14px;
}
.vulcano-search-acc-dropdown.is-open {
    display: block;
}
.vulcano-search-acc-results {
    display: none;
}
.vulcano-search-acc-results.has-results {
    display: block;
}
.vulcano-search-acc-count {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}
.vulcano-search-acc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.vulcano-search-acc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: border-color .2s, box-shadow .2s;
}
.vulcano-search-acc-item:hover {
    border-color: #002f6c;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    color: #1e293b;
}
.vulcano-search-acc-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f8fafc;
}
.vulcano-search-acc-item-info {
    flex: 1;
    min-width: 0;
}
.vulcano-search-acc-item-info strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vulcano-search-acc-item-info span {
    font-size: 13px;
    color: #cd001a;
    font-weight: 600;
}
.vulcano-search-acc-empty {
    text-align: center;
    padding: 16px;
    color: #94a3b8;
    font-size: 13px;
}
.vulcano-search-acc-loading {
    text-align: center;
    padding: 16px;
    color: #64748b;
    font-size: 13px;
}
/* Dropdown : scrollbar custom */
.vulcano-search-acc-dropdown::-webkit-scrollbar {
    width: 6px;
}
.vulcano-search-acc-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.vulcano-search-acc-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
/* Responsive dropdown */
@media (max-width: 600px) {
    .vulcano-search-acc-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 60vh;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 36px rgba(0,0,0,.15);
        z-index: 99999;
    }
    .vulcano-search-acc-list {
        grid-template-columns: 1fr !important;
    }
}
