/* =============================================================================
   WC Variation Widget — Estilos base del frontend
   Estos estilos proveen defaults razonables; todo es personalizable
   desde la pestaña Estilo del widget en Elementor.
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.wcvw-wrapper {
    font-family: inherit;
    color: inherit;
    line-height: 1.5;
}

/* ── Precio ──────────────────────────────────────────────────────────────── */

.wcvw-price {
    margin-bottom: 1rem;
}

.wcvw-price .price {
    font-size: 1.5em;
    font-weight: 600;
}

.wcvw-price del {
    opacity: 0.6;
}

.wcvw-price del .amount {
    text-decoration: line-through;
}

.wcvw-price ins {
    text-decoration: none;
    font-weight: 700;
}

/* ── Variaciones ─────────────────────────────────────────────────────────── */

.wcvw-variations {
    margin-bottom: 1.25rem;
}

.wcvw-attribute {
    margin-bottom: 1.25rem;
}

/* Etiqueta del atributo */
.wcvw-attribute-label {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25em;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.wcvw-label-sep {
    margin-right: 0.1em;
}

.wcvw-label-value {
    font-weight: 400;
    opacity: 0.75;
}

/* ── Botones de variación ────────────────────────────────────────────────── */

.wcvw-options-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wcvw-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
    padding: 0.4em 1em;
    background-color: #f5f5f5;
    color: inherit;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
    outline: none;
    appearance: none;
}

.wcvw-option-btn:hover {
    background-color: #e8e8e8;
    border-color: #999;
}

.wcvw-option-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wcvw-option-btn.is-selected {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    font-weight: 600;
}

/* ── Radio de variación ──────────────────────────────────────────────────── */

.wcvw-options-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wcvw-radio-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    cursor: pointer;
    user-select: none;
}

.wcvw-option-radio {
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.wcvw-option-radio-label {
    line-height: 1.4;
}

/* ── Select de variación ─────────────────────────────────────────────────── */

.wcvw-options-select-wrapper {
    display: inline-block;
}

.wcvw-option-select {
    font-family: inherit;
    font-size: inherit;
    padding: 0.5em 2em 0.5em 0.75em;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background-color: #ffffff;
    color: inherit;
    cursor: pointer;
    min-width: 160px;
    appearance: auto;
    -webkit-appearance: auto;
    line-height: 1.4;
}

.wcvw-option-select:focus {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* ── Descripción corta (fija) ────────────────────────────────────────────── */

.wcvw-short-description {
    margin: 1rem 0;
    line-height: 1.6;
}

.wcvw-short-description p:last-child {
    margin-bottom: 0;
}

/* ── Descripción larga (dinámica, se actualiza con variación) ────────────── */

.wcvw-description {
    margin: 0.5rem 0 1.25rem;
    line-height: 1.6;
}

.wcvw-description p:last-child {
    margin-bottom: 0;
}

/* ── Botón CTA ───────────────────────────────────────────────────────────── */

.wcvw-cta-wrapper {
    display: flex;
    margin-top: 1.25rem;
}

.wcvw-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    line-height: 1.4;
    padding: 0.75em 1.5em;
    background-color: #25d366;
    color: #ffffff;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.wcvw-cta-btn:hover {
    background-color: #1da851;
    color: #ffffff;
    text-decoration: none;
}

.wcvw-cta-btn:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.wcvw-btn-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Placeholder del editor ──────────────────────────────────────────────── */

.wcvw-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f9f9f9;
    border: 2px dashed #c8c8c8;
    border-radius: 6px;
    text-align: center;
    color: #888;
    gap: 0.75rem;
}

.wcvw-placeholder .eicon-woocommerce {
    font-size: 2.5rem;
    opacity: 0.4;
}

.wcvw-placeholder p {
    margin: 0;
    font-size: 0.875rem;
}
