/* ========== VARIABLES Y RESET ========== */
:root {
    --primary-color: #ffcc00;
    --secondary-color: #e6b800;
    --background-color: #333;
    --text-color: #fff;
    --hover-color: #128C7E;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 10px;
    --star-color: #ffc107;
    --success-color: #4CAF50;
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ========== HEADER ========== */
header {
    background-color: rgba(41, 39, 39, 0.5);
    color: var(--text-color);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo img {
    height: 70px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}
/* ========== BOTÓN VOLVER ========== */
.back-to-products {
    position: fixed;
    top: 140px; /* Ajusta según la altura de tu header */
    left: 20px;
    z-index: 999;
    background: rgba(41, 39, 39, 0.8);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.back-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-to-products:hover {
    background: rgba(41, 39, 39, 0.95);
    transform: translateX(-5px);
}

.back-btn:hover {
    color: var(--text-color);
}

/* ========== HERO SECTION ========== */
.hero {
    background: url('assets/fondos/fondoPrincipal3.png') no-repeat center/cover;
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 1px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: -22rem;
}

.hero p {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.hero .btn {
    background: var(--primary-color);
    color: var(--background-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.hero .btn:hover {
    background: var(--secondary-color);
}

.social-media {
    margin-top: 50px;
    display: flex;
    gap: 40px;
    justify-content: center;
}

.social-media img {
    width: 3rem;
    height: auto;
    transition: transform 0.3s ease;
}

.social-media img:hover {
    transform: scale(1.2);
}

.discover-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--background-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    margin: 10px auto;
    text-align: center;
    transition: all 0.3s ease;
    width: 80%;
    box-shadow: var(--card-shadow);
}

.discover-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* ========== PRODUCTOS ========== */
.products {
    background: url('assets/fondos/fondoProductos.png') no-repeat center/cover;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 1px;
}

.products h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #fff;
    margin-top: 3rem;
}

.products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.product-card {
    width: calc(33.33% - 14px);
    background: rgba(255, 255, 255, 0.871);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    padding-bottom: 1rem;
    overflow: hidden;
}

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

.product-card img {
    width: 100%;
    height: 410px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: var(--background-color);
}

.product-card p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #555;
}

/* ========== BOTÓN AÑADIR AL CARRITO ========== */
.add-to-cart {
    background: var(--success-color);
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.add-to-cart:hover {
    background: #53b037;
}

/* Estado cuando se añade al carrito */
.add-to-cart.added {
    background:#cc0000;
    animation: pulse 0.1s;
}

@keyframes pulse {
    0% { transform: scale(0); }
    50% { transform: scale(0px); }
    100% { transform: scale(0); }
}

/* ========== INFORMACIÓN DE CONTACTO ========== */
.contact-info {
    font-weight: normal;
    padding: 4rem 2rem;
    background: url('assets/fondos/fondoReseña.png') no-repeat center/cover;
    text-align: center;
}

.contact-info h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: bold;
}

.contact-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.icon-container {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--background-color);
}

.contact-card p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: #555;
    text-align: center;
}

/* Estilos para los botones */
.whatsapp-link, .map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    font-weight: bold;
    gap: 8px;
}

.whatsapp-link {
    background: #25d366;
    color: white;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.map-link {
    background: #4285F4;
    color: white;
}

.map-link:hover {
    background: #3367D6;
    transform: translateY(-2px);
}

.whatsapp-icon, .map-icon {
    width: 20px;
    height: 20px;
}
.contact-card:nth-child(2) {
    position: relative;
    padding-bottom: 9rem;
}

.contact-card:nth-child(2) .whatsapp-link {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 10rem);
    text-align: center;
}

/* Estilos para el reloj */
.clock-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
    position: relative;
}

.clock-face {
    width: 100%;
    height: 100%;
    border: 3px solid var(--background-color);
    border-radius: 50%;
    position: relative;
    background: white;
}

.hour-hand {
    width: 4px;
    height: 25px;
    background: var(--background-color);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    animation: rotateHour 12s infinite linear;
}

.minute-hand {
    width: 3px;
    height: 35px;
    background: var(--background-color);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: bottom center;
    animation: rotateMinute 6s infinite linear;
}

