/* CLIENTE-CRITICAL.CSS - Essential styles only for initial render */
/* Target: ~3KB - Loaded synchronously to avoid render-blocking */

:root {
    --purple: #9b2d7d;
    --purple-light: #b8457a;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-text: #7a8794;
    --success: #27ae60;
    --yellow: #F3E93F;
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1300px;
    margin: 0 auto 40px;
}

/* ========== PRODUCT CARD ========== */
.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

/* ========== PRODUCT IMAGE ========== */
.product-image-wrapper {
    font-size: 80px;
    text-align: center;
    padding: 40px 20px;
    background: var(--gray-light);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.product-image-wrapper:hover {
    transform: scale(1.1);
    background: #e8e8e8;
}

/* ========== PRODUCT INFO ========== */
.product-info {
    padding: 20px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 16px;
}

/* ========== BUTTONS ========== */
.product-btn {
    width: 100%;
    padding: 12px;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: var(--purple-light);
    transform: scale(1.02);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-top: 20px;
}

.checkout-btn {
    width: 100%;
    background: var(--purple);
    color: var(--white);
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--purple-light);
}

/* ========== MODAL BASE ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* ========== CART SIDEBAR ========== */
.cart-sidebar {
    position: fixed;
    right: -450px;
    top: 0;
    width: 450px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

.cart-overlay.open {
    display: block;
}

/* PRODUCT DETAIL MODAL: estilos en cliente.css */

/* ========== TABLET BREAKPOINT ========== */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-image-wrapper {
        min-height: 150px !important;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* ========== MOBILE BREAKPOINT ========== */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: 8px;
        padding: 10px;
    }

    .product-image-wrapper {
        min-height: 120px !important;
    }

    .product-info {
        padding: 12px;
    }

    .product-name,
    .product-name-wrapper {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .product-price {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .product-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* ========== EXTRA SMALL MOBILE (360px and below) ========== */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card {
        padding: 8px;
    }

    .product-image-wrapper {
        min-height: 100px !important;
    }

    .product-name,
    .product-name-wrapper {
        font-size: 12px;
    }

    .product-price {
        font-size: 13px;
    }

    .product-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}
