/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- HEADER & NAV --- */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky; /* Se queda pegado arriba al hacer scroll */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ecf0f1;
}

/* Barra de búsqueda */
.search-bar {
    display: flex;
    gap: 5px;
}

.search-bar input {
    padding: 8px;
    border-radius: 4px;
    border: none;
    outline: none;
}

.search-bar button {
    padding: 8px 12px;
    background-color: #e67e22;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.search-bar button:hover {
    background-color: #d35400;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a:hover {
    color: #e67e22;
    transition: color 0.3s;
}

/* --- BANNER (Aquí está la imagen) --- */
.banner {
    height: 60vh; /* Ocupa el 60% de la altura de la pantalla */
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.banner-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.btn-banner {
    display: inline-block;
    background-color: #e67e22;
    color: white;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.btn-banner:hover {
    background-color: #d35400;
}

/* --- LAYOUT GENERAL --- */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #e67e22;
    display: inline-block;
    padding-bottom: 5px;
}

/* --- PRODUCTOS (Grid) --- */
.sections-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Estilos de la Card generada por JS */
.product {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.product:hover {
    transform: translateY(-5px);
}

.product img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* Para que la imagen se vea completa */
    margin-bottom: 15px;
}

.product h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.product p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.product h3 {
    font-size: 1.4rem;
    color: #27ae60;
    margin-bottom: 15px;
}

/* Botones de la card */
.card-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.card-footer a {
    padding: 8px 15px;
    border-radius: 4px;
    text-align: center;
    width: 100%;
    font-weight: bold;
}

.info {
    background-color: #3498db;
    color: white;
}

.compra {
    background-color: #2ecc71;
    color: white;
}

.info:hover { background-color: #2980b9; }
.compra:hover { background-color: #27ae60; }

/* --- COMENTARIOS --- */
.sections-comments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.comment {
    background: white;
    padding: 20px;
    border-left: 5px solid #e67e22;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comment h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.comment h5 {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
    text-align: right;
}

/* --- FOOTER --- */
footer {
    background-color: #222;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-links h3 {
    color: #e67e22;
    margin-bottom: 10px;
}

.socials i {
    font-size: 1.5rem;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.3s;
}

.socials i:hover {
    color: #e67e22;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.8rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .container-nav {
        flex-direction: column;
        gap: 15px;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .banner h2 {
        font-size: 2rem;
    }
}
/* =========================================
   ESTILOS AGREGADOS (Detalle, Carrito, Contacto)
   ========================================= */

/* --- PÁGINA DETALLE --- */
.detail-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.detail-img-box {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.detail-img-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.detail-info-box {
    flex: 1;
    min-width: 300px;
}

.detail-info-box h1 { margin-bottom: 10px; color: #2c3e50; }
.detail-info-box h2 { color: #27ae60; font-size: 2rem; margin-bottom: 20px; }
.detail-info-box p { margin-bottom: 15px; color: #555; }

.buy-btn {
    display: inline-block;
    background-color: #e67e22;
    color: white;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 5px;
    margin-top: 20px;
    transition: 0.3s;
}
.buy-btn:hover { background-color: #d35400; }

.extra-info {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
}

/* --- PÁGINA CARRITO --- */
.cart-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 300px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.item-details { flex: 1; }
.item-details h3 { margin-bottom: 5px; color: #2c3e50; }
.item-details p { color: #666; font-size: 0.9rem; }

.item-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.cart-summary {
    text-align: right;
    margin-top: 20px;
}

.cart-summary h3 {
    font-size: 1.8rem;
    color: #333;
}

.btn-checkout {
    background-color: #27ae60;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
}
.btn-checkout:hover { background-color: #2ecc71; }

.empty-msg {
    text-align: center;
    margin-top: 50px;
    color: #777;
}
.empty-msg i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

/* --- PÁGINA CONTACTO --- */
.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #e67e22;
}

.btn-submit {
    width: 100%;
    background-color: #e67e22;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-submit:hover {
    background-color: #d35400;
}