/************************************
 * CARRITO ADHOC WOOSUITE
 ************************************/

/* WRAPPER GENERAL */
.adhoc-woosuite-cart-wrapper {
    padding: 24px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e4e4e4;
    box-sizing: border-box;
}

/* Estado cargando (lo maneja el JS) */
.adhoc-woosuite-cart-wrapper.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
}

/* CABECERA */
.adhoc-woosuite-cart-header {
    margin-bottom: 20px;
}

.adhoc-woosuite-cart-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
    font-weight: 600;
}

.adhoc-woosuite-cart-subtitle {
    margin: 0;
    font-size: 0.96rem;
    color: #666666;
}

/* LAYOUT PRINCIPAL: LISTADO + RESUMEN */
.adhoc-woosuite-cart-layout {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 24px;
}

/* ESTADO CARRITO VACÍO */
.adhoc-woosuite-cart-empty {
    text-align: center;
    padding: 32px 16px;
}

.adhoc-woosuite-cart-empty p {
    margin-bottom: 16px;
    font-size: 1rem;
    color: #555555;
}

/* CABECERA LISTADO DE PRODUCTOS (tipo tabla) */
.adhoc-woosuite-cart-items-header {
    display: grid;
    grid-template-columns: 2.4fr 1fr 1fr 1fr 50px;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f5f5f5;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555555;
    margin-bottom: 8px;
}

.adhoc-woosuite-cart-items-header span {
    display: inline-block;
}

.adhoc-woosuite-cart-items-header-remove {
    text-align: right;
}

/* ITEM DEL CARRITO */
.adhoc-woosuite-cart-item {
    display: grid;
    grid-template-columns: 2.4fr 1fr 1fr 1fr 50px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ececec;
    margin-bottom: 10px;
    background: #ffffff;
}

/* PRODUCTO (IMAGEN + INFO) */
.adhoc-woosuite-cart-item-product {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.adhoc-woosuite-cart-item-thumb img {
    display: block;
    width: 64px;
    height: auto;
    border-radius: 4px;
}

.adhoc-woosuite-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Nombre de producto */
.adhoc-woosuite-cart-item-title a,
.adhoc-woosuite-cart-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #222222;
    text-decoration: none;
}

.adhoc-woosuite-cart-item-title a:hover {
    text-decoration: underline;
}

/* Metadatos / variaciones */
.adhoc-woosuite-cart-item-meta {
    font-size: 0.82rem;
    color: #777777;
}

/* PRECIO, SUBTOTAL */
.adhoc-woosuite-cart-item-price,
.adhoc-woosuite-cart-item-subtotal {
    font-size: 0.95rem;
    color: #333333;
}

/* CANTIDAD */
.adhoc-woosuite-cart-item-qty {
    max-width: 90px;
}

.adhoc-woosuite-cart-qty {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: 1px solid #d3d3d3;
    box-sizing: border-box;
}

/* BOTÓN ELIMINAR */
.adhoc-woosuite-cart-item-remove {
    text-align: right;
}

.adhoc-woosuite-cart-remove {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #bbbbbb;
    padding: 0;
}

.adhoc-woosuite-cart-remove:hover {
    color: #333333;
}

/* COLUMNA DERECHA: RESUMEN Y CUPÓN */
.adhoc-woosuite-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* CUPÓN */
.adhoc-woosuite-cart-coupon h2,
.adhoc-woosuite-cart-totals h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 600;
}

.adhoc-woosuite-cart-coupon-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.adhoc-woosuite-cart-coupon-form button{
    width: 100%;
}

.adhoc-woosuite-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #d3d3d3;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* TOTALES */
.adhoc-woosuite-cart-totals {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
    background: #fafafa;
}

.adhoc-woosuite-cart-totals-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.adhoc-woosuite-cart-totals-row span:last-child {
    text-align: right;
}

.adhoc-woosuite-cart-totals-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 1rem;
}

/* Códigos de cupón aplicados */
.adhoc-woosuite-cart-coupon-code {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 4px;
    border-radius: 4px;
    background: #e8f0ff;
    font-size: 0.8rem;
}

/* Botones acciones resumen */
.adhoc-woosuite-cart-totals-actions {
    margin-top: 14px;
    text-align: right;
}

/* BOTONES GENÉRICOS ADHOC */
.adhoc-woosuite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

