/* =========================
   CONFIGURACIÓN GENERAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background: #f7f5f2;
    color: #222222;

    font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
    overflow: hidden;
}

button,
select {
    font: inherit;
}

button {
    border: none;
}

img {
    max-width: 100%;
}

/* =========================
   HEADER
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    min-height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 8%;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid rgba(0, 0, 0, 0.08);

    backdrop-filter: blur(10px);
}

.logo {
    color: #171717;

    font-size: 23px;
    font-weight: 700;

    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    color: #333333;
    font-size: 14px;

    text-decoration: none;

    transition: color 0.2s ease;
}

.nav a:hover {
    color: #9b744f;
}

.nav .header-whatsapp {
    padding: 11px 22px;

    border-radius: 30px;

    background: #075e39;
    color: #ffffff;

    font-weight: 700;
}

.nav .header-whatsapp:hover {
    color: #ffffff;
    background: #064c30;
}

/* =========================
   HERO
========================= */

.catalog-hero {
    padding: 76px 8% 48px;

    text-align: center;
}

.catalog-subtitle {
    display: block;

    margin-bottom: 18px;

    color: #9b744f;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 6px;
}

.catalog-hero h1 {
    margin-bottom: 17px;

    color: #171717;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1;
}

.catalog-hero p {
    max-width: 760px;

    margin: 0 auto;

    color: #666666;

    font-size: 17px;
    line-height: 1.7;
}

.catalog-measure-note {
    margin-bottom: 4px !important;

    font-size: 14px !important;
    font-style: italic;
}

/* =========================
   CONTENEDOR DEL CATÁLOGO
========================= */

.catalog-container {
    width: min(1240px, 88%);

    margin: 0 auto;
    padding-bottom: 90px;
}

/* =========================
   FILTROS
========================= */

.catalog-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 35px;
    padding: 20px 24px;

    background: #ffffff;

    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    color: #555555;

    font-size: 13px;
    font-weight: 700;
}

.filter-group select {
    min-width: 240px;

    padding: 12px 40px 12px 14px;

    border: 1px solid #d8d8d8;
    border-radius: 8px;

    background: #ffffff;
    color: #333333;

    cursor: pointer;
}

.results-count {
    color: #777777;
    font-size: 14px;
}

/* =========================
   GRILLA
========================= */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

/* =========================
   TARJETAS
========================= */

.product-card {
    min-width: 0;

    background: #ffffff;

    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 16px;

    overflow: hidden;

    cursor: pointer;

    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-7px);

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.product-image {
    height: 340px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px;

    background: #ffffff;

    overflow: hidden;
}
.product-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: transform 0.4s ease;
}

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

.product-info {
    padding: 24px;
}

.product-brand {
    display: block;

    margin-bottom: 9px;

    color: #9b744f;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.product-info h3 {
    margin-bottom: 10px;

    color: #1c1c1c;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
}

.product-size {
    margin-bottom: 20px;

    color: #777777;
    font-size: 14px;
}

.product-button {
    width: 100%;

    padding: 13px 18px;

    border-radius: 8px;

    background: #9b744f;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.product-button:hover {
    background: #805d3d;
    transform: translateY(-1px);
}

/* =========================
   MENSAJE SIN RESULTADOS
========================= */

.no-results {
    grid-column: 1 / -1;

    padding: 70px 20px;

    text-align: center;

    color: #777777;
    font-size: 18px;
}

/* =========================
   MODAL PRINCIPAL
========================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background: rgba(0, 0, 0, 0.72);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    overflow: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    position: relative;

    width: min(1100px, 100%);
    height: min(680px, 88vh);

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);

    background: #ffffff;

    border-radius: 20px;

    overflow: hidden;

    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);

    transform: translateY(18px) scale(0.98);

    transition: transform 0.25s ease;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

/* =========================
   BOTÓN CERRAR MODAL
========================= */

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);
    color: #111111;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.08);
    background: #ffffff;
}

/* =========================
   COLUMNA DE IMAGEN
========================= */

.modal-image-column {
    min-width: 0;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 38px;

    background: #ffffff;

    overflow: hidden;
}

.image-zoom-container {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    cursor: zoom-in;
}

.image-zoom-container img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    transform: scale(1);
    transform-origin: center center;

    transition: transform 0.18s ease;

    user-select: none;
    pointer-events: none;
}

/* =========================
   GALERÍA DE IMÁGENES DEL MODAL
========================= */

.image-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 12;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.92);
    color: #222222;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);

    transform: translateY(-50%);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.image-slider-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.06);
}

.image-slider-arrow[hidden] {
    display: none;
}

.image-slider-prev {
    left: 10px;
}

.image-slider-next {
    right: 10px;
}

.image-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 52px;
    z-index: 12;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 7px 10px;

    border-radius: 30px;

    background: rgba(0, 0, 0, 0.42);

    transform: translateX(-50%);
}

.image-slider-dots[hidden] {
    display: none;
}

.image-slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.58);

    cursor: pointer;

    transition:
        width 0.2s ease,
        border-radius 0.2s ease,
        background 0.2s ease;
}

