/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

/* Global spacing with viewport-based scaling */
body {
    font-family: 'Courier New', monospace;
    background: white;
    color: black;
    padding: clamp(12px, 2vw, 24px);
    font-size: clamp(14px, 1.2vw, 18px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 300;
}

/* Container */
.container {
    max-width: 100%;
}

/* Version text - scales with viewport */
.vat-number {
    font-size: clamp(14px, 1.2vw, 16px);
    margin-bottom: clamp(16px, 2vw, 24px);
}

/* Navigation links - grouped together */
.site-info {
    margin-bottom: clamp(4px, 0.5vw, 8px);
}

.site-info:last-of-type {
    margin-bottom: clamp(24px, 3vw, 32px);
}

/* Table - scales proportionally */
.product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(14px, 1.4vw, 18px);
}

.product-table th,
.product-table td {
    border: 1px solid black;
    padding: clamp(8px, 1vw, 12px);
    text-align: left;
    font-weight: normal;
}

.product-table th {
    background: #e6e6e6;
}

.product-table tr:nth-child(even) {
    background: #fafafa;
}

/* Links */
a {
    color: black;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Info page styling */
h1 {
    font-size: clamp(16px, 1.6vw, 24px);
    font-weight: normal;
    margin-top: clamp(24px, 3vw, 32px);
    margin-bottom: clamp(10px, 1.2vw, 12px);
}

p {
    max-width: 600px;
    margin-bottom: clamp(16px, 2vw, 24px);
    line-height: 1.6;
    font-size: clamp(14px, 1.2vw, 16px);
}

/* ---------------------- */
/* Project Page Styles */
/* ---------------------- */

.top-link {
    margin-bottom: clamp(24px, 3vw, 40px);
    font-size: clamp(14px, 1.2vw, 16px);
}

/* ---------------- Hero Image ---------------- */

.main-image {
    margin-bottom: clamp(24px, 3vw, 40px);
    position: relative;
    height: clamp(500px, 60vh, 750px);
    width: fit-content;
    max-width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.main-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    transform-origin: bottom left;
    transition: opacity 0.2s ease;
}

/* Navigation zones - invisible */
.image-nav-left,
.image-nav-right {
    position: absolute;
    top: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 10;
    background: transparent;
}

.image-nav-left { 
    left: 0;
    width: 50%;
}

.image-nav-right { 
    left: 50%;
    right: auto;
    width: 50vw;
}

/* ---------------- Thumbnails ---------------- */

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.2vw, 12px);
    margin-bottom: clamp(24px, 3vw, 40px);
    max-width: 100%;
}

.image-grid img {
    height: clamp(150px, 18vh, 250px);
    width: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.image-grid img:hover {
    opacity: 1;
}

.image-grid img.active {
    opacity: 1;
}

/* ---------------- Viewport-based breakpoints ---------------- */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    body {
        font-size: clamp(14px, 1.5vw, 16px);
    }
    
    .main-image {
        height: clamp(450px, 55vh, 700px);
    }
    
    .image-grid img {
        height: clamp(130px, 16vh, 220px);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .main-image {
        height: clamp(400px, 50vh, 600px);
    }
    
    .image-grid img {
        height: clamp(110px, 14vh, 180px);
    }
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding: clamp(12px, 3vw, 16px);
    }

    .main-image {
        height: clamp(250px, 35vh, 400px);
    }

    .image-grid {
        gap: clamp(6px, 1.5vw, 10px);
    }

    .image-grid img {
        height: clamp(80px, 12vh, 140px);
    }

    p {
        max-width: 100%;
    }
    
    .product-table {
        font-size: 14px;
    }
    
    .product-table th,
    .product-table td {
        padding: 8px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    body {
        font-size: 13px;
    }
    
    .image-grid {
        gap: 6px;
    }
    
    .image-grid img {
        height: clamp(60px, 10vh, 100px);
    }
}