/* ========================================
   GENERAL STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5f2d;
    --secondary-color: #f39c12;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #ffffff;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc3545;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

nav a:hover::after {
    transform: scaleX(1);
}

nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    transform: scale(1.15);
    color: var(--secondary-color);
}

/* ========================================
   CONTAINER & COMMON STYLES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 2rem;
    position: relative;
}

.section:nth-child(even) {
    background-color: var(--bg-light);
}

/* Mobile Optimization for Container and Section */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #dc3545;
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1e4620);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), #d67c0a);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
    transform: translateY(-3px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #d67c0a);
    color: white;
}

.btn-secondary:hover {
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
    transform: translateY(-3px);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: white;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--secondary-color), #d67c0a);
    color: white;
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
    transform: translateY(-3px);
    border-color: var(--secondary-color);
}

.btn-small {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========================================
   HERO SECTION / CAROUSEL
   ======================================== */
.hero {
    position: relative;
    min-height: 800px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 800px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 800px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(80, 80, 80, 0.6), rgba(100, 100, 100, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.carousel-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(18, 176, 243, 0.15), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    text-align: center;
    color: white;
    animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ========================================
   CAROUSEL CONTROLS
   ======================================== */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.4);
    color: white;
    border: none;
    padding: 1rem 1.2rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

/* ========================================
   CAROUSEL INDICATORS
   ======================================== */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.8rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    width: 32px;
    border-radius: 6px;
}

.indicator:hover {
    background: rgb(255, 255, 255);
}

/* ========================================
   PRODUCTS CAROUSEL
   ======================================== */
.products-carousel-container {
    position: relative;
    margin-top: 3rem;
    overflow: hidden;
    padding: 1rem 60px;
    width: 100%;
}

/* Fade effect on sides */
.products-carousel-container::before,
.products-carousel-container::after {
    display: none;
}

.products-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow: visible;
    scroll-behavior: smooth;
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    width: auto;
}

.products-carousel-container .product-card {
    flex: 0 0 calc(20% - 1rem);
    min-width: 240px;
}

.carousel-products-prev,
.carousel-products-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    padding: 0;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.carousel-products-prev:hover,
.carousel-products-next:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.carousel-products-prev {
    left: 10px;
}

.carousel-products-next {
    right: 10px;
}

.product-card {
    background: var(--bg-white);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
    height: 380px;
}

.product-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

.product-card:hover .product-card-inner {
    transform: rotateY(180deg);
}

.product-card-front,
.product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
}

.product-card-front {
    background: var(--bg-white);
    z-index: 2;
}

.product-card-back {
    background: var(--bg-white);
    transform: rotateY(180deg);
    z-index: 1;
    position: relative;
}

.product-card-back img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--secondary-color), #d67c0a);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 20;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: 170px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.05), transparent);
    z-index: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 170px;
}

.product-info .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    text-align: center;
    line-height: 1.4;
}

.product-price {
    font-size: 1.6rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    line-height: 1.5;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.btn-product-back {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: auto;
    margin: 0;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.btn-product-back:hover {
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.4);
    transform: translateX(-50%);
}

/* ========================================
   PRODUCT GRID (CATÁLOGO)
   ======================================== */
.product-grid,
#productsContainer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columnas en pantallas de escritorio */
    gap: 2rem;
    margin-top: 3rem;
}

/* Estilos específicos para las tarjetas del catálogo (no interfieren con el carrusel 3D) */
.product-grid .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
    /* Altura uniforme para las tarjetas del catálogo */
}

.product-grid .product-image {
    height: 200px;
    background-color: var(--bg-light);
}

.product-grid .product-image img {
    object-fit: contain;
    /* Evita que las fotos de los adoquines se recorten */
    padding: 1rem;
}

.product-grid .product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: auto;
    /* Anula el min-height fijo del carrusel */
}

.product-grid .product-description {
    flex-grow: 1;
    /* Empuja el botón hacia la parte inferior */
    margin-bottom: 1.5rem;
}

/* ========================================
   FEATURE SECTION
   ======================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid rgba(44, 95, 45, 0.1);
}

.feature-card:hover {
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.1), rgba(243, 156, 18, 0.08));
    border-radius: 50%;
    border: 3px solid rgba(44, 95, 45, 0.15);
    font-size: 3rem;
    color: var(--primary-color);
}

.feature-icon i {
    transition: all 0.3s ease;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: translateY(-8px) scale(1.08);
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.15), rgba(243, 156, 18, 0.12));
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(44, 95, 45, 0.2);
}

.feature-card:hover .feature-icon i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.feature-card:hover .feature-icon img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.12);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 95, 45, 0.85), rgba(243, 156, 18, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-text {
    color: white;
    text-align: center;
    z-index: 10;
}

.gallery-overlay-text p:first-child {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gallery-overlay-text p:last-child {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.15);
    background-color: rgba(44, 95, 45, 0.03);
}

textarea {
    resize: vertical;
    min-height: 160px;
    font-family: inherit;
}

/* ========================================
   FORM VALIDATION & SECURITY
   ======================================== */

