/* CSS Minimalista y Elegante para Kiosko */
:root {
    --color-primary: #E8B4B8;
    --color-primary-dark: #D4939A;
    --color-white: #FFFFFF;
    --color-light: #F9F5F3;
    --color-dark: #2C2420;
    --radius-md: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background: var(--color-light);
    color: var(--color-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.entry-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.entry-card {
    background: white;
    padding: 3.5rem;
    border-radius: 30px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.entry-header {
    margin-bottom: 2.5rem;
}

.entry-header i {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.entry-header h1 {
    font-size: 1.8rem;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.entry-header p {
    color: #888;
    font-size: 1rem;
}

.entry-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.6rem;
}

.form-group label i {
    color: var(--color-primary);
    margin-right: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 1.1rem;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(232, 180, 184, 0.1);
}

.btn-large {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.1rem;
    border-radius: 15px;
    margin-top: 1rem;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 8px 20px rgba(232, 180, 184, 0.3);
    transition: all 0.3s;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(232, 180, 184, 0.4);
}



.kiosko-header {
    background: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-info i {
    font-size: 2rem;
    color: var(--color-primary);
}

.user-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-dark);
}

.user-phone {
    font-size: 0.85rem;
    color: #888;
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    order: 3;
    /* Asegura que vaya al final a la derecha */
}

.history-btn {
    order: 2;
    margin: 0 1rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-full);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    order: 1;
}

.history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    order: 3;
    margin-left: auto;
    /* Empuja a la derecha */
}

.cart-btn {
    position: relative;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    /* Centrar icono */
    align-items: center;
    justify-content: center;
}

.cart-btn:hover {
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #C9A55A;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
}

.filter-buttons::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.filter-btn {
    white-space: nowrap;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid #eee;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.section-title {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: 2rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .user-info {
        flex: 1;
        gap: 0.5rem;
    }

    .user-info i {
        font-size: 1.5rem;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .user-phone {
        font-size: 0.7rem;
    }

    .history-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .cart-summary {
        width: auto;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}

.product-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 120px;
    background: #fdf5f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
    line-height: 1.4;
    min-height: 2.8em;
    /* Force 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* Pushes button to bottom */
    line-height: 1.5;
}

.product-actions {
    margin-top: auto;
}

.add-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--color-primary);
    border: none;
    color: white;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.02);
}

.cart-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.cart-modal.active {
    display: flex;
}

.cart-modal-content {
    background: white;
    width: 95%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 30px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.cart-modal-header h3 {
    font-size: 1.5rem;
    color: var(--color-dark);
}

.close-modal {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s;
}

.close-modal:hover {
    background: #eee;
    color: var(--color-dark);
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #fafafa;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-quantity {
    font-size: 0.85rem;
    color: #888;
}

.remove-item {
    background: #fff0f1;
    color: #ff4d4d;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-item:hover {
    background: #ff4d4d;
    color: white;
}

.cart-modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-modal-footer .btn {
    flex: 1;
    justify-content: center;
}

/* History Page Styles */
.history-page {
    background: var(--color-light);
}

.history-list-full {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.status-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-recibido {
    background: #e0f2fe;
    color: #075985;
}

.status-badge.status-procesado {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-delivery {
    background: #fdf2f8;
    color: #9d174d;
}

.status-badge.status-entregado {
    background: #dcfce7;
    color: #166534;
}

.status-badge.status-cancelado {
    background: #fee2e2;
    color: #991b1b;
}




.confirmation-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    color: white;
}

.confirmation-modal.active {
    display: flex;
}

.confirmation-content {
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}