/* style.css */

/* Fuentes de Google Fonts (ejemplo, puedes elegir otras) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #0056b3; /* Un azul para botones y enlaces */
    --secondary-color: #f8f9fa; /* Color de fondo claro para secciones */
    --accent-color: #28a745; /* Color para éxito o llamadas a la acción */
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #ddd;
    --white: #fff;
    --dark: #212529;
}

/* Reset básico y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004085;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

p {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #004085;
}

/* Header */
header {
    background-color: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 80px; /* Aumentando el tamaño del logo */
    width: 80px;
    border-radius: 50%; /* Haciendo el logo redondo */
    object-fit: cover; /* Asegura que la imagen cubra el círculo sin deformarse */
    margin-right: 15px; /* Aumentando el espacio con el texto */
}

.logo h1 {
    font-size: 2em; /* Ajustando el tamaño del texto al nuevo tamaño del logo */
    margin: 0;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--dark);
    font-weight: 600;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.cart-icon {
    position: relative; /* Necesario para posicionar el badge */
}

.cart-icon a {
    font-size: 1.3em;
    color: var(--primary-color);
}
.cart-icon a:hover {
    color: #004085;
}

.cart-item-count {
    background-color: #dc3545; /* Color rojo para el badge */
    color: var(--white);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.7em;
    font-weight: bold;
    position: absolute;
    top: -5px; /* Ajusta la posición vertical */
    right: -10px; /* Ajusta la posición horizontal */
    line-height: 1; /* Para centrar el número */
    min-width: 18px; /* Asegura que el círculo sea lo suficientemente grande */
    text-align: center;
}


/* Hero Section */
.hero {
    background: url('hero-bg.jpg') no-repeat center center/cover; /* Reemplaza 'hero-bg.jpg' con tu imagen */
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay oscuro */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-content h2::after {
    background-color: var(--white);
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Sections generales */
.section {
    padding: 80px 0;
    background-color: var(--white);
    margin-bottom: 30px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.section:nth-of-type(odd) {
    background-color: var(--secondary-color);
}

/* About Us Section */
.about-us ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.about-us ul li {
    background: var(--white);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.about-us ul li strong {
    color: var(--primary-color);
}


/* Product Grid (general, usado en la sección de tienda) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.product-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-item img {
    max-width: 100%;
    height: 200px; /* Altura fija para las imágenes de producto */
    object-fit: contain; /* Para que la imagen se ajuste sin deformarse */
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 1.4em;
    color: var(--dark);
    margin-bottom: 10px;
    flex-grow: 1; /* Permite que el título ocupe espacio si es largo */
}

.product-item p {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.product-item .add-to-cart {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-item .add-to-cart:hover {
    background-color: #218838;
}

/* Cart Section */
.cart-section {
    padding: 50px 0; /* Un poco menos de padding */
}

#cart-items {
    border: 1px solid var(--border-color);
    padding: 20px;
    min-height: 100px;
    margin-bottom: 30px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

#cart-items p {
    text-align: center;
    color: var(--light-text-color);
}

/* Estilos para el contenedor de información del ítem en el carrito */
.cart-item-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Alinea los ítems en la parte superior */
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

/* Contenedor del nombre y precio para que aparezcan uno debajo del otro */
.cart-item-info {
    display: flex;
    flex-direction: column; /* Apila nombre y precio verticalmente */
    align-items: flex-start; /* Alinea el texto a la izquierda */
    flex-grow: 1; /* Permite que este div ocupe el espacio disponible */
    margin-right: 15px; /* Espacio entre la info y el botón de eliminar */
}

.cart-item-info span:first-child { /* Estilo para el nombre del producto */
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1em;
    margin-bottom: 5px; /* Espacio entre el nombre y el precio */
}

.cart-item-info span:last-child { /* Estilo para el precio del producto */
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1em;
}


.cart-item-display:last-child {
    border-bottom: none;
}

.cart-item-display button.remove-from-cart {
    background: none;
    border: none;
    color: #dc3545;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    transition: color 0.2s ease;
    flex-shrink: 0; /* Evita que el botón se encoja */
}

.cart-item-display button.remove-from-cart:hover {
    color: #c82333;
}


.cart-summary {
    text-align: right;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 20px;
}

.cart-summary #checkout-btn {
    font-size: 1.1em;
    padding: 15px 30px;
    margin-top: 20px;
}

/* Checkout Section / Form styles */
.checkout-section form,
.contact form {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="radio"] {
    margin-right: 10px;
}

#order-summary {
    border: 1px dashed var(--primary-color);
    padding: 20px;
    margin-bottom: 30px;
    background-color: #e9f5ff; /* Color de fondo claro para el resumen */
    border-radius: 5px;
}

/* Estilos para la lista de items en el resumen del pedido */
.order-summary-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.order-summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 0.95em;
    color: var(--text-color);
}

.order-summary-list li:last-child {
    border-bottom: none;
}

.order-summary-list li span:first-child {
    font-weight: 500;
}

.order-summary-list li span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* Estilos para los totales en el resumen del pedido */
.order-summary-totals p {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 1em;
    border-top: 1px dashed #cce5ff; /* Línea divisoria sutil */
    margin-bottom: 0; /* Eliminar margen inferior predeterminado de párrafo */
}

.order-summary-totals p:first-of-type {
    border-top: none; /* No poner borde superior al primer párrafo de totales */
}

.order-summary-totals p span:first-child {
    font-weight: 600;
    color: var(--dark);
}

.order-summary-totals p span:last-child {
    font-weight: 700;
    color: var(--primary-color);
}

.order-summary-totals .final-quotation-total {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color); /* Un color diferente para el total final */
    padding-top: 10px;
    border-top: 2px solid var(--primary-color); /* Línea más prominente para el total */
    margin-top: 10px;
}