/* Error state for invalid inputs */
input.error,
textarea.error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05);
}

input.error:focus,
textarea.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
    background-color: rgba(220, 53, 69, 0.05);
}

/* Error message display */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: block;
    font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    padding: 4rem 2rem 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-section a:hover {
    color: var(--secondary-color);
    transform: translateX(4px);
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 50%;
    color: white;
    transition: var(--transition);
    box-shadow: none;
    font-size: 1.2rem;
}

.social-links a i {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: transparent;
    transform: translateY(-4px) scale(1.2);
    box-shadow: none;
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* ========================================
   GALLERY FILTER
   ======================================== */
.gallery-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.gallery-filter-tabs button {
    padding: 0.7rem 1.8rem;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

.gallery-filter-tabs button.active {
    background: linear-gradient(135deg, var(--primary-color), #1e4620);
    color: white;
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.2);
}

.gallery-filter-tabs button:hover {
    background: linear-gradient(135deg, var(--primary-color), #1e4620);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   FILTERS TOGGLE & SIDEBAR
   ======================================== */
#toggleFilters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggleFilters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

#filtersPanel {
    transition: all 0.3s ease;
}

#filterLabel {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* ========================================
   RESPONSIVE LAYOUTS FOR ABOUT PAGE
   ======================================== */
.company-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.story-image {
    width: 100%;
}

.story-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.story-content h2 {
    font-size: 1.8rem;
    line-height: 1.4;
}

.story-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Gallery grid for historical documents */
.about-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-gallery-item {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    transition: transform 0.3s ease;
}

.about-gallery-item:hover {
    transform: scale(1.05);
}

.about-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

/* ========================================
   MOBILE MENU HANDLING
   ======================================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
}

nav.active {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

nav.active ul {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
}

nav.active a {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

nav.active a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 2rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@media (max-width: 1024px) {

    .product-grid,
    #productsContainer {
        grid-template-columns: repeat(3, 1fr) !important;
        /* 3 columnas */
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .company-story-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .about-gallery-item img {
        height: 120px;
    }

    .story-image {
        order: -1;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .carousel-btn {
        padding: 0.75rem 0.9rem;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }

    .carousel-indicators {
        bottom: 1.5rem;
        gap: 0.6rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 28px;
    }

    .products-carousel-container .product-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: 220px;
    }

    .carousel-products-prev {
        left: 0;
    }

    .carousel-products-next {
        right: 0;
    }

    .product-card {
        height: 350px;
    }

    .product-info {
        min-height: 150px;
        padding: 1rem;
    }

    .product-image {
        height: 160px;
    }

    .product-grid,
    #productsContainer {
        grid-template-columns: repeat(2, 1fr) !important;
        /* 2 columnas en tabletas */
        gap: 1.2rem;
    }

    .product-grid .product-card {
        min-height: 380px;
    }

    #filtersPanel {
        display: none;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }

    .logo img {
        height: 40px;
    }

    nav ul {
        display: none;
    }

    .about-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .about-gallery-item img {
        height: 100px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .carousel-btn {
        padding: 0.6rem 0.75rem;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }

    .carousel-indicators {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .indicator.active {
        width: 24px;
    }

    .products-carousel-container .product-card {
        flex: 0 0 100%;
        min-width: 100%;
    }

    .carousel-products-prev,
    .carousel-products-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-products-prev {
        left: 5px;
    }

    .carousel-products-next {
        right: 5px;
    }

    .product-card {
        height: 300px;
    }

    .product-info {
        min-height: 130px;
        padding: 0.9rem;
    }

    .product-image {
        height: 140px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-grid,
    #productsContainer {
        grid-template-columns: 1fr !important;
        /* 1 columna en móviles */
        gap: 1rem;
    }

    .product-grid .product-card {
        min-height: 360px;
    }
}

/* ==========================================================================
   PROMO DIALOG STYLES (PREMIUM GLASSMORPHIC DIALOG)
   ========================================================================== */
.promo-dialog {
    border: none;
    border-radius: 24px;
    padding: 0;
    max-width: 820px;
    width: calc(100% - 32px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    background: transparent;
    overflow: visible;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    pointer-events: none;
    z-index: 1000;
}

.promo-dialog[open] {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Backdrop Blur overlay */
.promo-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.promo-dialog[open]::backdrop {
    opacity: 1;
}

/* Dialog Container Card */
.promo-content {
    position: relative;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Close Button */
.promo-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    font-size: 20px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #475569;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    transform: rotate(90deg);
}

/* Split Layout */
.promo-body {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .promo-body {
        grid-template-columns: 4.2fr 5.8fr;
    }
}

/* Left Promo Image/Brand Banner */
.promo-image-container {
    background: linear-gradient(135deg, #1e4620, #0a1f0c);
    color: white;
    padding: 3.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle architectural pattern overlay */
.promo-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 24px 24px, 12px 12px, 12px 12px;
    opacity: 0.8;
    z-index: 1;
}

.promo-image-container::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 70%);
    top: -50px;
    left: -50px;
    z-index: 1;
}

.promo-icon-badge {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    z-index: 2;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
    animation: pulseIcon 3s infinite ease-in-out;
    display: none;
}

.promo-logo-image {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    z-index: 2;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.promo-image-container h3 {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.2;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: none;
}

.promo-image-container p.promo-since {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
}

/* Right Content Box */
.promo-text-container {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.promo-badge {
    align-self: flex-start;
    background-color: rgba(30, 70, 32, 0.08);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(30, 70, 32, 0.15);
}

.promo-text-container h2 {
    font-size: 1.9rem;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.promo-text-container h2 span {
    color: var(--primary-color);
}

.promo-text-container p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Feature Checkmarks */
.promo-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.promo-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
}

.promo-feature-item i {
    color: #16a34a;
    font-size: 1.1rem;
}

/* Action Buttons Container */
.promo-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 480px) {
    .promo-actions {
        flex-direction: row;
        align-items: center;
    }
}

.promo-cta-btn {
    text-align: center;
    padding: 0.85rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(30, 70, 32, 0.35);
    flex-grow: 1;
    white-space: nowrap;
}

.promo-cta-btn:hover {
    background-color: #1e4620;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 70, 32, 0.45);
    color: #ffffff;
}

.promo-secondary-btn {
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.promo-secondary-btn:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

/* Mobile responsiveness for promo dialog */
@media (max-width: 768px) {
    .promo-dialog {
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        max-height: 90vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .promo-content {
        max-height: 100%;
    }

    .promo-body {
        grid-template-columns: 1fr;
        max-height: auto;
        overflow-y: auto;
    }

    .promo-image-container {
        padding: 2.5rem 1.5rem;
        min-height: auto;
    }

    .promo-logo-image {
        max-width: 150px;
    }

    .promo-text-container {
        padding: 2rem 1.5rem;
    }

    .promo-text-container h2 {
        font-size: 1.5rem;
    }

    .promo-text-container p {
        font-size: 0.9rem;
    }

    .promo-badge {
        font-size: 0.65rem;
    }

    .promo-feature-item {
        font-size: 0.85rem;
    }

    .promo-cta-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .promo-secondary-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .promo-actions {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .promo-dialog {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        margin: 0;
        border-radius: 16px 16px 0 0;
        transform: translate(0, 0) scale(1);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .promo-dialog[open] {
        transform: translate(0, 0) scale(1);
    }

    .promo-content {
        border-radius: 16px 16px 0 0;
        max-height: 100%;
        overflow-y: visible;
    }

    .promo-close-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
        top: 12px;
        right: 12px;
    }

    .promo-body {
        grid-template-columns: 1fr;
        max-height: auto;
        overflow-y: visible;
    }

    .promo-image-container {
        padding: 0.9rem 0.7rem;
        min-height: 110px;
    }

    .promo-logo-image {
        max-width: 90px;
        margin-bottom: 0.35rem;
    }

    .promo-image-container p.promo-since {
        font-size: 0.7rem;
    }

    .promo-text-container {
        padding: 0.9rem 0.7rem;
        background: #ffffff;
    }

    .promo-text-container h2 {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }

    .promo-text-container p {
        font-size: 0.7rem;
        margin-bottom: 0.35rem;
        line-height: 1.25;
    }

    .promo-badge {
        font-size: 0.6rem;
        padding: 4px 10px;
        margin-bottom: 0.35rem;
    }

    .promo-features {
        gap: 0.2rem;
        margin-bottom: 1.25rem;
    }

    .promo-feature-item {
        font-size: 0.8rem;
        gap: 0.2rem;
    }

    .promo-feature-item i {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .promo-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    .promo-cta-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.7rem;
        flex-grow: 1;
        white-space: normal;
    }

    .promo-secondary-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
        white-space: normal;
    }
}