/**
 * Directorio de Arte - Estilos de WooCommerce
 * Optimizado para WooCommerce Gutenberg Blocks y Modo Clásico.
 * Paleta: Fondo 1 (#f4ecd0), Fondo 2 (#e1d9c0), Terracota (#9a634e), Gold (#d97706), Texto (#374151 / #5a3c2a)
 */

/* =========================================================================
   1. CONTENEDOR GENERAL Y ESTRUCTURA DE PÁGINA
   ========================================================================= */
.woocommerce,
.woocommerce-page,
.wp-block-woocommerce-checkout,
.wc-block-checkout {
    font-family: 'Inter', sans-serif !important;
    color: #374151;
    box-sizing: border-box !important;
}

.woocommerce-page .art-main,
.woocommerce .art-main {
    min-height: 80vh;
    background: transparent !important;
}

.woocommerce-page .art-page-container,
.woocommerce .art-page-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 1.5rem 1.25rem 4rem !important;
    box-sizing: border-box !important;
}

/* =========================================================================
   2. WOOCOMMERCE BLOCKS: LAYOUT 2 COLUMNAS (SIDEBAR + MAIN)
   ========================================================================= */

/* Layout general de Bloques */
.wc-block-components-sidebar-layout,
.wc-block-components-sidebar-layout.wc-block-checkout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 1.75rem !important;
    margin: 1rem 0 3rem 0 !important;
    box-sizing: border-box !important;
}

