/* =========================================
   ESTILOS GENERALES (styles.css)
   ========================================= */

:root {
    --bg-color: #C48A5E;        /* Fondo principal tierra */
    --footer-bg: #9D6E4B;       /* Fondo footer */
    --header-bg: rgba(0, 0, 0, 0.20); /* Header transparente */
    --card-bg: #ffffff;         
    --text-white: #ffffff;
    --text-dark: #000000;
    --stock-green: #019212;
    --info-blue: #050EB5;
    --star-yellow: #FFBB00;
    --form-bg: #F9F9F9;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--bg-color); /* Por defecto marrón (Inicio) */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* CLASE ESPECIAL: Para páginas con fondo blanco (Productos y Contacto) */
body.bg-white {
    background-color: white;
    color: black;
}

/* Ajuste para que los enlaces del header se vean en fondo blanco */
body.bg-white header nav a {
    color: var(--bg-color); /* En blanco, usamos el color marrón para texto */
}
/* Pero mantenemos el header transparente/marrón si se prefiere, 
   o ajustamos según diseño. En tu Figma, el header en blanco parece mantener
   el estilo oscuro o se adapta. Lo dejaré legible. */

/* HEADER */
header {
    background-color: var(--header-bg);
    padding: 24px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Si estamos en página blanca, oscurecemos un poco el fondo del header para contraste */
body.bg-white header {
    background-color: rgba(196, 138, 94, 0.9); /* Marrón semi-transparente */
}
body.bg-white header nav a {
    color: white; /* Texto blanco sobre header marrón */
}

.logo img { height: 50px; width: auto; display: block; }

nav ul { list-style: none; display: flex; gap: 18px; }

nav a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    padding: 10px 15px;
    transition: opacity 0.3s;
}
nav a:hover, nav a.active { opacity: 0.8; text-decoration: underline; }

/* LAYOUT */
main {
    flex: 1;
    width: 100%;
    margin: 0 auto;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* --- ESTILOS PÁGINA INICIO --- */
.hero-title {
    font-size: 40px;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
}

.hero-image {
    width: 100%;
    max-width: 711px;
    height: auto;
    border-radius: 20px;
    margin-bottom: 3rem;
    display: block;
    margin-left: auto; 
    margin-right: auto;
}

.features-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    width: 100%;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 40px 20px;
    width: 100%;
    max-width: 300px;
    flex: 1 1 250px;
    color: var(--text-dark);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.feature-card h3 { font-size: 20px; font-weight: 600; color: black; }
.feature-card p { font-size: 16px; font-weight: 400; color: black; }

.secondary-image {
    width: 100%;
    max-width: 588px;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
    margin-left: auto; 
    margin-right: auto;
}
.secondary-text { font-size: 20px; margin-bottom: 2rem; font-weight: 400; text-align: center; }

.cta-button {
    background: white;
    color: var(--bg-color);
    font-family: 'Anton', sans-serif;
    font-size: 24px;
    padding: 15px 50px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 3rem;
    text-transform: uppercase;
    text-align: center;
}
.cta-button:hover { transform: scale(1.05); box-shadow: 0 5px 20px rgba(0,0,0,0.2); }

/* --- ESTILOS PÁGINA PRODUCTOS --- */
.product-detail-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    justify-content: center;
    margin-top: 2rem;
    align-items: flex-start;
}

.product-images-col {
    flex: 1; min-width: 300px; max-width: 500px;
    display: flex; flex-direction: column; gap: 1.5rem;
}
.main-image { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.thumbnail-row { display: flex; gap: 15px; justify-content: space-between; }
.thumb-img { width: 30%; aspect-ratio: 1; border-radius: 15px; border: 1px solid #CACACA; object-fit: cover; cursor: pointer; }

.product-info-col {
    flex: 1; min-width: 300px; max-width: 600px;
    display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start;
}
.product-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 32px; color: black; margin: 0; }
.rating-row { display: flex; align-items: center; gap: 10px; }
.stars-container { display: flex; gap: 5px; }
.no-return-text { color: var(--info-blue); font-size: 12px; font-weight: 500; }
.stock-label { color: var(--stock-green); font-size: 16px; font-weight: 500; }
.price-container { font-family: 'Montserrat', sans-serif; font-weight: 500; color: black; display: flex; align-items: flex-start; }
.price-main { font-size: 32px; }
.price-sup { font-size: 20px; vertical-align: top; margin-top: 2px; }

.description-box { border-top: 1px solid black; padding-top: 1.5rem; width: 100%; }
.desc-title { font-size: 24px; font-weight: 600; margin-bottom: 0.5rem; display: block; }
.desc-text { font-size: 16px; font-weight: 500; line-height: 1.5; }

.btn-adopt {
    background-color: var(--bg-color); color: white;
    font-family: 'Anton', sans-serif; font-size: 20px;
    padding: 10px 30px; border-radius: 10px; border: none; cursor: pointer;
    text-transform: uppercase; transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.table-section { margin-top: 4rem; border-top: 2px solid #eee; padding-top: 2rem; }
.table-section h2 { color: black; margin-bottom: 1.5rem; font-size: 24px; }
.styled-table { width: 100%; border-collapse: collapse; font-family: 'Inter', sans-serif; }
.styled-table th { background-color: var(--bg-color); color: white; padding: 12px; text-align: left; }
.styled-table td { padding: 12px; border-bottom: 1px solid #ddd; color: black; }


/* --- ESTILOS PÁGINA CONTACTO --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
    align-items: center;
}

.contact-form-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: black;
    text-transform: uppercase;
    text-align: center;
}

.styled-form-container {
    background-color: var(--form-bg);
    border-radius: 10px;
    padding: 2rem;
    width: 100%;
    max-width: 590px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

form fieldset { border: none; padding: 0; margin-bottom: 1.5rem; }
form legend { font-size: 1.2rem; font-weight: 700; color: var(--bg-color); margin-bottom: 1rem; padding: 0; }
form label { font-weight: 600; color: #333; margin-bottom: 5px; display: block; }
form input, form select, form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
}

.contact-image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-right-image {
    width: 100%;
    max-width: 456px;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
}

.contact-info-aside {
    background: none;
    border: none;
    text-align: left;
    padding: 0;
    color: black;
    width: 100%;
    max-width: 456px;
}
.contact-info-aside h3 { color: var(--bg-color); margin-bottom: 1rem; }
.contact-info-aside a { color: black; text-decoration: underline; }

/* FOOTER */
footer {
    background-color: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 34px 20px;
    margin-top: auto;
}
footer a { color: white; text-decoration: underline; font-weight: 700; margin: 0 5px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    header { flex-direction: column; gap: 1rem; padding: 1rem; }
    .hero-title { font-size: 28px; }
    .contact-grid, .product-detail-wrapper { grid-template-columns: 1fr; display: flex; flex-direction: column; gap: 2rem; }
    .contact-form-column, .contact-image-column { width: 100%; }
}