@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary-color: #0056b3;
    --secondary-color: #28a745;
    --accent-color: #25d366;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    min-height: 100vh;
    margin: 0;
    padding-top: 70px; /* Espacio para el header fijo */
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    z-index: 997;
    text-align: center;
}

.site-header h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Grid de Productos */
.products-container {
    padding: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-details {
    padding: 1.5rem;
    text-align: center;
}

.product-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.price {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Carrito */
.cart-container {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 998;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    background: white;
    padding: 0.5rem 0;
    z-index: 2;
}

.cart-items {
    max-height: 60vh;
    overflow-y: auto;
}

.list-group-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--light-color);
}

.list-group-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-right: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-controls button:hover {
    background: var(--dark-color);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
}

/* Botones de opciones */
.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.option-btn {
    padding: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--light-color);
    color: var(--dark-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Carrito flotante y guía */
.floating-cart {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tooltip-guide {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out;
}

dialog::backdrop {
  background: rgba(0,0,0,0.5);
}
dialog {
  border: none;
  border-radius: 8px;
  padding: 1.5em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
  margin-top: 1em;
}

/* Animaciones */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes pulseAndBounce {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        transform: scale(1.1) translateY(-5px);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-cart-highlight {
    animation: pulseAndBounce 1.5s ease-in-out infinite;
}

/* Media Queries */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.5rem;
    }

    .product-details {
        padding: 1rem;
    }

    .product-details h3 {
        font-size: 1rem;
    }

    .cart-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        margin: 0;
        transition: right 0.3s ease;
    }

    .cart-container.active {
        right: 0;
    }

    .floating-cart {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

.items{
    display:none !important;
}

.product-portion {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.25rem;
}

/* Media Queries */
@media (max-width: 768px){
    /* … lo que ya tenías … */
}