* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Baloo 2', cursive;
}
a {
    text-decoration: none;
}

body {
    background: #F7F3EF;
    color: #3A2A1F;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #9B5227;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.cart-btn {
    background: #E3735E;
    padding: 8px 12px;
    border-radius: 50%;
}

.cart-btn:hover {
    background: #fff;
    color: #9B5227;
}

/* ===== TIENDA ===== */
.store {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== PRODUCTO ===== */
.product-card {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 25px;
    align-items: center;
}

/* Imagen */
.product-image {
    width: 35%;
    min-height: 220px;
    border: 2px dashed #875F42;
    border-radius: 15px;
}

/* Info */
.product-info {
    width: 65%;
}

.product-info h2 {
    color: #9B5227;
    margin-bottom: 10px;
}

.product-info p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Botones */
.product-actions {
    display: flex;
    gap: 15px;
}

.product-actions button {
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Agregar carrito */
.btn-cart {
    background: #875F42;
    color: #fff;
}

.btn-cart:hover {
    background: #9B5227;
}

/* Compra directa */
.btn-buy {
    background: #E3735E;
    color: #fff;
}

.btn-buy:hover {
    background: #9B5227;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .product-card {
        flex-direction: column;
    }

    .product-image,
    .product-info {
        width: 100%;
    }
}

.cart-container {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;
    color: #9B5227;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
}

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.product-actions button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-actions button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px dashed #875F42;
}

.btn-buy.stripe {
    background: #6772e5;
    color: white;
}

/* ===== MODAL CARRITO ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #F7F3EF;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;

    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-box h2 {
    color: #9B5227;
    margin-bottom: 10px;
}

.modal-box p {
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-confirm {
    background: #9B5227;
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-confirm:hover {
    background: #875F42;
}

.btn-cancel {
    background: #E3735E;
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #c95d4b;
}

/* ===== CHECKOUT MODAL ===== */
.checkout-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.checkout-modal.active {
    display: flex;
}

.checkout-box {
    background: #F7F3EF;
    width: 90%;
    max-width: 420px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

#checkoutItems {
    margin: 20px 0;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #875F42;
}

.checkout-total {
    font-weight: bold;
    margin: 15px 0;
    text-align: right;
}

.btn-buy.whatsapp {
    background: #25D366;
    color: #fff;
    margin-bottom: 10px;
}

.btn-buy.stripe {
    background: #6772e5;
    color: #fff;
}

/* ===== BOTONES CHECKOUT PREMIUM (FIX) ===== */
.btn-buy {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.4px;

    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ICONOS */
.btn-buy i {
    font-size: 20px;
}

/* WHATSAPP */
.btn-buy.whatsapp {
    background: linear-gradient(135deg, #25D366, #1EBE5D);
    color: #fff;
}

.btn-buy.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

/* TARJETA / STRIPE */
.btn-buy.stripe {
    background: linear-gradient(135deg, #6772e5, #5469d4);
    color: #fff;
}

.btn-buy.stripe:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(103, 114, 229, 0.45);
}

/* SEPARACIÓN */
.btn-buy+.btn-buy {
    margin-top: 12px;
}

/* CLICK */
.btn-buy:active {
    transform: scale(0.97);
}

/* ===== BOTONES PRODUCTO ===== */
.product-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Botón agregar carrito */
.product-actions .btn-cart {
    width: auto;
    padding: 12px 18px;
    background: #875F42;
}

/* Botón compra directa */
.product-actions .btn-direct {
    flex: 1;
    /* ocupa el resto del espacio */
    padding: 14px 20px;
    background: linear-gradient(135deg, #E3735E, #D86450);
    font-weight: 700;
}

/* Evita que hereden el width 100% del checkout */
.product-actions .btn-buy {
    width: auto;
}

@media (max-width: 600px) {
    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn-direct {
        width: 100%;
    }

    .product-actions .btn-cart {
        width: 100%;
    }
}