:root {
    --primary-color: #0011ff;
    --secondary-color: #0011ff;
    --accent-color: #0011ff;
    --difference-color: #ffffff;
    --background-color: #ffffff; 
    --border-color: #CCCCCC;      
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Georgia', serif;
    margin: 0; padding: 0;
    background-color: var(--background-color); 
    color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden; 
}

#hero-section {
    min-height: 100vh; width: 100vw;
    position: relative; 
    background-color: var(--background-color);
    overflow: hidden; box-sizing: border-box;
    padding: 5vw; 
}

.top-right-label {
    position: absolute; top: 5vh; right: 5vw;
    font-size: clamp(0.8rem, 1vw, 1rem);
    font-weight: 400; color: var(--primary-color); 
    line-height: 1.3; text-align: right; z-index: 30;
    background-color: rgba(255, 255, 255, 0.9); 
    padding: 10px 15px; 
    border-radius: 4px; 
}

.hero-description {
    position: absolute; top: 5vh; left: 5vw;
    font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 400;
    color: var(--primary-color); line-height: 1.3;
    max-width: 300px; z-index: 40;
    background-color: rgba(255, 255, 255, 0.9); 
    padding: 15px; 
    border-radius: 4px;
    mix-blend-mode: normal; 
}

#image-marquee-container {
    position: absolute; top: 45%; left: 0; 
    width: 100%; height: auto; min-height: 650px; 
    transform: translateY(-50%); z-index: 5; overflow: visible;
}

#marquee-inner {
    display: flex; flex-direction: row; align-items: center;
    flex-shrink: 0; gap: 60px; 
    animation: scroll-left 30s linear infinite; padding: 30px 0;
}

.marquee-img {
    flex-shrink: 0; max-height: 650px; width: auto;   
    margin-right: 0; object-fit: contain;
}

.marquee-item {
    position: relative; display: inline-block; padding-bottom: 40px;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.background-title {
    position: absolute; bottom: 5vh; left: 50%; width: 100%;
    font-family: 'Georgia', serif; font-weight: 900;
    font-size: min(22vw, 16rem); color: var(--primary-color);
    text-align: center; transform: translateX(-50%); margin: 0;
    user-select: none; opacity: 0.5; z-index: 25;    
}

.scroll-arrow {
    position: absolute; bottom: 5vh; z-index: 30;
    text-decoration: none; color: var(--secondary-color);
    font-size: clamp(1rem, 2vw, 1.8rem); 
    animation: bounce 2s infinite ease-out;
    padding: 10px; left: 50%; transform: translateX(-50%); 
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

#editorial-section {
    min-height: 100vh; width: 100vw; display: flex; 
    padding: 5vw; box-sizing: border-box; gap: 5vw;
    background-color: var(--background-color);
    border-top: 1px solid var(--secondary-color); 
}

.editorial-column {
    flex: 1; padding: 40px 0; display: flex; flex-direction: column;
}

.editorial-description {
    border-right: 1px solid var(--secondary-color); 
    padding-right: 5vw; justify-content: center; 
}

.editorial-title {
    font-family: 'Georgia', serif; font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: 700; color: var(--primary-color); 
    margin-bottom: 30px; line-height: 1.1;
}

.editorial-text {
    font-family: 'Inter', sans-serif; font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--primary-color);
}

.editorial-text-small {
    font-family: 'Inter', sans-serif; font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: var(--secondary-color);
}

.unit-toggle-btn {
    display: inline-block; padding: 12px 20px; margin-top: 20px;
    font-family: 'Inter', sans-serif; font-size: 0.8rem;
    font-weight: 700; color: var(--primary-color);
    background-color: transparent; border: 1px solid var(--primary-color);
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.1em;
    transition: all 0.3s ease; width: max-content;
    position: relative;
    z-index: 50; 
}
.unit-toggle-btn:hover {
    background-color: var(--primary-color); color: var(--background-color);
}

.unit-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background-color);
    border: 1px solid var(--primary-color);
    margin-top: 5px;
    display: none;
    min-width: 100%;
    z-index: 1001; 
}

.unit-dropdown.show {
    display: block;
}

.unit-option {
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 17, 255, 0.1);
}

.unit-option:last-child {
    border-bottom: none;
}

.unit-option:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.unit-option.active {
    background-color: rgba(0, 17, 255, 0.1);
}

.scroll-arrow-internal {
    margin-top: 40px; font-size: 0.8rem; color: var(--secondary-color);
    text-decoration: none; letter-spacing: 0.1em; font-weight: 700;
    text-transform: uppercase; font-family: 'Inter', sans-serif;
}
.scroll-arrow-internal:hover { color: var(--primary-color); }

.editorial-data {
    padding-left: 5vw; justify-content: center; gap: 40px; 
}

.insight-item {
    display: flex; flex-direction: column; padding-bottom: 20px;
    border-bottom: 1px solid var(--secondary-color); margin-bottom: 0; 
}