/* Services Section */
.services ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.services ul li {
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    text-align: center;
}

.services ul li:hover {
    transform: translateY(-5px);
}

.services ul li strong {
    display: block;
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Goals Section */
.goals ul {
    list-style: none;
    padding-left: 0;
    margin-top: 20px;
}

.goals ul li {
    background: var(--white);
    border-left: 4px solid var(--accent-color);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.goals ul li strong {
    color: var(--accent-color);
}


/* Contact Section */
.contact-info {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.contact-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.2em;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-top: auto; /* Empuja el footer hacia abajo */
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links ul li {
    margin: 0 15px;
}

.footer-links ul li a {
    color: var(--white);
    font-weight: 500;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

footer p {
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
        justify-content: center;
    }

    nav ul li {
        margin: 0 10px;
    }

    .hero-content h2 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1em;
    }

    h2 {
        font-size: 2em;
    }

    .section {
        padding: 50px 0;
    }

    .checkout-section form,
    .contact form {
        padding: 25px;
    }

    .services ul {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5em;
    }

    nav ul li {
        margin: 5px 8px;
        font-size: 0.9em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .product-item img {
        height: 150px;
    }

    .product-item h3 {
        font-size: 1.2em;
    }

    .product-item p {
        font-size: 1em;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 1.1em;
    }
}


/* Carousel Specific Styles for Novedades Section */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden; /* Esto es crucial para ocultar los elementos fuera de vista */
    margin: 0 auto;
    padding: 0 40px; /* Espacio para las flechas de navegación */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Suaviza el movimiento del carrusel */
    /* Asegúrate de que los ítems no envuelvan */
    flex-wrap: nowrap;
}

.carousel-item {
    min-width: 33.33%; /* Mostrar 3 ítems por defecto en escritorio */
    flex-shrink: 0; /* Evita que los ítems se encojan */
    padding: 15px; /* Espacio entre ítems del carrusel */
    box-sizing: border-box; /* Asegura que el padding se incluya en el ancho */
}

/* Ajustes para los items dentro del carrusel para que se parezcan a los product-item */
.carousel-item.product-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex; /* Asegura que el contenido del item se distribuya bien */
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Asegura que todos los items tengan la misma altura si el track lo permite */
}

.carousel-item.product-item img {
    max-width: 100%;
    height: 180px; /* Un poco más pequeño para encajar en 3 por fila */
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 15px;
}

.carousel-item.product-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    flex-grow: 1;
}

.carousel-item.product-item p {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 15px;
}

.carousel-item.product-item .add-to-cart {
    width: auto; /* Ajusta el ancho del botón al contenido */
    align-self: center; /* Centra el botón si el item es flex */
}


/* Carousel Navigation Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 2em;
    line-height: 1;
    border-radius: 5px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.carousel-button.next {
    right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Carousel Indicators (puntos de navegación) */
.carousel-indicators {
    text-align: center;
    margin-top: 20px;
}

.carousel-indicator-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--border-color);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-indicator-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}


/* Responsive adjustments for carousel */
@media (max-width: 1024px) {
    .carousel-item {
        min-width: 50%; /* Mostrar 2 ítems en tabletas */
    }
}

@media (max-width: 768px) {
    .carousel-item {
        min-width: 100%; /* Mostrar 1 ítem en móviles */
    }
    .carousel-button {
        padding: 8px 12px;
        font-size: 1.5em;
    }
}

/* Estilos para el mapa y el botón "Cómo llegar" (unificados) */
#location-map {
    max-width: 800px;
    margin: auto;
    text-align: center;
    padding: 50px 0;
}

#location-map h3 {
    margin-bottom: 10px;
}

#location-map p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

#location-map iframe {
    border-radius: 10px;
    margin-bottom: 15px;
    width: 100%;
    height: 450px; /* Un poco más alto para mejor visibilidad */
}

.btn-directions {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 25px; /* Consistente con otros botones */
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    text-transform: uppercase;
}

.btn-directions:hover {
    background: #218838;
}