body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f8f5f2;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
	overflow-x: hidden;
}

main {
    flex: 1;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 20px;
    color: white;

    background: rgba(0,0,0,0.2);
    z-index: 1000;

    box-sizing: border-box;
    flex-wrap: wrap;
}

.header .logo {
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
}

.header nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header nav a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.header p {
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
}

nav a:hover {
    background-color: #800020;
    border-radius: 5px;
}

.hero {
    height: 100vh;
    background-image: url('../img/bodega.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    background: rgba(0,0,0,0.5);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    color: white;
    text-align: center;
}

.hero-overlay h1 {
    font-size: 3.5rem;
}

.hero-overlay p {
    font-size: 1.5rem;
}

.historia {
    padding: 80px 20px;
    background-color: #f8f5f2;
}

.historia .contenido {
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.historia h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.productos {
    padding: 40px;
    text-align: center;
}

.grid-productos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.producto {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 220px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.producto:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.producto img {
    width: 100%;
    border-radius: 10px;
}

.producto button {
    margin-top: 10px;
    padding: 10px;
    background-color: #5a0f1c;
    color: white;
    border: none;
    cursor: pointer;
}

h2 {
    text-align: center;
    margin-top: 40px;
}

form {
    width: 300px;
    margin: 0 auto;
    text-align: center;
}

input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    background: #5a0f1c;
    color: white;
    border: none;
    cursor: pointer;
}

section {
    padding: 50px 20px;
    text-align: center;
}

.sobre-nosotros {
    background-color: #eee;
}

.contacto {
    background-color: #5a0f1c;
    color: white;
}

footer {
    background-color: #111;
    color: white;
    text-align: center;
    padding: 20px;
}

.hero-carrito {
    height: 100vh;
    background-image: url('../img/carrito.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-login {
    height: 100vh;
    background-image: url('../img/login.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-registro {
    height: 100vh;
    background-image: url('../img/xd.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.scrolled .logo,
.header.scrolled nav a,
.header.scrolled p {
    color: #5a0f1c;
}

.header.scrolled nav a:hover {
    background-color: #f0f0f0;
    color: #800020;
    border-radius: 5px;
}

.ficha-producto {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ficha-imagen {
    flex: 1;
}

.ficha-imagen img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ficha-info {
    flex: 1;
}

.ficha-info h1 {
    color: #5a0f1c;
    margin-top: 0;
}

.ficha-precio {
    font-size: 2rem;
    color: #5a0f1c;
    font-weight: bold;
    margin: 20px 0;
}

.ficha-descripcion {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.ficha-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ficha-cantidad input {
    width: 60px;
    text-align: center;
}

.btn-carrito {
    background-color: #5a0f1c;
    color: white;
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.btn-carrito:hover {
    background-color: #800020;
}

.seccion-opiniones {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.opinion {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    background: white;
}

.opinion-nombre {
    font-weight: bold;
    color: #5a0f1c;
}

.opinion-valoracion {
    color: #ffc107;
}

.carrito-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.carrito-tabla {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carrito-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    background-color: #5a0f1c;
    color: white;
    padding: 15px;
    font-weight: bold;
}

.carrito-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.carrito-item:last-child {
    border-bottom: none;
}

.carrito-producto {
    font-weight: bold;
    color: #333;
}

.carrito-precio {
    color: #666;
}

.carrito-subtotal {
    color: #5a0f1c;
    font-weight: bold;
}

.carrito-eliminar {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.carrito-eliminar:hover {
    background-color: #c82333;
}

.carrito-footer {
    background: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.carrito-total-text {
    color: #5a0f1c;
}

.carrito-botones {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-seguir-comprando {
    background-color: #6c757d;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-seguir-comprando:hover {
    background-color: #5a6268;
}

.btn-realizar-pedido {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-realizar-pedido:hover {
    background-color: #218838;
}

.carrito-vacio {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

.carrito-vacio h2 {
    color: #5a0f1c;
    margin-bottom: 20px;
}

.carrito-vacio p {
    color: #666;
    margin-bottom: 30px;
}

.btn-ver-productos {
    background-color: #5a0f1c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

.btn-ver-productos:hover {
    background-color: #800020;
}

.cantidad-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cantidad-control input {
    width: 50px;
    text-align: center;
    padding: 5px;
}

.btn-actualizar {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-actualizar:hover {
    background-color: #0056b3;
}

.carrito-cantidad-actualizar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 80px 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-card h2 {
    color: #5a0f1c;
    text-align: center;
    margin-bottom: 30px;
}

.login-grupo {
    margin-bottom: 20px;
}

.login-grupo label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.login-grupo input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-grupo input:focus {
    outline: none;
    border-color: #5a0f1c;
}

.login-btn {
    width: 100%;
    background-color: #5a0f1c;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.login-btn:hover {
    background-color: #800020;
}

.login-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.login-enlace {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.login-enlace a {
    color: #5a0f1c;
    text-decoration: none;
}

.login-enlace a:hover {
    text-decoration: underline;
}

.login-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.nosotros-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.nosotros-historia {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
}

.nosotros-texto {
    flex: 1;
}

.nosotros-texto h2 {
    text-align: left;
    color: #5a0f1c;
    margin-top: 0;
}

.nosotros-texto p {
    line-height: 1.8;
    color: #666;
}

.nosotros-imagen {
    flex: 1;
}

.nosotros-imagen img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nosotros-cultivos {
    background-color: #f8f5f2;
    padding: 60px 20px;
    margin: 40px -20px;
}

.nosotros-cultivos h2 {
    text-align: center;
    color: #5a0f1c;
    margin-bottom: 50px;
}

.cultivos-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.cultivo-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 300px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cultivo-icono {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cultivo-card h3 {
    color: #5a0f1c;
    margin-bottom: 15px;
}

.cultivo-card p {
    color: #666;
    line-height: 1.6;
}

.nosotros-valores {
    display: flex;
    gap: 30px;
    margin-top: 60px;
}

.valor-item {
    flex: 1;
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.valor-item h3 {
    color: #5a0f1c;
    margin-bottom: 15px;
}

.valor-item p {
    color: #666;
}

.hero-nosotros {
    height: 60vh;
    background-image: url('../img/nosotros.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.filtros {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.filtros a {
    text-decoration: none;
    color: #666;
    font-size: 1rem;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s;
}

.filtros a:hover {
    color: #5a0f1c;
}

.filtros a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #5a0f1c;
    transition: width 0.3s;
}

.filtros a:hover::after {
    width: 100%;
}

.filtros a.activo {
    color: #5a0f1c;
    font-weight: bold;
}

.filtros a.activo::after {
    width: 100%;
}

.nosotros-cultivos .nosotros-historia {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.nosotros-cultivos .nosotros-imagen {
    flex: 1;
	margin-left: 125px;
}

.nosotros-cultivos .nosotros-texto {
    flex: 1.2;
    text-align: center;
}

.nosotros-cultivos .nosotros-imagen img {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
