/* ========================================
   ORABELLAS CART - ESTILOS COMPLETOS
   ======================================== */

.ast-container {
    max-width: 100%;
}

.entry-content[data-ast-blocks-layout] > * {
    max-width: 100% !important;
    padding: 0 100px;
}

/* ========================================
   AJUSTES PARA ASTRA
   ======================================== */
.yes-js.js_active .ast-plain-container.ast-single-post #primary {
    margin: 0px !important;
}

.site-content .ast-container {
    display: flex;
    padding: 0px;
}

header.entry-header .entry-title {
    padding: 25px 100px;
    border-radius: 0 0 var(--orabellas-radius-lg) var(--orabellas-radius-lg);
    background-color: var(--orabellas-bg);
    box-shadow: 5px 5px 10px #AEAEC033;
}

@media(max-width:1025px) {
    .entry-content[data-ast-blocks-layout] > * {
        padding: 0 20px;
    }
    header.entry-header .entry-title {
        padding: 25px 20px;
        border-radius: 0 0 var(--orabellas-radius-lg) var(--orabellas-radius-lg);
        background-color: var(--orabellas-bg);
        box-shadow: 5px 5px 10px #AEAEC033;
    }
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.orabellas-cart-container {
    margin: 20px auto;
    padding: 0 20px;
}

/* ========================================
   HEADER DEL CARRITO
   ======================================== */
.orabellas-cart-header {
    text-align: center;
    margin-bottom: 30px;
}

.orabellas-cart-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--orabellas-text-dark);
    margin-bottom: 8px;
}

.orabellas-cart-subtitle {
    font-size: 16px;
    color: var(--orabellas-text-secondary);
}

/* ========================================
   GRID DE DOS COLUMNAS - STICKY DEFINITIVO
   ======================================== */
.orabellas-cart-grid {
    display: grid;
    gap: 20px;
    align-items: stretch;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ========================================
   COLUMNA IZQUIERDA - PRODUCTOS
   ======================================== */
.orabellas-cart-products {
    position: sticky;
    top: 150px;
    align-self: start;
    height: fit-content;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 20px;
}

.products-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--orabellas-text-dark);
    margin: 0;
}

.empty-cart-btn {
    background: var(--orabellas-cream-light);
    border: 1px solid var(--orabellas-primary);
    color: var(--orabellas-primary);
    padding: 15px 30px;
    border-radius: var(--orabellas-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--orabellas-transition);
}

.empty-cart-btn:hover {
    background: var(--orabellas-primary);
    color: var(--orabellas-cream-light);
}

.empty-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.empty-cart-btn .orabellas-spinner {
    display: none;
}

.empty-cart-btn.loading .orabellas-spinner {
    display: inline-block;
}

/* ========================================
   PRODUCT CARDS
   ======================================== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 0;
}

.product-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--orabellas-bg);
    border-radius: var(--orabellas-radius-lg);
    transition: var(--orabellas-transition);
    border: 1px solid var(--orabellas-white);
    box-shadow: var(--orabellas-shadow-card);
    max-width: 500px;
}

.product-card:hover {
    border-color: var(--orabellas-primary);
    box-shadow: 0 2px 12px rgba(155, 28, 46, 0.15);
}

.product-card.removing {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card-image {
    flex: 0 0 136px;
    height: 182px;
    border-radius: var(--orabellas-radius);
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: space-between;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--orabellas-text-dark);
    margin: 0;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--orabellas-primary);
}

.product-description {
    font-size: 14px;
    color: var(--orabellas-text-muted);
    font-weight: 500;
    margin: 0;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    flex-direction: row;
    justify-content: space-between;
}

.product-meta .price {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.product-price {
    font-weight: 700;
    color: var(--orabellas-primary);
}

.product-subtotal-label {
    color: var(--orabellas-text-muted);
}

.product-subtotal {
    font-weight: 600;
    color: var(--orabellas-text);
}

.product-actions {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    justify-content: space-between;
}

/* ========================================
   ELIMINAR PRODUCTO
   ======================================== */
.remove-item-btn {
    position: relative;
    background: transparent;
    background-image: url(../iconos/Trash\ Bin\ Trash.svg);
    width: 30px;
    height: 30px;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    background-color: transparent;
    transform: scale(1.08);
}

.remove-item-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    background-image: none !important;
}

.remove-item-btn.loading .remove-icon {
    display: none !important;
}

.remove-item-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(155, 28, 46, 0.2);
    border-radius: 50%;
    border-top-color: var(--orabellas-primary);
    animation: spin 0.8s linear infinite;
    display: block;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.product-quantity-display {
    display: flex;
}

/* ========================================
   SEGUIR COMPRANDO
   ======================================== */
