/*
Theme Name: Isorano V2
Theme URI: https://quesoisorano.es
Description: Tema personalizado premium para Quesos El Isorano. Diseño minimalista y artesanal.
Author: Antigravity
Version: 1.0
*/

/* CSS Variables */
:root {
    --primary-color: #D4AF37;
    /* Original Gold */
    --secondary-color: #2C2C2C;
    /* Original Dark Charcoal */
    --text-color: #4A4A4A;
    --bg-light: #F9F7F2;
    /* Original Cream White */
    --bg-white: #FFFFFF;
    --font-heading: 'Playfair Display', serif;
    /* Original Font */
    --font-body: 'Inter', sans-serif;
    /* Original Font */
    --transition: all 0.3s ease;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
    /* Reverted to solid white to avoid yellow tint */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utils */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
    /* Sections will have their own gradients via specificity or utility classes */
}

.bg-light {
    background-color: var(--bg-light);
    /* Reverted to solid original color */
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--primary-color);
    margin: 15px 0 25px 0;
}

.divider.center {
    margin: 15px auto 25px auto;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Header */
#main-header {
    background-color: transparent;
    /* Transparent initially */
    box-shadow: none;
    /* No shadow initially */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary-color);
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
#hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--bg-white);
    margin-top: 0;
    /* Remove margin so it sits behind header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Gradient Fade for seamless integration (Top and Bottom) */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    /* Covers header area smoothly */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    /* Semi-transparent white to clear */
    pointer-events: none;
    z-index: 1;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    /* Very subtle thin fade at bottom */
    background: linear-gradient(to bottom, transparent, var(--bg-white));
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    color: var(--bg-white);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Products Section */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-card .info {
    padding: 20px;
    text-align: center;
}

.product-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h2 {
    margin-bottom: 20px;
}

.contact-list li {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.contact-list strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.contact-list a {
    color: var(--text-color);
}

.contact-list a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.map-container {
    min-height: 400px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* Responsive */
@media screen and (max-width: 900px) {
    .header-content {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        /* Hide for now, JS toggle later */
    }

    .burger {
        display: block;
    }

    .about-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* Mobile Nav Active State */
.nav-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 0;
    top: 80px;
    background-color: var(--bg-white);
    width: 100%;
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    align-items: center;
}

/* Product Details */
.product-details {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s;
    overflow: hidden;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    z-index: 10;
    transition: var(--transition);
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-img-container {
    flex: 1;
    background-color: #f0f0f0;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 300px;
}

.modal-info {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-extras {
    margin-top: 20px;
    background: var(--bg-light);
    padding: 15px;
    border-radius: 5px;
}

.modal-extra-item {
    margin-bottom: 10px;
}

.modal-extra-item strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Product Detail Page Styles */
.product-detail-container {
    margin-top: 40px;
}

.btn-back {
    display: inline-block;
    margin-bottom: 30px;
    font-weight: 500;
    color: var(--secondary-color);
}

.btn-back:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-detail-info h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.product-type-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
}

.product-meta-box {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.meta-item {
    margin-bottom: 20px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item strong {
    color: var(--primary-color);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-cta {
    margin-top: 30px;
}

/* Awards Section - Carousel/Slider */
.awards-carousel-sub {
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    width: 100%;
}

.awards-carousel-sub::before,
.awards-carousel-sub::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.awards-carousel-sub::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.awards-carousel-sub::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.carousel-track {
    display: flex;
    width: max-content;
    /* Let JS handle width */
    gap: 30px;
    will-change: transform;
    /* Animation handled by JS Main.js */
}

.award-card {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 20px;
    padding: 25px 20px;
    /* Soft diffuse glow (neutral gray) */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.award-card:hover {
    transform: translateY(-5px);
    /* Intensify glow on hover (neutral) */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.carousel-btn,
.review-btn {
    /* Update buttons to match earthy theme if needed, or keep white */
    color: var(--secondary-color);
}

#reviews {
    background-color: #fafafa;
    /* Neutral light gray */
}

#contact {
    background-color: var(--bg-light);
    /* Original variable */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* --- REVIEWS CAROUSEL --- */
.reviews-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.reviews-carousel-sub {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.reviews-carousel-sub::before,
.reviews-carousel-sub::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.reviews-carousel-sub::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.reviews-carousel-sub::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.reviews-track {
    display: flex;
    width: max-content;
    gap: 30px;
    will-change: transform;
}

.review-card {
    width: 300px;
    /* Slightly wider for text */
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #E25822;
    /* Brand orange or neutral */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.review-author-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.review-date {
    font-size: 12px;
    color: #888;
}

.review-stars {
    color: #FFD700;
    /* Gold/Yellow for stars */
    font-size: 18px;
    letter-spacing: 2px;
}

.review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
}

/* Reuse default button styles but specific positioning if needed */
.review-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.review-btn:hover {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.prev-review-btn {
    left: 10px;
}

.next-review-btn {
    right: 10px;
}

.award-year {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.award-icon-img {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
    opacity: 0.8;
}

.award-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.award-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    font-style: italic;
}

.award-detail {
    display: block;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 10px;
}