
/* --- Estilos Generales --- */
body {
    font-family: Arial, 'Times New Roman', Times, serif;
    margin: 0;
    background: #ff69b4;
}

* {
    box-sizing: border-box;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #ff69b4, #ff85c1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    flex-grow: 1;
    text-align: center;
    margin: 0;
    font-family: 'Dancing Script', cursive;
    font-size: 3em;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Banner --- */
.banner {
    background: url('img/fondo.png') center/cover no-repeat;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
    text-align: center;
    padding: 0 15px;
}

/* --- Categorías --- */
.categories {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.categories button {
    background: #e989ba;
    font-family: 'Times New Roman', Times, serif;
    font-size: 20px;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, background 0.3s;
}

.categories button.active {
    background: #ff1493;
    transform: scale(1.05);
}

.categories button:hover {
    background: #ff85c1;
}

/* --- Grid de Productos --- */
/* Escritorio grande: 4 columnas */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    
  /* Crea una cuadrícula de columnas responsivas */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 1.5rem; /* Espacio entre los productos */
}

/* Card del producto */
.product {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 0;
    display: flex;
    flex-direction: column;
    
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
     display: flex;
   flex-direction: column;
   justify-content: flex-start; /* Alinea los elementos al inicio de la columna */
   align-items: center; /* Centra todo horizontalmente dentro de la tarjeta */
   text-align: center; /* Centra el texto */
   padding: 1rem;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.product h2 {
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #333;
}

.product p {
    background: #ff69b4;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

/* Imagen del producto */
.product img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Precio */
.price {
    background: #ff69b4;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin: 8px 0;
    font-size: 16px;
}

/* --- Modal del Producto --- */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(100, 96, 96, 0.6);
    justify-content: center;
    align-items: center;
}

.product-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.product-content img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin-bottom: 15px;
}
.close-btn {
    /* Posición y apariencia básica */
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2.5rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;

    /* Aumenta el área de clic y la centra */
    width: 40px; /* Ancho fijo del botón */
    height: 40px; /* Altura fija del botón */
    display: flex;
    justify-content: center; /* Centra la 'X' horizontalmente */
    align-items: center; /* Centra la 'X' verticalmente */
    line-height: 1; /* Ayuda con la alineación del texto */
    padding: 0; /* Asegura que no haya padding que desplace el área */
    z-index: 100; /* Asegura que el botón esté sobre otros elementos */
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #000;
}



.modal-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#modal-price {
    margin-top: 10px;
    background: #ff69b4;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    display: inline-block;
}

.product-content > #modal-price {
    display: none;
}

/* --- Controles de Cantidad --- */
.quantity-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls button {
    background: #000000;
    border: none;
    color: white;
    padding: 6px 12px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.2s;
}

.quantity-controls button:hover {
    background: #e60073;
}

.quantity-controls input {
    width: 50px;
    text-align: center;
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* --- Botones --- */
.btn {
    background: #ff69b4;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 5px 3px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: #e60073;
    transform: scale(1.05);
}

.add-to-cart {
    background-color: #f37db8;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s ease;
}

.add-to-cart:hover {
    background-color: #e73370;
    transform: scale(1.05);
}

/* --- Precio y Carrito --- */
.price-cart {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

#cart-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4d88;
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

/* --- Carrito --- */
#cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    transition: right 0.4s ease-in-out;
    padding: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 3px solid #ff69b4;
    box-shadow: -5px 0 15px rgba(0,0,0,0.15);
}

#cart.active {
    right: 0;
}

#close-cart {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff69b4;
    border: none;
    color: white;
    font-size: 18px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#cart h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: bold;
    color: #ff4081;
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

#cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item:hover {
    transform: translateX(-3px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.cart-item-details p {
    margin: 3px 0;
    font-size: 13px;
    color: #888;
}

/* Footer del carrito */
.cart-footer {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    text-align: center;
}

#cart-total {
    font-weight: bold;
    text-align: right;
    font-size: 20px;
    color: #222;
    background: #fdf0f6;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    margin-bottom: 10px;
}

#checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(90deg, #ff69b4, #ff4081);
    color: white;
    padding: 14px;
    margin-top: 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s;
    font-size: 16px;
}

#checkout:hover {
    background: linear-gradient(90deg, #e60073, #c70039);
    transform: scale(1.05);
}

/* --- Notificación --- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4081;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    display: none;
    z-index: 2000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* --- Modal de Checkout --- */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.checkout-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.checkout-content h2 {
    margin-bottom: 15px;
    color: #ff4081;
    text-align: center;
    font-weight: bold;
}

.checkout-content input, 
.checkout-content select {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    transition: border 0.2s;
}

.checkout-content input:focus, 
.checkout-content select:focus {
    border-color: #ff69b4;
    outline: none;
    background: #fff;
}

.checkout-content button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(90deg, #ff69b4, #ff4081);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    transition: transform 0.2s, background 0.2s;
}

.checkout-content button:hover {
    background: linear-gradient(90deg, #e60073, #c70039);
    transform: scale(1.05);
}

.close-checkout {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #555;
}

/* --- Media Queries para Responsividad --- */
/* Tablets grandes: 3 columnas */
@media (max-width: 1024px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Móviles y Tablets pequeñas: 2 columnas */
@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }

    #cart-icon {
        top: 10px;
        right: 10px;
        font-size: 16px;
        padding: 8px;
        width: 35px;
        height: 35px;
        z-index: 1002;
    }
}

/* Móviles pequeños: 1 columna */
@media (max-width: 576px) {
    .products {
        grid-template-columns: repeat(1, 1fr);
    }
    
    #cart-icon {
        top: 5px;
        right: 5px;
        font-size: 14px;
        padding: 6px;
        width: 30px;
        height: 30px;
    }
}

/* Estilos para el contenedor del banner */
.banner-video-container {
    display: flex; /* Alinea los elementos en una fila */
    justify-content: center; /* Centra los videos */
    align-items: center;
    width: 100%;
    height: 300px; /* Ajusta la altura a tu gusto */
    overflow: hidden;
    position: relative;
}

/* Estilos para todos los videos del banner */
.banner-video {
    width: 33.33%; /* Cada video ocupa un tercio del contenedor */
    height: 100%;
    object-fit: cover; /* Asegura que el video cubra su espacio sin distorsionarse */
}

/* Opcional: Para evitar espacios entre los videos */
.banner-video:not(:last-child) {
    margin-right: 2px;
}

/* Estilos para el texto del banner sobre el video */
.banner-text {
    position: relative;
    z-index: 2; /* Asegura que el texto esté sobre el video */
    color: white; /* Color del texto para que contraste con el video */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Sombra para que el texto sea más legible */
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

@media (max-width: 768px) {
    /* Oculta los videos laterales */
    .left-video,
    .right-video {
        display: none;
    }

    /* Hace que el video central ocupe todo el ancho */
    .main-video {
        width: 100%;
    }
}