.continue-shopping-wrapper {
    margin-top: 20px;
    padding-top: 15px; 
}

.continue-shopping-btn {
    color: var(--orabellas-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.continue-shopping-btn:hover {
    color: var(--orabellas-primary);
}

/* ========================================
   COLUMNA DERECHA - RESUMEN + CHECKOUT
   ======================================== */

.orabellas-cart-checkout {
    position: sticky;
    top: 150px;
    align-self: start;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   RESUMEN DEL CARRITO
   ======================================== */
.cart-summary {
    background: var(--orabellas-bg);
    border-radius: var(--orabellas-radius-lg);
    padding: 20px;
    border: 1px solid var(--orabellas-white);
    box-shadow: var(--orabellas-shadow-card);
    width: 100%;
    box-sizing: border-box;
}

.cart-summary h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--orabellas-text-dark);
    text-align: center;
    margin: 0 0 15px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    color: var(--orabellas-text);
    font-weight: 400;
    padding: 6px 0;
}

.summary-row .summary-value {
    font-weight: 700;
}

.summary-row.summary-total {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--orabellas-primary);
}

.summary-row.summary-total .summary-value {
    color: var(--orabellas-primary);
}

.summary-row.coupon-discount .summary-value {
    color: #B2615C;
}

/* ========================================
   BOTÓN PROCEDER AL PAGO
   ======================================== */

.btn-proceed-checkout {
    display: block;
    background: var(--orabellas-primary);
    color: var(--orabellas-cream);
    border: 1px solid var(--orabellas-cream);
    padding: 14px 28px;
    border-radius: var(--orabellas-radius);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--orabellas-transition);
    width: 100%;
    margin-top: 15px;
    box-sizing: border-box;
}

.btn-proceed-checkout:hover {
    background: var(--orabellas-cream);
    color: var(--orabellas-primary);
    border-color: var(--orabellas-primary);
}

.btn-proceed-checkout:active {
    transform: scale(0.98);
}

.checkout-actions {
    display: flex;
    padding-top: 10px;
    gap: 20px;
    .btn-back-step {
        width: 30%;
        background: var(--orabellas-cream);
        color: var(--orabellas-primary);
        border: 1px solid var(--orabellas-primary);
        border-radius: var(--orabellas-radius);
    }
    .btn-place-order {
        width: 70%;
        background: var(--orabellas-primary);
        border: 1px solid var(--orabellas-cream);
        color: var(--orabellas-cream);
        border-radius: var(--orabellas-radius);
    }
}

/* ========================================
   CHECKOUT
   ======================================== */
.checkout {
    background: var(--orabellas-bg);
    border: 1px solid var(--orabellas-white);
    border-radius: var(--orabellas-radius-lg);
    box-shadow: var(--orabellas-shadow-card);
    padding: 20px;
    overflow: visible;
}

.checkout h4 {
    text-align: center;
    font-weight: 700;
    font-size: 24px;
}

.checkout form .form-row {
    padding: 0px !important;
    margin: 0px !important;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

.checkout form .form-row label {
    line-height: 1;
    font-weight: 500;
    font-size: 14px;
}

.checkout form .form-row input,
.checkout form .form-row select {
    border: none;
    border-radius: var(--orabellas-radius);
    font-size: 16px;
    font-weight: 400;
    color: var(--orabellas-text-muted);
}

.checkout form .form-row .phone-wrapper {
    display: flex;
    gap: 20px;
}

.checkout form .form-row .phone-wrapper .phone-country-select {
    width: 30%;
}

.checkout form .form-row .phone-wrapper .phone-format-hint {
    font-size: 14px;
}

.checkout form .form-row-2 {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 10px !important;
}

.checkout form .form-row-2 .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 48%;
}

.checkout form .btn-next-step {
    width: 100%;
    background: var(--orabellas-primary);
    color: var(--orabellas-cream);
    border: 1px solid var(--orabellas-cream);
    border-radius: var(--orabellas-radius);
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--orabellas-transition);
}

.express-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout form .btn-next-step:hover {
    background: var(--orabellas-cream);
    color: var(--orabellas-primary);
    border-color: var(--orabellas-primary);
}

/* ========================================
   VALIDACIÓN
   ======================================== */
.validation-error {
    color: red;
    font-size: 14px;
    line-height: 1;
}

/* ========================================
   INDICADOR DE PASOS
   ======================================== */
.checkout-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.4;
    transition: var(--orabellas-transition);
    cursor: default;
}

.step-indicator.active {
    opacity: 1;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(155, 28, 46, 0.15);
    color: var(--orabellas-text-secondary);
    font-weight: 700;
    font-size: 18px;
    transition: var(--orabellas-transition);
    border: 2px solid rgba(155, 28, 46, 0.2);
}