.image-slider-dot.active {
    width: 24px;
    border-radius: 20px;
    background: #ffffff;
}

.zoom-help {
    position: absolute;
    left: 50%;
    bottom: 14px;

    transform: translateX(-50%);

    max-width: calc(100% - 20px);

    padding: 8px 13px;

    border-radius: 30px;

    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;

    font-size: 11px;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.2s ease;
}

.image-zoom-container:hover .zoom-help {
    opacity: 1;
}

/* =========================
   INFORMACIÓN DEL MODAL
========================= */

.modal-info {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;

    padding: 48px 42px 36px;

    background: #f5f3f0;

    border-left: 1px solid #e7e2dc;

    overflow-y: auto;
    overflow-x: hidden;
}

.modal-info::-webkit-scrollbar {
    width: 5px;
}

.modal-info::-webkit-scrollbar-track {
    background: transparent;
}

.modal-info::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.28);
    border-radius: 20px;
}

.modal-info::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.45);
}

.modal-brand {
    display: block;

    margin-bottom: 8px;

    color: #9b744f;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.modal-info h2 {
    margin-bottom: 9px;

    color: #171717;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 4vw, 52px);
    line-height: 1.05;
}

.modal-category {
    margin-bottom: 22px;

    color: #777777;
    font-size: 15px;
}

.modal-dimensions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    margin-bottom: 24px;
}

.dimension-item {
    padding: 12px;

    background: #f5f3f0;

    border-radius: 8px;
}

.dimension-item > span {
    display: block;

    margin-bottom: 4px;

    color: #777777;
    font-size: 12px;
}

.dimension-item strong {
    color: #333333;
    font-size: 14px;
}

.modal-description {
    margin-bottom: 25px;

    color: #555555;

    font-size: 15px;
    line-height: 1.8;
}

.modal-features {
    margin-bottom: 28px;
}

.modal-features h3 {
    margin-bottom: 13px;

    color: #222222;
    font-size: 18px;
}

.modal-features ul {
    padding-left: 20px;
}

.modal-features li {
    margin-bottom: 9px;

    color: #666666;

    font-size: 14px;
    line-height: 1.55;
}

.modal-whatsapp {
    width: 100%;

    margin-top: auto;
    padding: 15px 20px;

    border-radius: 9px;

    background: #9b744f;
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.modal-whatsapp:hover {
    background: #805d3d;
    transform: translateY(-2px);
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.94);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    overflow: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 2010;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;

    font-size: 34px;

    cursor: pointer;

    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.lightbox-viewport {
    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    cursor: grab;
}

.lightbox-viewport.dragging {
    cursor: grabbing;
}

.lightbox-image {
    max-width: 85vw;
    max-height: 82vh;

    object-fit: contain;

    transform: translate(0, 0) scale(1);
    transform-origin: center center;

    user-select: none;

    transition: transform 0.08s linear;
}

.lightbox-controls {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 2010;

    display: flex;
    align-items: center;
    gap: 8px;

    transform: translateX(-50%);

    padding: 8px;

    border-radius: 40px;

    background: rgba(255, 255, 255, 0.14);

    backdrop-filter: blur(10px);
}

.lightbox-controls button {
    min-width: 44px;
    height: 42px;

    padding: 0 15px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;

    font-size: 15px;

    cursor: pointer;

    transition: background 0.2s ease;
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
}

#zoomIn,
#zoomOut {
    font-size: 25px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 950px) {

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-content {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .modal-info {
        padding: 45px 30px 30px;
    }

}

@media (max-width: 760px) {

    .header {
        padding: 16px 5%;

        flex-direction: column;
        gap: 15px;
    }

    .nav {
        width: 100%;

        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }

    .catalog-hero {
        padding: 55px 6% 38px;
    }

    .catalog-container {
        width: 90%;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
        min-width: 0;
    }

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

    .product-image {
        height: 380px;
    }

    .modal {
        padding: 12px;

        overflow: hidden;
    }

    .modal-content {
        width: 100%;
        height: 94vh;

        display: flex;
        flex-direction: column;

        border-radius: 15px;

        overflow: hidden;
    }

    .modal-image-column {
        flex: 0 0 42%;

        min-height: 0;

        padding: 25px;
    }

    .modal-info {
        flex: 1;

        padding: 30px 22px;

        overflow-y: auto;
    }

    .modal-info h2 {
        font-size: 36px;
    }

    .modal-dimensions {
        grid-template-columns: 1fr;
    }

    .zoom-help {
        white-space: normal;
        text-align: center;
    }

    .lightbox-image {
        max-width: 94vw;
        max-height: 76vh;
    }

}

@media (max-width: 460px) {

    .logo {
        font-size: 19px;
    }

    .nav a {
        font-size: 13px;
    }

    .nav .header-whatsapp {
        padding: 9px 16px;
    }

    .product-image {
        height: 310px;
    }

    .modal-image-column {
        flex-basis: 38%;
    }

    .modal-info {
        padding: 26px 18px;
    }

    .modal-close {
        top: 10px;
        right: 10px;

        width: 38px;
        height: 38px;
    }

    .lightbox-controls {
        width: calc(100% - 30px);

        justify-content: center;
    }

}