/* Principal: para finalizar compra, CTAs importantes */
.adhoc-woosuite-btn-primary {
    background-color: #111111;
    color: #ffffff;
    border-color: #111111;
}

.adhoc-woosuite-btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
    color: #ffffff;
}

/* Secundario: botones suaves tipo "volver a la tienda", "aplicar cupón" */
.adhoc-woosuite-btn-secondary {
    background-color: #f5f5f5;
    color: #333333;
    border-color: #dddddd;
}

.adhoc-woosuite-btn-secondary:hover {
    background-color: #e8e8e8;
    border-color: #cccccc;
}

/* PRECIOS EN LA COLUMNA DE PRECIO */
.adhoc-woosuite-cart-item-price {
    font-size: 0.95rem;
    color: #333333;
}

/* Precio sin rebaja (tachado, más suave) */
.adhoc-woosuite-price-regular {
    display: block;
    font-size: 0.85rem;
    color: #999999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

/* Precio real rebajado (destacado) */
.adhoc-woosuite-price-sale {
    display: block;
    font-size: 0.95rem;
    color: #222222;
    font-weight: 600;
}

/* Precio normal (sin rebaja) */
.adhoc-woosuite-price-normal {
    display: block;
    font-size: 0.95rem;
    color: #333333;
    font-weight: 500;
}

/************************************
 * POPUP DEL CARRITO (COUPONES, ERRORES, ETC.)
 ************************************/

.adhoc-woosuite-cart-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.adhoc-woosuite-cart-popup.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.adhoc-woosuite-cart-popup-inner {
    max-width: 360px;
    width: 100%;
    background: #ffffff;
    border-radius: 10px;
    padding: 18px 18px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    text-align: left;
    border: 1px solid #e4e4e4;
}

/* Icono/estado */
.adhoc-woosuite-cart-popup-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid transparent;
}

/* Estado OK */
.adhoc-woosuite-cart-popup.is-success .adhoc-woosuite-cart-popup-icon {
    border-color: #1b9e4b;
    background: #e9f8ef;
}

/* Estado error */
.adhoc-woosuite-cart-popup.is-error .adhoc-woosuite-cart-popup-icon {
    border-color: #c62828;
    background: #fdecec;
}

.adhoc-woosuite-cart-popup-message {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #222222;
    line-height: 1.4;
}

.adhoc-woosuite-cart-popup-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    font-size: 0.88rem;
    border-radius: 4px;
    border: 1px solid #cccccc;
    background: #f5f5f5;
    cursor: pointer;
    color: #333333;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.adhoc-woosuite-cart-popup-close:hover {
    background: #e8e8e8;
    border-color: #b8b8b8;
}


/************************************
 * RESPONSIVE
 ************************************/

@media (max-width: 900px) {
    .adhoc-woosuite-cart-layout {
        grid-template-columns: 1fr;
    }

    .adhoc-woosuite-cart-summary {
        order: -1; /* Resumen arriba en mobile si te interesa, ponlo en 0 para mantener orden */
    }
}

@media (max-width: 720px) {

    .adhoc-woosuite-cart-items-header {
        display: none; /* Ocultamos cabecera tipo tabla en móvil */
    }

    .adhoc-woosuite-cart-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .adhoc-woosuite-cart-item-price,
    .adhoc-woosuite-cart-item-qty,
    .adhoc-woosuite-cart-item-subtotal,
    .adhoc-woosuite-cart-item-remove {
        text-align: left;
    }

    .adhoc-woosuite-cart-item-price,
    .adhoc-woosuite-cart-item-subtotal {
        font-size: 0.9rem;
    }

    .adhoc-woosuite-cart-item-qty {
        max-width: 120px;
    }

    .adhoc-woosuite-cart-totals {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .adhoc-woosuite-cart-wrapper {
        padding: 16px;
        border-radius: 6px;
    }

    .adhoc-woosuite-cart-title {
        font-size: 1.3rem;
    }

    .adhoc-woosuite-cart-subtitle {
        font-size: 0.9rem;
    }

    .adhoc-woosuite-cart-item {
        padding: 10px;
    }

    .adhoc-woosuite-input {
        width: 100%;
    }

    .adhoc-woosuite-cart-coupon-form {
        flex-direction: column;
        align-items: stretch;
    }

    .adhoc-woosuite-cart-totals-actions {
        text-align: left;
    }
}