#editorial-section .editorial-data .insight-item:nth-child(2),
#editorial-section .editorial-data .insight-item:nth-child(3) {
    background-color: rgba(0, 17, 255, 0.05); 
    padding: 15px; margin: 5px 0 25px 0; 
    border-radius: 4px; border: none; 
}

.insight-value {
    font-family: 'Georgia', serif; font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700; color: var(--primary-color); 
}

.insight-label {
    font-family: 'Inter', sans-serif; color: var(--secondary-color);
    font-size: clamp(0.8rem, 1.2vw, 1rem); font-weight: 400;
    letter-spacing: 0.15em; text-transform: uppercase;
}

.insight-value-small {
    font-family: 'Inter', sans-serif; font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    color: var(--primary-color); font-weight: 700;
}

.insight-measure {
    font-family: 'Inter', sans-serif; font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: var(--secondary-color);
}

.data-group-row { display: flex; gap: 5vw; margin-top: 20px; }
.insight-item-small { flex: 1; display: flex; flex-direction: column; text-align: left; }

.insight-value-mini {
    font-family: 'Georgia', serif; font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700; color: var(--primary-color);
}

.insight-label-mini {
    font-family: 'Inter', sans-serif; color: var(--secondary-color);
    font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em;
}

@media (max-width: 900px) {
    #editorial-section { flex-direction: column; min-height: auto; }
    .editorial-description { border-right: none; padding-right: 0; padding-bottom: 40px; }
    .editorial-data { padding-left: 0; padding-top: 40px; }
}

#gallery-page {
    position: relative; width: 100vw; min-height: 100vh; 
    z-index: 25; overflow: hidden; margin-top: 0; 
}

#gallery-page header {
    position: static; width: 100%; height: 50px; z-index: 50; 
    display: flex; align-items: center; justify-content: center; 
    padding: 0 5vw; box-sizing: border-box; overflow-x: hidden; 
    background-color: var(--background-color); color: var(--primary-color); 
    border-top: 1px solid var(--secondary-color); 
}

#filter-controls {
    display: flex; align-items: center; justify-content: space-around; width: 100%; 
}

.filter-button {
    background-color: transparent; padding: 15px 10px; font-size: 0.9em;
    cursor: pointer; flex: 1; text-align: center;
    font-family: 'Inter', sans-serif; color: var(--secondary-color); 
    border: none; border-bottom: 2px solid transparent; 
    text-transform: uppercase; font-weight: 700; opacity: 0.5;
}
.filter-button:hover, .filter-button.active-filter {
    color: var(--primary-color); border-bottom: 2px solid var(--primary-color); opacity: 1; 
}

.filter-button.icon-only {
    flex: 0 0 auto;
    padding: 15px 10px;
}


.filter-button.favorites-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto; 
    padding: 15px 10px;
}
.filter-button.favorites-tab .filter-star-icon {
    width: 18px; height: 18px; display: inline-flex;
}

.filter-button.favorites-tab .filter-star-icon svg polygon {
    fill: var(--primary-color) !important;
    stroke: var(--primary-color) !important;
    stroke-width: 4px;
}

#gallery-container {
    position: relative; width: 95%; max-width: 2500px; margin: 20px auto; 
    min-height: 80vh; background-color: transparent; display: block; 
}

.gallery-item {
    background-color: transparent; position: absolute; 
    overflow: hidden; cursor: pointer; z-index: 10;
    transition: opacity 0.4s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.6, 1);
}

.gallery-item.filtered {
    opacity: 0; transform: scale(0); pointer-events: none; z-index: 1;
}

.gallery-item img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    background: transparent;
    border: none;
}


.modal {
    display: none; position: fixed; z-index: 100; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.98);

    overflow: hidden; 
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.close-button {
    position: fixed; top: 20px; right: 35px;
    color: var(--primary-color); font-size: 40px; font-weight: bold;
    cursor: pointer; z-index: 110; transition: color 0.2s;
}
.close-button:hover { color: #bbb; }


#modal-scroll-wrapper {
    width: 100%; height: 100%;
    overflow-y: auto; 
    overflow-x: auto; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start; 
    padding: 80px 0; 
    box-sizing: border-box;
    scroll-behavior: smooth;
}


#modal-scroll-wrapper.fit-center {
    justify-content: center;
}

#modal-scroll-wrapper.compare-center {
    justify-content: center;
}


#modal-visual-content {
    position: relative;
    display: block;
    min-width: min-content; 
    min-height: min-content;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 40px;
}

#modal-visual-content.compare-side-by-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: nowrap;
}
#modal-visual-content.compare-side-by-side #modal-image-container {
    order: 1;
    flex-shrink: 1;
    max-width: 45vw;
}
#modal-visual-content.compare-side-by-side .ref-object-container {
    order: 2;
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none;
    align-self: center;
    flex-shrink: 1;
    max-width: 45vw;
}

#modal-image-container {
    position: relative; width: auto; height: auto; flex-shrink: 0; display: flex;
}

