@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Archivo+Black&display=swap');

:root {
    --lm-orange: #F2AB13;
    --dark-grey: #0c0c0c;
    --mid-grey: #1c1c1c;
    --soft-grey: #f5f5f5;
    --card-bg: #ffffff;
    --border: #e1e1e1;
}

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

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #2a2a2a;
    background: var(--soft-grey);
    display: flex;
    flex-direction: column;
}

.catalog-header {
    background: var(--dark-grey);
    color: #fff;
    padding: 18px 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.back-button {
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.back-button:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.header-copy p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lm-orange);
    margin-bottom: 4px;
}

.header-copy h1 {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    margin-bottom: 4px;
}

.header-copy span {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-right img {
    height: 60px;
    object-fit: contain;
}

.catalog-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    padding: 24px 4vw;
    min-height: 0;
}

.catalog-grid-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.filter-menu {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
    align-items: center;
    flex-shrink: 0;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border);
    background: #fff;
    color: #666;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.filter-btn:hover {
    border-color: var(--lm-orange);
    color: var(--lm-orange);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--lm-orange);
    border-color: var(--lm-orange);
    color: #fff;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    overflow-y: auto;
    padding-right: 6px;
}

.catalog-card {
    border: none;
    border-radius: 18px;
    background: var(--card-bg);
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.catalog-card:hover,
.catalog-card.active {
    transform: translateY(-4px);
}

.card-media {
    background: #ffffff;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    height: 220px;
    overflow: visible;
    position: relative;
}

.card-media img {
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.card-infos {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-range {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
}

.card-infos h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.card-infos span {
    font-size: 0.85rem;
    color: #666;
}

.product-detail {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.detail-placeholder {
    margin: auto;
    text-align: center;
    color: #aaa;
}

.detail-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.detail-range {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: #999;
}

.detail-header h2 {
    font-size: 1.6rem;
    margin-top: 4px;
    color: #111;
}

.detail-subtitle {
    font-size: 0.95rem;
    color: #666;
}

.detail-ref {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 600;
    color: #444;
}

.detail-summary {
    font-size: 0.95rem;
    color: #4a4a4a;
    margin-bottom: 16px;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
    min-height: 0;
    overflow: hidden;
}

.detail-gallery {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
}

.gallery-main {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    height: auto;
    overflow: visible;
}

.gallery-main img {
    max-width: calc(100% - 60px);
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.gallery-nav:hover {
    background: rgba(255,255,255,0.3);
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-fullscreen {
    position: absolute;
    bottom: 12px;
    right: 12px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.gallery-fullscreen:hover {
    background: rgba(0,0,0,0.8);
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.gallery-thumb {
    border: 2px solid transparent;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    padding: 6px;
}

.gallery-thumb.active {
    border-color: var(--lm-orange);
    background: rgba(242,171,19,0.12);
}

.gallery-thumb {
    min-width: 100px;
    min-height: 75px;
}

.gallery-thumb img {
    width: 100px;
    height: 75px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 8px;
}

.detail-info {
    overflow-y: auto;
    padding-right: 6px;
}

.detail-description p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #3a3a3a;
}

.detail-specs {
    margin-top: 18px;
}

.detail-specs h3,
.detail-docs h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #111;
}

.detail-specs ul {
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.detail-specs li {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    color: #555;
}

.detail-specs li span {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #999;
}

.detail-specs li strong {
    color: #222;
    margin-top: 2px;
}

.detail-docs {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-docs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--lm-orange);
    font-weight: 600;
}

.media-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.media-modal.open {
    opacity: 1;
    pointer-events: all;
}

.media-dialog {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    background: #000;
    padding: 20px;
    border-radius: 20px;
}

.media-dialog img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    .detail-body {
        grid-template-columns: 1fr;
    }
}