.center-dot {
    width: 8px;
    height: 8px;
    background: var(--background-color);
    border-radius: 50%;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contact-card:nth-child(3) {
    display: flex;
    flex-direction: column;
}

.contact-card:nth-child(3) .clock-icon {
    order: 1;
    margin-top: 2rem;
    margin-bottom: 0;
}

@keyframes rotateHour {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes rotateMinute {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}


/* ========== GALERÍA ========== */
.gallery {
    font-weight: bold;
    padding: 4rem 0;
    background: url('assets/fondos/fondoGaleria.png') no-repeat center/cover;
    text-align: center;
    color: white;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.gallery h2 {
    font-size: 2.5rem;
}

.gallery-reel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: auto;
    height: 400px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0);
}

.reel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.reel-item {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
}

.reel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

/* Controles de navegación */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 0;
}

.prev-btn::before, .next-btn::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border-left: 5px solid white;
    border-bottom: 5px solid white;
    transition: all 0.3s ease;
}

.prev-btn::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

.next-btn::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(22, 113, 31, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn:hover::before, .next-btn:hover::before {
    border-color: var(--primary-color);
}

.prev-btn {
    left: 50px;
}

.next-btn {
    right: 50px;
}

.prev-btn:active, .next-btn:active {
    transform: translateY(-50%) scale(0.95);
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

/* ========== CARRITO ========== */
.cart {
    background: url('assets/fondos/fondoCarrito.png') no-repeat center/cover;
    padding: 1.6rem;
    margin-top: 3.8rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    min-height: 75vh;
    justify-content: flex-start;
}

.cart h2 {
    font-size: 2rem;

    color: var(--background-color);
}

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

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

.item-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-grow: 1;
}

.item-name {
    font-weight: bold;
}

.item-price {
    color: #555;
    font-size: 1rem;
    margin-left: auto;
    margin-right: 10px;
}

.remove-item {
    background: #ff4d4d;
    color: var(--text-color);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background: #cc0000;
}

.cart-total {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ddd;
}

#checkout {
    background: #25d366;
    color: var(--text-color);
    padding: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    transition: all 0.3s ease;
}

#checkout:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

/* ========== BIOGRAFÍA ========== */
.biografia {
    margin-top: 1px;
    background: url('assets/fondos/fondoTres.png') no-repeat center/cover;
    text-align: center;
    padding: 70px;
}

.titulo-biografia {
    color: #ffffff;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.contenido-biografia {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
}

.descripcion {
    color: #fff;
    font-size: 1.3rem;
    flex: 1;
    margin-right: 20px;
    text-align: justify;
}

.foto {
    flex: 1;
    text-align: right;
}

.foto img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* ========== FOOTER Y WHATSAPP ========== */
footer {
    background: var(--background-color);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    padding: 15px;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-btn img {
    width: 50px;
    height: auto;
}

.whatsapp-btn:hover {
    background: var(--hover-color);
    transform: scale(1.1);
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
    }

    .logo img {
        height: 50px;
    }

    nav ul {
        gap: 10px;
    }

    nav a {
        font-size: 0.9rem;
    }
    .back-to-products {
        top: 125px; /* Ajusta según la altura de tu header en móvil */
        left: 10px;
        padding: 6px 12px;
    }
    
    .back-btn {
        font-size: 0.8rem;
    }
    .hero h1 {
        margin-bottom: -22rem;
    }

    .descripcion {
        margin-right: 0;
        margin-bottom: 20px;
        text-align: left;
    }

    .foto {
        text-align: center;
    }

    .products-grid {
        justify-content: center;
    }

    .product-card {
        width: calc(50% - 10px);
    }
    .product-card img {
        height: 280px; 
    }
    .contact-container {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-card {
        width: 100%;
        max-width: 400px;
    }    

    .contact-card:nth-child(2) {
        padding-bottom: 7rem;
    }
      
      .contact-card:nth-child(2) .whatsapp-link {
        width: 95%;
        margin-top: 1.5rem;
        padding: 12px 12px;
    }

    .contact-info h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
        color: #fff;
        font-weight: bold;
    }
    
    .gallery-reel {
        height: 250px;
        max-width: 90%;
    }

    .prev-btn, .next-btn {
        width: 40px;
        height: 40px;
        top: 60%;
    }

    .prev-btn::before, .next-btn::before {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 480px) {
    .product-card {
        width: 100%;
    }

    .gallery-reel {
        height: 200px;
    }
    .hero h1 {
        margin-bottom: -30rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.5rem;
    }
}