#modal-image-container img {
    max-width: none; max-height: none; object-fit: contain; display: block;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más suave */
    box-shadow: none;
    background: transparent;
}

.ref-object-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-object-container.compare-side-by-side {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none;
    align-self: center;
}

.ref-object-container.visible {
    opacity: 1;
    pointer-events: auto; /* enable hover tooltip */
}

.ref-svg-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-label-hover {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ref-svg-wrapper:hover .ref-label-hover {
    opacity: 1;
}

.modal-info-reference {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 10px 0 0 0;
    font-family: 'Inter', sans-serif;
    color: var(--secondary-color);
    font-weight: 600;
}

.ref-label {
    display: none;
}

.modal-info-container {
    position: fixed; 
    bottom: 30px; 
    left: 30px; 
    width: 320px; 
    max-width: 90%; 
    max-height: 60vh; 
    padding: 20px; 
    text-align: left; 
    z-index: 101; 
    border: 1px solid var(--primary-color); 
    background-color: #fff; 
    color: var(--primary-color); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow-y: auto; 
    overflow-x: hidden;
}

.modal-info-title {
    font-family: 'Georgia', serif; font-size: 1.2rem; font-weight: 700;
    margin: 0 0 10px 0; line-height: 1.2;
}
.modal-info-details {
    font-size: 0.9rem; line-height: 1.5; margin: 0 0 15px 0; font-family: 'Inter', sans-serif;
}

.modal-controls {
    display: flex; gap: 10px; margin-top: 15px; padding-top: 15px;
    border-top: 1px solid rgba(0, 17, 255, 0.2);
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1; background: transparent; border: 1px solid var(--primary-color);
    color: var(--primary-color); padding: 8px 0; min-width: 70px;
    font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; cursor: pointer; transition: all 0.2s;
}
.modal-btn:hover, .modal-btn.active {
    background: var(--primary-color); color: #fff;
}

.scale-feedback {
    width: 100%; text-align: center; font-family: 'Inter', sans-serif;
    font-size: 0.75rem; color: var(--secondary-color); margin-top: 8px;
    font-style: italic;
}

.modal-star-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--primary-color);
    background: #fff; color: var(--primary-color);
    padding: 6px; width: 30px; height: 30px;
    cursor: pointer; transition: all 0.2s;
}
.modal-star-toggle:hover { background: rgba(0,17,255,0.06); }
.modal-star-icon { display: inline-flex; width: 18px; height: 18px; }
.modal-star-icon svg polygon {
    fill: none !important;
    stroke: var(--primary-color);
    stroke-width: 4px;
    transition: fill 0.2s ease;
}
.modal-star-icon.filled svg polygon {
    fill: var(--primary-color) !important;
}

#favorites-container {
    position: relative; width: 95%; max-width: 2500px; margin: 20px auto;
    min-height: 60vh; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px; align-items: start;
}
.fav-item {
    position: relative; background: #fff; border: 1px solid var(--primary-color);
    border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 8px;
}
.fav-thumb {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; background: transparent; border: none;
}
.fav-select {
    display: flex; align-items: center; gap: 8px; font-family: 'Inter', sans-serif; font-size: 0.75rem;
}
.fav-checkbox { width: 16px; height: 16px; }


#favorites-compare-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #fff; border: 1px solid var(--primary-color); border-radius: 8px;
    padding: 10px 14px; display: none; gap: 10px; align-items: center; z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 17, 255, 0.2);
    font-family: 'Inter', sans-serif; font-size: 0.8rem; color: var(--primary-color);
}
#favorites-compare-bar.active { display: flex; }
.fav-compare-btn {
    background: var(--primary-color); color: #fff; border: none; border-radius: 4px;
    padding: 8px 12px; font-weight: 700; text-transform: uppercase; cursor: pointer;
}
.fav-compare-btn:disabled { background: #ccc; cursor: not-allowed; }


.fav-comparison-modal {
    display: none; position: fixed; z-index: 200; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.98); overflow-y: auto; overflow-x: hidden;
}
.fav-comparison-modal.active { display: block; }
.fav-comparison-header {
    position: sticky; top: 0; height: 70px; background: #fff; border-bottom: 1px solid var(--primary-color);
    display: flex; align-items: center; justify-content: space-between; padding: 0 30px; z-index: 210;
}
.fav-comparison-content {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 60px; 
    padding: 40px;
    flex-direction: row;
    flex-wrap: nowrap;
    min-height: 70vh;
}
.fav-comp-side { 
    flex: 1; 
    min-width: 0;
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}
.fav-comp-side .comp-img { 
    display: block; 
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.fav-comp-meta {
    margin-top: 10px !important;
    text-align: center;
}

.site-footer {
    width: 100%;
    padding: 20px 5vw;
    box-sizing: border-box;
    border-top: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    text-align: center;
    background: var(--background-color);
}
.site-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.site-footer a:hover {
    text-decoration: underline;
}