/* ── Hair Color Dropdown v6 – Frontend ── */

/* Nasconde selettore nativo, opzione scelta, disponibilità */
.variations_form table.variations,
.variations_form .variations,
.woocommerce-variation,
.woocommerce-variation-availability,
.woocommerce-variation-price,
.woocommerce-product-attributes,
p.stock, .stock, .availability,
.reset_variations { display: none !important; }

/* WRAPPER */
.hcd-selector-wrap { margin: 0 0 20px; font-family: inherit; }

/* LABEL */
.hcd-label {
    display: block; font-size: 12px; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}

/* DROPDOWN */
.hcd-dropdown { position: relative; width: 100%; max-width: 480px; user-select: none; outline: none; }

/* TRIGGER */
.hcd-selected-display {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border: 1.5px solid #d0d0d0; border-radius: 8px;
    cursor: pointer; background: #fff;
    transition: border-color .2s, box-shadow .2s; min-height: 52px;
}
.hcd-dropdown.open .hcd-selected-display,
.hcd-dropdown:focus .hcd-selected-display {
    border-color: #333; box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* Swatch preview nel trigger */
.hcd-swatch-preview {
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid rgba(0,0,0,.15); flex-shrink: 0;
    box-shadow: 0 1px 5px rgba(0,0,0,.25);
    display: none !important;
    background: #ccc;
}
.hcd-swatch-preview.visible { display: block !important; }

.hcd-selected-text { flex: 1; font-size: 14px; color: #222; font-weight: 500; }
.hcd-selected-text.placeholder { color: #aaa; font-weight: 400; }
.hcd-arrow { font-size: 20px; color: #888; transition: transform .22s; line-height: 1; }
.hcd-dropdown.open .hcd-arrow { transform: rotate(180deg); }

/* OPTIONS LIST */
.hcd-options {
    display: none; position: absolute; top: calc(100% + 5px); left: 0; right: 0;
    background: #fff; border: 1.5px solid #d0d0d0; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.13); z-index: 99999;
    max-height: 320px; overflow-y: auto; list-style: none; margin: 0; padding: 5px 0;
    animation: hcd-fadein .15s ease;
}
@keyframes hcd-fadein { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.hcd-dropdown.open .hcd-options { display: block; }
.hcd-options::-webkit-scrollbar { width: 5px; }
.hcd-options::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 3px; }

/* OPTION ITEM */
.hcd-option {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; cursor: pointer; font-size: 14px; color: #222;
    transition: background .12s; border-bottom: 1px solid #f5f5f5;
}
.hcd-option:last-child { border-bottom: none; }
.hcd-option:hover  { background: #f8f8f8; }
.hcd-option.active { background: #f2f2f2; font-weight: 600; }

/* SWATCH nei singoli item */
.hcd-swatch {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(0,0,0,.12);
    box-shadow: inset 0 1px 3px rgba(0,0,0,.2), 0 1px 3px rgba(0,0,0,.1);
}
.hcd-swatch-empty {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    border: 2px dashed #ccc; background: transparent;
}

/* REQUIRED */
.hcd-required-notice { display: none; color: #c0392b; font-size: 13px; margin-top: 6px; }
.hcd-required-notice.visible { display: block; }