/* En Desktop: 2 columnas bien alineadas */
@media (min-width: 900px) {
    .wc-block-components-sidebar-layout,
    .wc-block-components-sidebar-layout.wc-block-checkout {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 2.25rem !important;
    }

    .wc-block-components-main,
    .wc-block-checkout__main {
        flex: 1 1 60% !important;
        width: 60% !important;
        max-width: calc(62% - 1rem) !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .wc-block-components-sidebar,
    .wc-block-checkout__sidebar {
        flex: 0 0 38% !important;
        width: 38% !important;
        min-width: 310px !important;
        max-width: calc(38% - 1rem) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        position: sticky !important;
        top: 2rem !important;
    }
}

/* =========================================================================
   3. COLUMNA PRINCIPAL: TARJETAS DE PASOS DEL CHECKOUT
   ========================================================================= */

/* Cada tarjeta de paso (Contacto, Facturación, Envío, Pago, Notas) */
.wc-block-components-checkout-step,
.wc-block-checkout__contact-fields,
.wc-block-checkout__billing-fields,
.wc-block-checkout__shipping-fields,
.wc-block-checkout__payment-method,
.wc-block-checkout__order-notes {
    background: var(--color-fondo-2, #e1d9c0) !important;
    border: 1px solid rgba(154, 99, 78, 0.25) !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 4px 12px rgba(154, 99, 78, 0.05) !important;
    box-sizing: border-box !important;
}

/* Ocultar leyendas del screen reader para que no generen huecos en blanco */
legend.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

/* Cabeceras de los pasos */
.wc-block-components-checkout-step__heading-container {
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px dashed rgba(154, 99, 78, 0.25) !important;
}

.wc-block-components-checkout-step__title,
.wc-block-components-title {
    color: var(--txt-3, #5a3c2a) !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* =========================================================================
   4. FORMULARIO E INPUTS DE DIRECCIÓN (GUTENBERG BLOCKS)
   ========================================================================= */

/* Grid de campos de dirección */
.wc-block-components-address-form {
    display: grid !important;
    gap: 0.85rem !important;
}

/* Contenedores de Input Text */
.wc-block-components-text-input,
.wc-blocks-components-select__container {
    background: var(--color-fondo-1, #f4ecd0) !important;
    border: 1px solid rgba(154, 99, 78, 0.3) !important;
    border-radius: 0.5rem !important;
    padding: 0.4rem 0.75rem !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

/* Al enfocar o estar activo */
.wc-block-components-text-input:focus-within,
.wc-blocks-components-select__container:focus-within {
    background: #ffffff !important;
    border-color: #9a634e !important;
    box-shadow: 0 0 0 3px rgba(154, 99, 78, 0.18) !important;
}

/* Input nativo dentro del contenedor */
.wc-block-components-text-input input,
.wc-blocks-components-select__select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--txt-3, #5a3c2a) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    padding: 0.25rem 0 !important;
    margin: 0 !important;
    width: 100% !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* Etiquetas flotantes */
.wc-block-components-text-input label,
.wc-blocks-components-select__label {
    color: var(--color-text-muted, #6b7280) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.wc-block-components-text-input.is-active label {
    color: #9a634e !important;
    font-weight: 700 !important;
}

/* Tarjeta de Dirección ya guardada */
.wc-block-components-address-card {
    background: var(--color-fondo-1, #f4ecd0) !important;
    border: 1px solid rgba(154, 99, 78, 0.25) !important;
    border-radius: 0.5rem !important;
    padding: 0.95rem 1.15rem !important;
    color: var(--txt-3, #5a3c2a) !important;
    margin-bottom: 0.85rem !important;
}

.wc-block-components-address-card address {
    font-style: normal !important;
    line-height: 1.45 !important;
    font-size: 0.875rem !important;
}

.wc-block-components-address-card__edit {
    color: #9a634e !important;
    font-weight: 700 !important;
    font-size: 0.825rem !important;
    text-decoration: underline !important;
    cursor: pointer !important;
}

.wc-block-components-address-form__address_2-toggle {
    color: #9a634e !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-block !important;
    margin-top: 0.25rem !important;
}

/* =========================================================================
   5. MÉTODOS DE PAGO (PAYPAL / TARJETA / BACS)
   ========================================================================= */

.wc-block-components-radio-control {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
}

.wc-block-components-radio-control-accordion-option {
    background: var(--color-fondo-1, #f4ecd0) !important;
    border: 1px solid rgba(154, 99, 78, 0.25) !important;
    border-radius: 0.5rem !important;
    margin: 0 !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option-checked {
    border-color: #9a634e !important;
    border-width: 1.5px !important;
    background: var(--color-fondo-1, #f4ecd0) !important;
}

.wc-block-components-radio-control__option {
    padding: 0.85rem 1rem !important;
}

.wc-block-components-payment-method-label,
.wc-block-components-radio-control__label {
    color: var(--txt-3, #5a3c2a) !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
}

.wc-block-components-radio-control-accordion-content {
    background: var(--color-fondo-2, #e1d9c0) !important;
    border-top: 1px solid rgba(154, 99, 78, 0.2) !important;
    padding: 0.85rem 1rem !important;
    color: var(--txt-3, #5a3c2a) !important;
    font-size: 0.825rem !important;
    line-height: 1.45 !important;
}

/* =========================================================================
   6. COLUMNA LATERAL (SIDEBAR): RESUMEN DEL PEDIDO
   ========================================================================= */

.wc-block-checkout__sidebar,
.wc-block-components-sidebar.is-sticky {
    background: var(--color-fondo-2, #e1d9c0) !important;
    border: 1.5px solid rgba(154, 99, 78, 0.35) !important;
    border-radius: 0.75rem !important;
    padding: 1.5rem !important;
    box-shadow: 0 6px 18px rgba(154, 99, 78, 0.08) !important;
    box-sizing: border-box !important;
}

.wc-block-components-checkout-order-summary__title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px dashed rgba(154, 99, 78, 0.25) !important;
}

.wc-block-components-checkout-order-summary__title-text {
    color: var(--txt-3, #5a3c2a) !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.wc-block-components-checkout-order-summary__title-price {
    color: #9a634e !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
}

/* Ítems del Resumen (Sin borde interno repetido) */
.wc-block-components-order-summary,
.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-components-totals-wrapper {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0.75rem !important;
    box-shadow: none !important;
}

.wc-block-components-order-summary-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    padding: 0.6rem 0 !important;
    border-bottom: 1px solid rgba(154, 99, 78, 0.18) !important;
}

.wc-block-components-order-summary-item__image {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 0.375rem !important;
    overflow: hidden !important;
    background: var(--color-fondo-1, #f4ecd0) !important;
    border: 1px solid rgba(154, 99, 78, 0.2) !important;
    flex-shrink: 0 !important;
}

.wc-block-components-order-summary-item__quantity {
    background: #9a634e !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    border-radius: 9999px !important;
    padding: 0.1rem 0.35rem !important;
}

.wc-block-components-product-name {
    color: var(--txt-3, #5a3c2a) !important;
    font-weight: 800 !important;
    font-size: 0.925rem !important;
    margin: 0 !important;
}

.wc-block-components-product-metadata__description p {
    color: var(--color-text-muted, #6b7280) !important;
    font-size: 0.775rem !important;
    margin: 0.15rem 0 0 !important;
}

.wc-block-components-product-price__value,
.wc-block-formatted-money-amount {
    color: #9a634e !important;
    font-weight: 800 !important;
}

/* Totales y Subtotales */
.wc-block-components-totals-item {
    color: var(--txt-3, #5a3c2a) !important;
    font-size: 0.875rem !important;
    padding: 0.45rem 0 !important;
    display: flex !important;
    justify-content: space-between !important;
}

.wc-block-components-totals-item__label {
    color: var(--txt-3, #5a3c2a) !important;
    font-weight: 600 !important;
}

.wc-block-components-totals-footer-item {
    border-top: 2px solid rgba(154, 99, 78, 0.3) !important;
    padding-top: 0.75rem !important;
    margin-top: 0.5rem !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: var(--txt-3, #5a3c2a) !important;
}

.wc-block-components-totals-footer-item-tax-value {
    font-size: 1.4rem !important;
    color: #9a634e !important;
    font-weight: 900 !important;
}

/* Términos y Condiciones */
.wc-block-checkout__terms {
    color: var(--color-text-muted, #6b7280) !important;
    font-size: 0.8rem !important;
    margin: 1.25rem 0 !important;
    line-height: 1.45 !important;
}

.wc-block-checkout__terms a {
    color: #9a634e !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

/* =========================================================================
   7. BOTÓN "REALIZAR EL PEDIDO"
   ========================================================================= */

.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    padding: 0.95rem 1.75rem !important;
    border-radius: 0.5rem !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
    transition: all 0.25s ease !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    letter-spacing: 0.01em !important;
}

.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.contained:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45) !important;
}

/* =========================================================================
   8. PÁGINA DE PRODUCTO INDIVIDUAL (SINGLE PRODUCT)
   ========================================================================= */

.art-single-product-wrapper {
    max-width: 960px !important;
    margin: 1.5rem auto 3rem !important;
}

.art-single-product-card {
    background: var(--color-fondo-2, #e1d9c0) !important;
    border: 1.5px solid rgba(154, 99, 78, 0.3) !important;
    border-radius: 1rem !important;
    padding: 2.5rem 2rem !important;
    box-shadow: 0 6px 20px rgba(154, 99, 78, 0.08) !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    margin-bottom: 2rem !important;
    box-sizing: border-box !important;
}

@media (min-width: 860px) {
    .art-single-product-card {
        grid-template-columns: 0.9fr 1.1fr !important;
        align-items: center !important;
    }
}

.art-product-visual-box {
    background: var(--color-fondo-1, #f4ecd0) !important;
    border: 1px solid rgba(154, 99, 78, 0.25) !important;
    border-radius: 0.75rem !important;
    padding: 2.5rem 2rem !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.art-product-visual-badge {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2.5rem !important;
    margin-bottom: 1.25rem !important;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35) !important;
}

.art-product-visual-title {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: var(--txt-3, #5a3c2a) !important;
    margin: 0 0 0.35rem 0 !important;
}

.art-product-visual-sub {
    font-size: 0.85rem !important;
    color: var(--color-text-muted, #6b7280) !important;
    margin: 0 !important;
}

.art-product-info-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
}

.art-product-info-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    align-self: flex-start !important;
}

.art-product-info-title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: var(--txt-3, #5a3c2a) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.art-product-info-price {
    display: flex !important;
    align-items: baseline !important;
    gap: 0.5rem !important;
}

.art-product-info-amount {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    color: #9a634e !important;
    line-height: 1 !important;
}

.art-product-info-period {
    font-size: 0.95rem !important;
    color: var(--color-text-muted, #6b7280) !important;
    font-weight: 600 !important;
}

.art-product-benefits-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
}

.art-product-benefit-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    font-size: 0.875rem !important;
    color: var(--txt-3, #5a3c2a) !important;
}

.art-product-benefit-item i {
    color: #d97706 !important;
    font-size: 0.95rem !important;
}

.art-product-btn-buy {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    padding: 0.95rem 1.85rem !important;
    border-radius: 0.5rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
    transition: all 0.25s ease !important;
    margin-top: 0.5rem !important;
}

.art-product-btn-buy:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45) !important;
}
