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

html, body {
    height: 100%;
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    width: 100%;
}

.logo {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    height: 60px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 30px;
    color: #201908;
    letter-spacing: 0.1em;
    text-decoration: none;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
}

.menu-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 60px;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s ease;
}

.menu-button span {
    width: 24px;
    height: 1px;
    background-color: #201908;
    display: block;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.menu-button:hover span {
    opacity: 1;
}

.menu-button.active span {
    background-color: #ffffff;
}

.menu-button.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-button.active span:nth-child(2) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #353029;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-popup.active {
    opacity: 1;
    visibility: visible;
}

.menu-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.menu-popup-item {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.menu-popup.active .menu-popup-item {
    transform: translateY(0);
}

.menu-popup-item:nth-child(1) { transition-delay: 0.05s; }
.menu-popup-item:nth-child(2) { transition-delay: 0.1s; }
.menu-popup-item:nth-child(3) { transition-delay: 0.15s; }
.menu-popup-item:nth-child(4) { transition-delay: 0.2s; }
.menu-popup-item:nth-child(5) { transition-delay: 0.25s; }

.menu-popup-item:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .menu-popup-item {
        font-size: 20px;
    }
}

.image-gallery {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    padding-top: 60px;
    contain: layout style;
}

.image-item {
    width: 100%;
    min-height: 80px;
    max-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    cursor: pointer;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: max-height;
}

.image-item.collapsed {
    max-height: 80px;
}

.image-item.expanded {
    max-height: 2000px;
}

.image-item img {
    width: 100%;
    height: 100%;
    min-height: 80px;
    object-fit: cover;
    object-position: center center;
    display: block;
    flex-shrink: 0;
    transition: object-fit 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), object-position 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.image-item.expanded img {
    height: auto !important;
    min-height: 80px;
    max-height: none;
    object-fit: contain;
    width: 100%;
}

/* Canvas page specific: collapsed images at 80px */
.canvas-page .image-item.collapsed img {
    height: 80px !important;
    min-height: 80px !important;
    object-position: center center !important;
}

/* Ensure collapsed images always center on all devices */
.image-item.collapsed img {
    height: 80px !important;
    min-height: 80px !important;
    object-position: center center !important;
    object-fit: cover !important;
}

.image-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 100;
    font-size: 16px;
    color: #201908;
    padding: 0 20px;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-item.expanded .image-title {
    opacity: 1;
    max-height: 200px;
    padding: 20px;
}

/* Series layout for digital page */
.series-container {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    padding-top: 60px;
}

.series {
    margin-bottom: 0;
}

.series-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 100;
    font-size: 18px;
    color: #201908;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: 100%;
    display: block;
}

.series-images {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.series-images .image-item {
    max-height: 80px;
}

.series-images .image-item.collapsed {
    max-height: 80px;
}

.series-images .image-item.expanded {
    max-height: 2000px;
}

.series-images .image-item.expanded img {
    height: auto;
    object-fit: contain;
    width: 100%;
}

.regular-images {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.regular-images .image-item {
    max-height: 80px;
}

.regular-images .image-item.collapsed {
    max-height: 80px;
}

/* Chair page 2-column layout */
.chair-gallery {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    padding-top: 60px;
    overflow: hidden;
}

.chair-image {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

/* Mobile responsive for chair page */
@media (max-width: 768px) {
    .chair-gallery {
        flex-direction: column;
        height: auto;
        min-height: 200vh;
    }
    
    .chair-image {
        width: 100%;
        height: 100vh;
    }
}

