* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', "Helvetica Neue", Arial, sans-serif;
    background-color: #fff;
    color: #1a1a1a;
}

/* ===== LAYOUT CHECKOUT ===== */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    max-width: 1100px;
    margin: 80px auto 60px;
    padding: 0 20px;
    align-items: start;
}

/* ===== COLUMNA IZQUIERDA ===== */
.checkout-left {
    padding-right: 50px;
    border-right: 1px solid #e8e8e8;
}

.checkout-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1a1a1a;
}

/* Inputs */
.checkout-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    background: #fff;
    margin-bottom: 10px;
    transition: border-color 0.2s;
    appearance: none;
}

.checkout-input:focus {
    outline: none;
    border-color: #1a1a1a;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.input-row .checkout-input {
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a1a1a;
    cursor: pointer;
}

/* ===== PRODUCTOS EN CHECKOUT ===== */
.checkout-products {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e8e8;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-img {
    width: 70px;
    height: 70px;
    background: #f5f5f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.checkout-item-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.checkout-item-meta {
    font-size: 12px;
    color: #757575;
    margin-bottom: 2px;
}

.checkout-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.btn-qty {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-qty:hover { background: #f0f0f0; }

.qty-num {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.delete-btn {
    font-size: 12px;
    color: #e00;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 6px;
}

.checkout-item-price {
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

/* ===== BOTÓN FINALIZAR COMPRA ===== */
.btn-finalizar {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
}

.btn-finalizar:hover { background-color: #333; }
.btn-finalizar:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Stripe payment element */
#payment-element {
    margin-bottom: 16px;
}

.payment-message {
    font-size: 13px;
    color: #e00;
    margin-top: 8px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 4px;
    border: 1px solid #fcc;
}

.payment-message.hidden { display: none; }

/* ===== COLUMNA DERECHA: RESUMEN ===== */
.checkout-right {
    padding-left: 40px;
    position: sticky;
    top: 90px;
}

.summary-box {
    background: #fff;
    padding: 0;
}

/* Mini productos en resumen */
#summary-items {
    margin-bottom: 16px;
}

.summary-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-mini-item:last-child { border-bottom: none; }

.summary-mini-img {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.summary-mini-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.summary-mini-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #888;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-mini-info {
    flex: 1;
}

.summary-mini-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.summary-mini-meta {
    font-size: 11px;
    color: #888;
}

.summary-mini-price {
    font-size: 13px;
    font-weight: 700;
}

/* Cupón */
.coupon-group {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.input-coupon {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.input-coupon:focus {
    outline: none;
    border-color: #1a1a1a;
}

.btn-apply {
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-apply:hover {
    background: #f0f0f0;
}

/* Totales */
.summary-divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 14px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.shipping-free {
    color: #1a1a1a;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-top: 4px;
}

/* ===== MENÚ LATERAL (heredado) ===== */
.side-bar {
    min-height: 100vh;
    background: #fff;
    width: 250px;
    left: -250px;
    position: fixed;
    overflow-y: auto;
    transition: 0.5s ease;
    transition-property: left;
    border-radius: 15px;
    z-index: 2000;
}

.side-bar.active {
    left: 0;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
}

header h3 {
    text-align: center;
    font-size: 25px;
    font-weight: bolder;
    position: relative;
    top: 20px;
}

header h4 {
    text-align: center;
    color: blue;
}

.close-btn {
    position: absolute;
    color: rgb(0,0,0);
    font-size: 17px;
    left: 89%;
    margin-top: 12px;
    cursor: pointer;
    z-index: 1002;
}

.menu {
    width: 100%;
    margin-top: 40px;
}

.menu .item { position: relative; cursor: pointer; }

.menu .item a {
    color: black;
    font-size: 18px;
    text-decoration: none;
    display: block;
    padding: 5px 30px;
    line-height: 60px;
    margin-bottom: 1px;
    font-family: 'Montserrat';
}

.item .list__img {
    width: 22px;
    margin-right: 15px;
    height: auto;
}

.menu-btn {
    color: #3e3e3e;
    position: absolute;
    cursor: pointer;
    font-size: 23px;
    margin: 15px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.menu-btn:hover {
    background-color: rgba(0,0,25,0.1);
    color: rgb(255,255,255);
    transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 850px) {
    .checkout-wrapper {
        grid-template-columns: 1fr;
        margin-top: 70px;
    }

    .checkout-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    .checkout-right {
        padding-left: 0;
        position: static;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}

/* ===== PAGO EXPRESS ===== */
.express-section {
    padding-bottom: 0;
}

#express-payment-element {
    margin-bottom: 16px;
    min-height: 44px;
}

/* Cuando no hay Apple Pay / Google Pay disponible, ocultar la sección */
#express-payment-element:empty + .express-divider {
    display: none;
}

.express-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.express-divider::before,
.express-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}