.step-indicator.active .step-number {
    background: var(--orabellas-primary);
    color: var(--orabellas-white);
    border-color: var(--orabellas-primary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(155, 28, 46, 0.15);
    margin: 0 8px;
    max-width: 50px;
    transition: background 0.3s ease;
}

.step-indicator.active + .step-line {
    background: var(--orabellas-primary);
}

.step-indicator[data-step="2"].active ~ .step-line {
    background: var(--orabellas-primary);
}

/* ========================================
   RESPONSIVE - Indicador de pasos
   ======================================== */
@media (max-width: 480px) {
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }
    
    .step-line {
        max-width: 30px;
        margin: 0 5px;
    }
}

/* ========================================
   RESPONSIVE GENERAL
   ======================================== */
@media (max-width: 992px) {
    .orabellas-cart-grid {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }
    .orabellas-cart-products {
        position: static;
        height: auto;
    }
    .orabellas-cart-checkout {
        position: static;
        height: auto;
    }
    .orabellas-cart-container {
        margin: 0;
        padding: 0;
    }
    .products-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0px;
    }
    .products-list .product-title {
        font-size: 14px;
    }
    .products-list .product-description {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .orabellas-cart-container {
        padding: 0 12px;
    }
    .orabellas-cart-title {
        font-size: 24px;
    }
    .product-card {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        max-width: 100%;
    }
    .product-card-image {
        flex: 0 0 120px;
        height: 160px;
        width: 120px;
    }
    .product-meta .price {
        justify-content: center;
    }
    .product-actions {
        justify-content: center;
    }
    .products-list {
        grid-template-columns: 1fr;
    }
    .products-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        text-align: center;
    }
    .empty-cart-btn {
        width: 100%;
    }
    .summary-row {
        font-size: 16px;
    }
    .btn-proceed-checkout {
        font-size: 16px;
        padding: 12px 20px;
    }
}

@media (max-width: 426px) {
    .entry-content[data-ast-blocks-layout] > * {
        padding: 0 10px;
    }
    .product-card {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    .product-card-image {
        height: auto;
        width: auto;
    }
    .quantity-control .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    .quantity-control .qty-input {
        width: 35px;
        height: 28px;
        font-size: 16px;
    }
}

/* ========================================
   ELIMINAR SCROLLBARS NO DESEADOS
   ======================================== */
.products-list::-webkit-scrollbar {
    display: none;
}
.orabellas-cart-products::-webkit-scrollbar {
    display: none;
}
.orabellas-cart-checkout::-webkit-scrollbar {
    display: none;
}

/* ========================================
   intl-tel-input - Estilos personalizados
   ======================================== */

/* Contenedor del teléfono */
.phone-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
}

.phone-wrapper .iti {
    width: 100%;
    display: flex;
    gap: 20px;
}

.phone-wrapper .iti__flag-container {
    position: relative;
    padding: 0 4px;
}

.phone-wrapper .iti__selected-flag {
    padding: 0 8px 0 10px;
    border-radius: var(--orabellas-radius);
    background: var(--orabellas-white);
    height: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.phone-wrapper .iti__selected-flag:focus {
    outline: none;
}

.phone-wrapper .iti__selected-flag .iti__flag {
    margin-right: 4px;
}

.phone-wrapper .iti__arrow {
    border-top-color: var(--orabellas-text-muted);
    margin-left: 4px;
}

.phone-wrapper .iti__country-list {
    background: var(--orabellas-white);
    border: 1px solid #ddd;
    border-radius: var(--orabellas-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
}

.phone-wrapper .iti__country {
    padding: 8px 12px;
    font-size: 14px;
}

.phone-wrapper .iti__country:hover {
    background: var(--orabellas-bg);
}

.phone-wrapper .iti__country.iti__highlight {
    background: var(--orabellas-bg);
}

/* Ajuste para el hint del teléfono */
.phone-format-hint {
    font-size: 14px;
    color: var(--orabellas-text-secondary);
    min-height: 18px;
    display: block;
    margin-top: 2px;
}

.phone-format-hint.success {
    color: #28a745;
}

.phone-format-hint.error {
    color: #dc3545;
}

/* ========================================
   VALIDACIÓN DE CAMPOS - intl-tel-input
   ======================================== */

/* Estado de error en el input del teléfono */
.phone-input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.phone-input.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* Asegurar que el campo de teléfono tenga altura correcta */
#billing_phone {
    min-height: 48px;
    padding-left: 16px !important;
}

/* ========================================
   RESPONSIVE - intl-tel-input
   ======================================== */

@media (max-width: 768px) {
    .phone-wrapper .iti__selected-flag {
        min-height: 44px;
        padding: 0 6px 0 8px;
    }
}

@media (max-width: 480px) {
    .phone-wrapper .iti__selected-flag {
        min-height: 40px;
        padding: 0 4px 0 6px;
    }
    
    .phone-wrapper .iti__country {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* ========================================
   Carrito vacio
   ======================================== */

.ast-container {
    display: flex;
    max-width: 100% !important;
    padding: 0px;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    .content-area {
        width: 100%;
        margin: 0px;

        .entry-header {
            h1 { 
                font-size: 30px;
                font-weight: 600;
                color: var(--orabellas-text);
                margin: 0px;
            }
        }

        .entry-content {
            form {
                .yith-wcwl-form {
                    .cart-grid-container {
                        display: flex;
                        flex-direction: row;
                        align-items: center;
                        justify-content: center;
                        gap: 20px;
                        min-height: 60vh;

                        .cart-empty-message, .cart-empty-message-2 {
                            display: flex;
                            height: fit-content;
                            width: fit-content;
                            padding: 20px;
                            border: 1px solid var(--orabellas-white);
                            background: var(--orabellas-bg);
                            flex-direction: column;
                            align-items: center;
                            justify-content: center;
                            border-radius: var(--orabellas-radius-lg);
                            box-shadow: -5px -5px 10px 0px rgba(255, 255, 255, 0.5), 5px 5px 10px 0px rgba(174, 174, 192, 0.2) !important;
                        }
                        
                        .cart-empty-message p {
                            font-size: 16px;
                            font-weight: 700;
                            line-height: 25px;
                            color: var(--orabellas-text);
                        }
                        
                        .cart-empty-message-2 {

                            h2 {
                                font-size: 50px;
                                font-weight: 400;
                                text-transform: uppercase;
                                line-height: 60px;
                                color: var(--orabellas-primary);
                                margin: 0px;
                            }

                            p, ul {
                                margin: 0px;
                                font-size: 14px;
                                font-weight: 400;
                                line-height: 20px;
                                color: var(--orabellas-text-muted);
                                padding: 0px;
                            }
                        }
                    }
                }
            }
        }
    }
}

.cart-title  {
    display: none;
} 

.icon-heart {
    background-image: url(../iconos/Heart\ Angle.svg);
    display: flex;
    width: 100px;
    height: 100px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* ========================================
   CHECKOUT NATIVO WOOCOMMERCE - OCULTAR ELEMENTOS
   ======================================== */

/* Ocultar el título "Tu pedido" nativo de WooCommerce */
#order_review_heading {
    display: none !important;
}

/* Ocultar la tabla de revisión del pedido nativa (usamos nuestro resumen) */
.woocommerce-checkout-review-order-table {
    display: none !important;
}

/* Asegurar que los métodos de pago se muestren correctamente */
#payment {
    margin-top: 0 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order {
    padding: 0 !important;
    background: none !important;
}

#payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

#payment div.payment_box {
    background: var(--orabellas-bg) !important;
    border: 1px solid var(--orabellas-white) !important;
    border-radius: var(--orabellas-radius) !important;
    box-shadow: var(--orabellas-shadow-card) !important;
    margin: 10px 0 !important;
}

#payment div.payment_box::before {
    display: none !important;
}

#payment div.form-row.place-order {
    display: none !important;
}

/* Estilo para los labels de métodos de pago */
#payment ul.payment_methods li {
    list-style: none !important;
    margin-bottom: 10px !important;
    padding: 15px !important;
    background: var(--orabellas-bg) !important;
    border: 1px solid var(--orabellas-white) !important;
    border-radius: var(--orabellas-radius-lg) !important;
    box-shadow: var(--orabellas-shadow-card) !important;
    transition: var(--orabellas-transition) !important;
}

#payment ul.payment_methods li:hover {
    border-color: var(--orabellas-primary) !important;
    box-shadow: 0 2px 12px rgba(155, 28, 46, 0.15) !important;
}

#payment ul.payment_methods li label {
    font-weight: 600 !important;
    color: var(--orabellas-text-dark) !important;
    font-size: 16px !important;
    cursor: pointer !important;
}

/* Checkout page - evitar duplicación de layout de Astra */
.woocommerce-checkout .col2-set {
    display: none !important;
}

.woocommerce-checkout h3#order_review_heading {
    display: none !important;
}

/* Asegurar que el formulario no tenga márgenes extraños en checkout */
.page-template-default.woocommerce-checkout .entry-content,
.woocommerce-checkout .entry-content {
    width: 100% !important;
}

/* Ocultar mensajes de woocommerce que puedan aparecer arriba del checkout */
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error {
    display: none !important;
}
