/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #000000;
    overflow-x: hidden;
}

/* Intro Animation Page */
.intro-page {
    height: 100vh;
    overflow: hidden;
}

.intro-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.intro-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity 0.3s;
}

.intro-name {
    font-family: 'Afacad', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 2;
    transition: opacity 0.5s ease-in;
    text-align: center;
    white-space: nowrap;
}

.intro-name.visible {
    opacity: 1;
}

.enter-site-btn {
    font-family: 'Afacad', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background-color: transparent;
    border: 1px solid #ffffff;
    border-radius: 4px;
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 2;
    cursor: pointer;
    transition: opacity 0.5s ease-in;
    white-space: nowrap;
}

.enter-site-btn.visible {
    opacity: 1;
}

.enter-site-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fade out overlay for color transition */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease-out;
    background: linear-gradient(135deg, 
        rgba(76, 140, 80, 0.95) 0%, 
        rgba(139, 90, 43, 0.95) 30%,
        rgba(210, 180, 140, 0.95) 60%,
        rgba(255, 255, 255, 0.95) 100%);
}

.fade-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Fade-in overlay for homepage transition */
.fade-in-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    background: linear-gradient(135deg, 
        rgba(139, 90, 43, 1) 0%, 
        rgba(210, 180, 140, 1) 30%,
        rgba(255, 255, 255, 1) 60%,
        rgba(255, 255, 255, 1) 100%);
}

.fade-in-overlay.active.fade-out {
    opacity: 0;
}

/* Main Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header.has-back-link {
    justify-content: flex-start;
}

.site-title {
    font-family: 'Afacad', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666666;
    text-decoration: none;
}

.site-title.home-link {
    margin-right: auto;
}

.main-header.has-back-link .site-title {
    margin-left: 0;
}

.back-link {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #000000;
    text-decoration: none;
    margin-right: auto;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
}

.hamburger-menu span {
    width: 28px;
    height: 2.5px;
    background-color: #716E6E;
    transition: all 0.3s;
}

/* Home Page */
.home-main {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px;
    gap: 20px;
    padding-bottom: 40px;
}

.category-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    display: block;
    text-decoration: none;
    border-radius: 0;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-label {
    position: absolute;
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
}

.paintings-card .category-label {
    top: 20px;
    right: 20px;
}

.sculpture-card .category-label {
    bottom: 25px;
    left: 45px;
}

/* Gallery Loading Animation */
.gallery-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    visibility: visible;
}

.gallery-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-top-color: #666666;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile adjustments for loader */
@media (max-width: 480px) {
    .loader-spinner {
        width: 36px;
        height: 36px;
        border-width: 2px;
    }
}

/* Gallery Pages */
.gallery-main {
    padding: 20px;
    padding-bottom: 100px;
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

.gallery-main.loaded {
    opacity: 1;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    /* Ensure header stays above gallery grid */
    position: relative;
    z-index: 10;
}

/* Ensure proper spacing between header and gallery grid in view-all mode */
.gallery-header + .category-section {
    margin-top: 0;
    padding-top: 0;
}

/* Sculpture gallery: spacing matches paintings gallery structure */
/* In paintings: header (20px margin-bottom) + category-title (20px margin-bottom) = 40px total spacing before first item */
/* In sculpture: header (20px margin-bottom) + we need 20px more = 40px total */
/* Add margin-top to first item to match paintings gallery spacing */
.gallery-header + .category-section:not(:has(.category-title)) {
    padding-top: 0 !important;
}

/* Ensure gallery grid has proper spacing from header - matches paintings gallery structure */
.gallery-header + .category-section #sculptureGallery:not(.view-all) {
    margin-top: 10rem !important;
    padding-top: 0 !important;
}

/* Ensure first artwork item in sculpture gallery has proper spacing from header */
/* Match paintings gallery: header (20px) + category-title equivalent spacing (20px) = 40px */
#sculptureGallery:not(.view-all) .artwork-item:first-child {
    margin-top: 0;
    margin-bottom: 0;
}

.gallery-header + .category-section #sculptureGallery.view-all {
    margin-top: 6.25rem !important; /* Reduced by 3.75rem (3 spaces of 20px = 60px) to raise photos up */
    padding-top: 0;
}

.gallery-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 0;
}

.view-toggle {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #000000;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
}

.gallery-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #8B8B8B;
    margin-bottom: 24px;
}

.category-section {
    margin-bottom: 40px;
    /* Ensure section stays in flow and doesn't overlap header */
    position: relative;
    z-index: 1;
    /* Ensure proper spacing from header above */
    margin-top: 0;
    padding-top: 0;
}

.gallery-grid.view-all .category-section {
    margin-bottom: 24px;
}

.category-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    text-align: center;
    margin-bottom: 20px;
}

/* Reduce spacing in view-all mode */
body:has(.gallery-grid.view-all) .category-title,
.gallery-grid.view-all + .category-title {
    margin-bottom: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    /* Prevent layout shifts during image loading */
    grid-auto-rows: auto;
}

/* Ensure sculpture gallery has consistent width and alignment */
#sculptureGallery:not(.view-all) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.gallery-grid.view-all {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    row-gap: 8px;
    grid-auto-rows: auto;
    align-items: start;
}

/* View All page - combine paintings and sculptures */
#allArtworkGallery.view-all {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px !important;
    row-gap: 8px !important;
    column-gap: 8px !important;
    grid-auto-rows: min-content;
    align-items: start;
    /* Ensure uniform spacing - override any other spacing rules */
    margin: 0;
    padding: 0;
}

/* Ensure uniform spacing between all items in view-all page - remove any individual margins */
#allArtworkGallery.view-all .artwork-item {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    position: relative;
    /* Ensure no transforms that affect spacing */
    transform: none !important;
    top: auto !important;
    left: auto !important;
}

/* Override cardinalflower width in view-all to maintain grid consistency */
#allArtworkGallery.view-all .artwork-item[data-artwork-id="cardinalflower"] {
    width: 100% !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    grid-column: span 1;
}

/* Ensure awakening sculpture in view-all page gets proper rotation */
#allArtworkGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"] {
    transform: rotate(90deg) !important;
    -webkit-transform: rotate(90deg) !important;
    transform-origin: center center !important;
    image-orientation: none !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* Sculpture gallery specific - consistent vertical spacing */
#sculptureGallery.view-all {
    row-gap: 20px;
    column-gap: 16px;
    grid-auto-rows: max-content;
    align-items: start;
    /* Ensure grid starts below header with proper spacing */
    margin-top: 0;
    /* Ensure consistent row spacing regardless of item heights */
    grid-template-rows: repeat(3, auto);
}

#sculptureGallery.view-all .artwork-item {
    width: 100%;
    margin: 0;
    align-self: start;
    display: block;
    /* Ensure items stay in grid flow and don't overlap header */
    position: relative;
    top: 0;
    /* Remove any margins that could interfere with grid row-gap spacing */
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Ensure first item (awakening) is positioned below header and has same width as others */
#sculptureGallery.view-all .artwork-item:first-child {
    /* Ensure it's in normal grid flow, below header, in first column */
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin-top: 0;
    /* Ensure no negative margins or absolute positioning that could pull it up */
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    /* Ensure it doesn't overlap header */
    z-index: 1;
}


#sculptureGallery.view-all .artwork-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* CRITICAL: awake-main.webp needs 90deg clockwise rotation in view-all mode */
/* Ensure it matches carousel size and has same width as other gallery photos */
#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] {
    width: 100%;
    overflow: hidden;
    position: relative;
}

#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"],
#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.webp"],
#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.jpg"],
#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.jpeg"] {
    /* Apply 90deg clockwise rotation - transform applied by JavaScript */
    transform-origin: center center !important;
    image-orientation: none !important;
    -webkit-image-orientation: none !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    max-width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Ensure view-all grid items maintain proper container bounds */
.gallery-grid.view-all .artwork-item {
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Awakening in view-all mode should have same container behavior as other sculptures */
#sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] {
    overflow: hidden;
}

/* Ensure all sculpture gallery images are upright (except The Dance) */
/* Awakening images are now all upright, same as flame */
#sculptureGallery .artwork-item:not([data-artwork-id="thedance"]) {
    transform: none !important;
}

#sculptureGallery .artwork-item:not([data-artwork-id="thedance"]) img {
    transform: none !important;
    -webkit-transform: none !important;
    image-orientation: none !important;
    /* Force no EXIF rotation - display image as-is */
}

/* Specifically ensure upright sculptures stay upright */
#sculptureGallery .artwork-item[data-artwork-id="awakening"],
#sculptureGallery .artwork-item[data-artwork-id="flame"],
#sculptureGallery .artwork-item[data-artwork-id="warrior"],
#sculptureGallery .artwork-item[data-artwork-id="inspiration"],
#sculptureGallery .artwork-item[data-artwork-id="alvinailey"] {
    transform: none !important;
}

#sculptureGallery .artwork-item[data-artwork-id="awakening"] img:not([src*="awake-main"]),
#sculptureGallery .artwork-item[data-artwork-id="flame"] img,
#sculptureGallery .artwork-item[data-artwork-id="warrior"] img,
#sculptureGallery .artwork-item[data-artwork-id="inspiration"] img,
#sculptureGallery .artwork-item[data-artwork-id="alvinailey"] img {
    transform: none !important;
    -webkit-transform: none !important;
    image-orientation: none !important;
    /* Force no EXIF rotation */
}

/* Increase gap between first and second photo to about one inch */
#sculptureGallery .artwork-item[data-artwork-id="flame"] {
    margin-top: 144px !important;
}

/* CRITICAL: Rotate awake-main.webp 90deg clockwise (to the right) to fix orientation in gallery */
/* Ensure it matches carousel size and has same width as other gallery photos */
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.webp"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.jpg"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="awake-main.jpeg"] {
    transform: rotate(90deg) !important;
    -webkit-transform: rotate(90deg) !important;
    -moz-transform: rotate(90deg) !important;
    -ms-transform: rotate(90deg) !important;
    -o-transform: rotate(90deg) !important;
    transform-origin: center center !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: none !important;
    image-orientation: 0deg !important;
    -webkit-image-orientation: 0deg !important;
    /* Ensure image stays within container bounds like other sculptures */
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    /* Ensure rotated image doesn't overflow container */
    position: relative;
}

/* Remove rotate-90 class from non-Dance sculptures (including awakening) */
#sculptureGallery .artwork-item[data-artwork-id="awakening"].rotate-90,
#sculptureGallery .artwork-item[data-artwork-id="flame"].rotate-90,
#sculptureGallery .artwork-item[data-artwork-id="warrior"].rotate-90,
#sculptureGallery .artwork-item[data-artwork-id="inspiration"].rotate-90,
#sculptureGallery .artwork-item[data-artwork-id="alvinailey"].rotate-90 {
    transform: none !important;
}

#sculptureGallery .artwork-item[data-artwork-id="awakening"].rotate-90 img,
#sculptureGallery .artwork-item[data-artwork-id="flame"].rotate-90 img,
#sculptureGallery .artwork-item[data-artwork-id="warrior"].rotate-90 img,
#sculptureGallery .artwork-item[data-artwork-id="inspiration"].rotate-90 img,
#sculptureGallery .artwork-item[data-artwork-id="alvinailey"].rotate-90 img {
    transform: none !important;
    -webkit-transform: none !important;
}

/* Override rotate-90 class for awake-main.webp - rotate 90deg clockwise */
#sculptureGallery .artwork-item[data-artwork-id="awakening"].rotate-90 img[src*="awake-main"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"].rotate-90 img[src*="awake-main.webp"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"].rotate-90 img[src*="awake-main.jpg"] {
    transform: rotate(90deg) !important;
    -webkit-transform: rotate(90deg) !important;
    -moz-transform: rotate(90deg) !important;
    -ms-transform: rotate(90deg) !important;
    -o-transform: rotate(90deg) !important;
    transform-origin: center center !important;
}

/* The Dance should be rotated in gallery (it has different original orientation) */
#sculptureGallery .artwork-item[data-artwork-id="thedance"] {
    /* The Dance can be rotated - it has different orientation */
    /* Remove margin-top to prevent overlap with flame sculpture */
    margin-top: 20rem !important;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    /* Ensure proper spacing in grid - let grid gap handle spacing */
    width: 100%;
    box-sizing: border-box;
}

#sculptureGallery .artwork-item[data-artwork-id="thedance"] img {
    /* The Dance images may need rotation - handled by JavaScript */
    image-orientation: from-image;
    /* Ensure image stays within container bounds */
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.artwork-item {
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure all sculpture gallery items have consistent width and alignment */
#sculptureGallery:not(.view-all) .artwork-item {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible; /* Changed to visible for rotated images - prevents cropping */
    position: relative;
}

/* Non-rotated images can use overflow:hidden for cleaner edges */
#sculptureGallery:not(.view-all) .artwork-item:not([data-artwork-id="awakening"]):not([data-artwork-id="thedance"]) {
    overflow: hidden;
}

/* Awakening container should behave like other sculptures - no special overflow */
/* Ensure container matches width of other sculptures */
#sculptureGallery:not(.view-all) .artwork-item[data-artwork-id="awakening"] {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    /* Ensure container doesn't expand beyond grid column width */
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Ensure rotated image is properly contained */
    display: block;
}

.artwork-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
    /* Prevent layout shifts during image loading on mobile */
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
}

/* Ensure all sculpture images are properly contained and same width */
#sculptureGallery:not(.view-all) .artwork-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
}

.artwork-item:hover img {
    transform: scale(1.02);
}

/* Preserve rotation on hover for awake-main.webp */
#sculptureGallery .artwork-item[data-artwork-id="awakening"]:hover img[src*="awake-main"] {
    transform: rotate(90deg) scale(1.02) !important;
    -webkit-transform: rotate(90deg) scale(1.02) !important;
}

/* Preserve rotation on hover for aw.webp (if still used) */
#sculptureGallery .artwork-item[data-artwork-id="awakening"]:hover img[src*="aw.webp"] {
    transform: rotate(90deg) scale(1.02) !important;
    -webkit-transform: rotate(90deg) scale(1.02) !important;
}

.artwork-item.rotate-90 {
    overflow: visible;
    display: block;
    position: relative;
    /* Ensure container maintains height to preserve grid gap */
    min-height: 0;
}

.artwork-item.rotate-90 img {
    width: 100%;
    height: auto;
    display: block;
    transform: rotate(90deg);
    transform-origin: center center;
    opacity: 0;
    transition: opacity 0.1s;
}

.artwork-item.rotate-90 img.loaded {
    opacity: 1;
}

/* Override rotate-90 for sculpture gallery (except The Dance) - must come after general rule */
/* Awakening images are now all upright, same as flame */
#sculptureGallery .artwork-item:not([data-artwork-id="thedance"]).rotate-90 img {
    transform: none !important;
    -webkit-transform: none !important;
    opacity: 1 !important;
    image-orientation: none !important;
}

/* Awakening images: aw.webp and aw3.webp need 90deg rotation to be upright */
/* This must come after the transform: none rules above to override them */
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src="aw.webp"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="/aw.webp"],
#sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="aw.webp"] {
    transform: rotate(90deg) !important;
    -webkit-transform: rotate(90deg) !important;
    transform-origin: center center !important;
    image-orientation: none !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    /* Ensure rotated image fills container width like other sculptures */
    object-fit: contain;
    max-width: 100%;
}

/* Ensure awakening container behaves like other sculptures (flame, warrior) */
/* Container must match width of other sculptures exactly */
#sculptureGallery .artwork-item[data-artwork-id="awakening"] {
    width: 100%;
    overflow: hidden;
    /* Container should maintain normal flow like other sculptures */
    position: relative;
    /* Ensure container doesn't expand beyond grid column width */
    max-width: 100%;
    box-sizing: border-box;
    /* Remove any margins that could affect width */
    margin-left: 0;
    margin-right: 0;
}

/* Rotate aw.webp and aw3.webp in carousel/modal - ensure proper centering */
.artwork-carousel img[src*="aw.webp"],
.artwork-carousel img[src*="aw3.webp"],
.modal-image[src*="aw.webp"],
.modal-image[src*="aw3.webp"],
.shop-image[src*="aw.webp"],
.shop-image[src*="aw3.webp"] {
    transform-origin: center center !important;
    /* Rotation and scale will be applied by JavaScript, but ensure origin is centered */
}

/* CRITICAL: awake-main.webp needs 90deg clockwise rotation in carousel/modal to match gallery view */
/* Allow rotation via inline styles (set by JavaScript) */
.artwork-carousel img[src*="awake-main"],
.modal-image[src*="awake-main"] {
    /* Rotation and scale applied via JavaScript inline styles to match gallery view */
    transform-origin: center center !important;
}

/* Shop view: keep awake-main.webp upright (no rotation in shop view) */
.shop-image[src*="awake-main"] {
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
}

.artwork-item.rotate-90:hover img {
    transform: rotate(90deg) scale(1.02);
}

/* Cardinal Flower - 50% smaller */
.artwork-item[data-artwork-id="cardinalflower"] {
    width: 50%;
    margin: 0 auto;
    height: fit-content;
    min-height: 0;
}

.gallery-grid.view-all .artwork-item[data-artwork-id="cardinalflower"] {
    width: 50%;
    margin: 0 auto;
    grid-column: span 1;
}

/* Align fiddleheadfondness and windhover with parulainapeartree in view-all mode */
/* Positioning is handled by JavaScript via transform */

.artwork-item[data-artwork-id="cardinalflower"] img {
    width: 100%;
    height: auto;
    transform: scale(1);
    transform-origin: center center;
}

.artwork-item[data-artwork-id="cardinalflower"]:hover img {
    transform: scale(1.02);
}

.artwork-item::after {
    content: 'SUSAN DREW SZWED';
    position: absolute;
    top: 60%;
    right: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Ensure watermarks are visible in view-all mode */
.gallery-grid.view-all .artwork-item::after {
    top: 60%;
    right: 8px;
    font-size: 9px;
}

/* Artwork Modal */
.artwork-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 1000;
    overflow-y: auto;
}

.artwork-modal.active {
    display: block;
}

.modal-content {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: fixed;
    top: 16px;
    right: 10px;
    background: none;
    border: none;
    font-size: 38px;
    font-weight: 100;
    color: #000000;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-eye-toggle {
    position: fixed;
    top: 16px;
    left: 10px;
    background: none;
    border: none;
    color: #000000;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.3s;
}

.modal-eye-toggle:hover {
    opacity: 0.7;
}

.modal-eye-toggle .eye-icon {
    width: 24px;
    height: 24px;
    color: #000000;
    transition: opacity 0.3s;
}

.modal-eye-toggle .eye-icon.eye-open {
    display: none;
}

.modal-eye-toggle .eye-icon.eye-closed {
    display: block;
}

.modal-eye-toggle.viewing-details .eye-icon.eye-open {
    display: block;
}

.modal-eye-toggle.viewing-details .eye-icon.eye-closed {
    display: none;
}

/* Subtle view toggle icon */
.view-toggle-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.view-toggle-icon:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-toggle-icon svg {
    color: #000000;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.view-toggle-icon:hover svg {
    opacity: 1;
}

.view-toggle-icon.shop-toggle {
    display: none !important;
}

/* Minimalist View */
.minimalist-view {
    width: 100%;
}

/* Hide grey dots/view toggle buttons in minimalist view */
.minimalist-view .modal-view-toggle,
.minimalist-view .view-mode-btn,
.modal-view-toggle {
    display: none !important;
}

.artwork-carousel {
    width: 100%;
    position: relative;
    touch-action: pan-y pinch-zoom;
    cursor: pointer;
    margin-top: 80px;
    margin-bottom: 24px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    display: block;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    touch-action: none;
    pointer-events: auto;
    position: relative;
    opacity: 0;
    transition: opacity 0.1s;
}

.modal-image.loaded {
    opacity: 1;
}

.modal-image.rotate-90 {
    width: 100%;
    height: auto;
    display: block;
    transform: rotate(90deg);
    transform-origin: center center;
}

.artwork-carousel::after {
    content: 'SUSAN DREW SZWED';
    position: absolute;
    bottom: 24px;
    right: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
    padding: 0;
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    z-index: 10;
    margin-bottom: 20px;
}

.carousel-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #000000;
    cursor: pointer;
    padding: 8px;
}

.carousel-dots {
    display: none;
}

.carousel-dot {
    display: none;
}

/* Shop & Details View */
.shop-view {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    min-height: auto;
    align-items: stretch !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
}

.shop-view.hidden {
    display: none;
}

.shop-view .shop-image-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 80px !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    overflow: visible;
    display: block !important;
    flex-shrink: 0;
    min-height: 0;
    flex-basis: auto !important;
}

.shop-view .shop-image-container::after {
    content: 'SUSAN DREW SZWED';
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Fix watermark position for cardinalflower - ensure it appears at bottom of image, not top */
.shop-view .shop-image-container[style*="height"]::after {
    position: absolute;
    bottom: 12px !important;
    top: auto !important;
}

/* Ensure shop-image-container has proper positioning context */
.shop-image-container {
    position: relative;
}

.shop-image {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    touch-action: none;
    pointer-events: auto;
    cursor: pointer;
    margin: 0;
    padding: 0;
    position: relative;
    opacity: 1;
}

.shop-image.rotate-90 {
    width: 100%;
    height: auto;
    display: block;
    transform: rotate(90deg);
    transform-origin: center center;
}

.shop-content {
    width: 100%;
    margin-top: 0;
    padding: 20px;
    padding-top: 24px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto;
    clear: both;
}

/* Ensure shop-content appears below shop-image-container for all artworks */
.shop-view .shop-content {
    order: 2 !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
    flex-shrink: 0;
    align-self: stretch;
    display: block !important;
    clear: both !important;
}

.shop-view .shop-image-container {
    order: 1;
    flex-shrink: 0;
    align-self: stretch;
}

/* Ensure cardinalflower shop view displays correctly */
.shop-view .shop-image-container img[src*="cardinalflower"] {
    display: block;
    width: 100%;
    height: auto;
}

/* Ensure shop-content appears below image for cardinalflower */
.shop-view:has(img[src*="cardinalflower"]) .shop-content {
    margin-top: 540px !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
}

.purchase-toggle {
    display: none;
    gap: 8px;
    margin-top: 0 !important;
    margin-bottom: 16px;
}

.toggle-btn {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background-color: #e8e8e8;
    border-color: #000000;
}

.artwork-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #000000;
    margin-bottom: 8px;
    text-transform: capitalize;
    text-align: center;
}

.artwork-medium {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: #666666;
    margin-bottom: 8px;
    text-align: center;
}

.artwork-size {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: #666666;
    margin-bottom: 8px;
    text-align: center;
}

.artwork-shipping {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666666;
    margin-bottom: 24px;
}

.pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.current-price {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #000000;
}

.original-price {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #999999;
    text-decoration: line-through;
}

.discount-badge {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #ffffff;
    background-color: #ff0000;
    padding: 4px 8px;
    border-radius: 12px;
}

.add-to-cart-btn {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background-color: #000000;
    border: none;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #333333;
}

/* Hamburger Menu */
.hamburger-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    transition: right 0.3s ease, left 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.hamburger-nav.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.menu-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
}

.home-button {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    text-decoration: none;
    cursor: pointer;
}

.home-button:hover {
    opacity: 0.7;
}

.close-menu {
    background: none;
    border: none;
    font-size: 32px;
    color: #000000;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-list {
    list-style: none;
    padding: 0;
}

.menu-item {
    border-bottom: 1px solid #e0e0e0;
}

.menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #000000;
    text-decoration: none;
    text-transform: uppercase;
}

.menu-link .arrow {
    font-size: 20px;
}

.submenu {
    display: none;
    list-style: none;
    background-color: #f9f9f9;
    padding: 0;
}

.submenu.active {
    display: block;
}

.submenu li {
    border-bottom: 1px solid #e8e8e8;
}

.submenu a {
    display: block;
    padding: 16px 20px 16px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000000;
    text-decoration: none;
    text-transform: capitalize;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.menu-overlay.active {
    display: block;
}

/* Content Pages */
.content-page {
    padding: 20px;
    padding-bottom: 100px;
}

.page-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 24px;
}

.content-section {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #000000;
}

/* About and Process Page Layouts */
.about-container,
.process-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image-wrapper,
.process-image-wrapper {
    width: 100%;
    flex-shrink: 0;
}

.about-image,
.process-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-text-wrapper,
.process-text-wrapper {
    width: 100%;
}

.about-text-content,
.process-text-content {
    width: 100%;
    max-width: 700px;
}

.about-text-content p,
.process-text-content p {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.7;
    color: #000000;
    margin-bottom: 24px;
}

.about-text-content p:last-child,
.process-text-content p:last-child {
    margin-bottom: 0;
}

/* Improve spacing between paragraphs for better readability */
.about-text-content p + p,
.process-text-content p + p {
    margin-top: 0;
}

.about-intro {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.7;
    color: #000000;
}

.about-statement-section,
.process-statement-section {
    max-width: 1200px;
    margin: 0 auto 48px auto;
}

/* Improve artist statement section spacing */
.about-statement-section {
    margin-bottom: 56px;
}

/* Artist Statement - more prominent, matches site header hierarchy (18px) scaled up */
.about-statement-section .section-subtitle,
.process-statement-section .section-subtitle {
    margin-top: 0;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 500;
    text-transform: uppercase;
    color: #000000;
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.section-subtitle:first-child {
    margin-top: 0;
}

/* Artist's Process - smaller subsection to create clear hierarchy */
/* Aligns with site title (18px) but slightly smaller for sub-section */
.process-text-content .section-subtitle {
    font-size: 18px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 12px;
}

.artist-statement {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.8;
    color: #000000;
    margin-bottom: 0;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .about-container,
    .process-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 48px;
    }
    
    .about-image-wrapper,
    .process-image-wrapper {
        width: 45%;
        max-width: 500px;
        flex-shrink: 0;
    }
    
    .about-text-wrapper,
    .process-text-wrapper {
        width: 55%;
        flex: 1;
    }
    
    .about-container.reverse {
        flex-direction: row-reverse;
    }
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000000;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #000000;
    padding: 12px;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    border-radius: 0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background-color: #000000;
    border: none;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #333333;
}

/* Cart Page */
.cart-main {
    padding: 20px;
    padding-bottom: 100px;
}

.cart-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 24px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
}

.cart-item-artist {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666666;
}

.cart-item-medium {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666666;
}

.cart-item-price {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-top: auto;
}

.cart-item-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    cursor: pointer;
    padding: 4px;
}

.order-summary {
    padding: 20px;
    background-color: #f9f9f9;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #000000;
}

.checkout-btn {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background-color: #4CAF50;
    border: none;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #45a049;
}

/* Checkout Page */
.checkout-main {
    padding: 20px;
    padding-bottom: 120px;
}

.checkout-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 24px;
}

.checkout-section {
    margin-bottom: 24px;
}

.checkout-section p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000000;
    margin-bottom: 12px;
}

.login-link {
    color: #000000;
    text-decoration: underline;
}

.login-btn {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000000;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 12px 24px;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.section-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
}

.toggle-section {
    background: none;
    border: none;
    font-size: 20px;
    color: #000000;
    cursor: pointer;
    padding: 0;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.checkout-form .form-group input,
.checkout-form .form-group select {
    width: 100%;
}

.place-order-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background-color: #e0e0e0;
    border: none;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.place-order-btn:hover {
    background-color: #d0d0d0;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .gallery-title {
        font-size: 28px;
    }
    
    .intro-name {
        font-size: 35px;
        font-weight: 500;
        top: 40%;
    }
    
    .enter-site-btn {
        font-size: 18px;
        padding: 12px 28px;
        top: 48%;
        border-radius: 8px;
    }
    
    /* Home page mobile refinements */
    .home-main {
        padding-top: 8px;
        gap: 10px;
        padding-bottom: 20px;
    }
    
    .category-card {
        aspect-ratio: 1;
        max-height: 38vh;
    }
    
    .sculpture-card {
        margin-bottom: 0;
    }
    
    /* Dance sculpture - ensure it fills same width as other sculptures in gallery view */
    #sculptureGallery .artwork-item[data-artwork-id="thedance"].rotate-90 {
        width: 100%;
        overflow: hidden;
        /* Ensure container maintains height to preserve vertical gap */
        min-height: 0;
        display: block;
        position: relative;
        /* Remove any margin that could cause overlap */
        margin-top: 0;
    }
    
    #sculptureGallery .artwork-item[data-artwork-id="thedance"].rotate-90 img {
        width: 100%;
        height: auto;
        transform: rotate(90deg);
        transform-origin: center center;
        /* Scale the image so its rotated width (original height) matches container width */
        /* This ensures the displayed width after rotation equals the container width */
        object-fit: contain;
        display: block;
        /* Ensure image doesn't collapse container and stays within bounds */
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    /* Calculate proper scale for rotated dance sculpture to match other sculptures' width */
    /* When rotated 90deg, the image's natural height becomes its displayed width */
    /* We need to scale it so: naturalHeight * scale = containerWidth */
    /* This is handled by JavaScript, but ensure container allows full width */
    #sculptureGallery .artwork-item[data-artwork-id="thedance"] {
        width: 100%;
        /* Ensure it participates in grid layout and maintains spacing */
        display: block;
        position: relative;
        overflow: hidden;
        /* Remove any margin that could cause overlap */
        margin-top: 0;
    }
    
    /* Hamburger menu full width on mobile - slides from top to bottom */
    .hamburger-nav {
        width: 100%;
        max-width: 100%;
        top: -100%;
        left: 0;
        right: auto;
        height: auto;
        max-height: 100vh;
        transition: top 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .hamburger-nav.active {
        top: 0;
        left: 0;
        right: auto;
    }
    
    /* Reduce left/right padding for view-all painting galleries on mobile */
    .gallery-main:has(#floraGallery.view-all),
    .gallery-main:has(#placeGallery.view-all),
    .gallery-main:has(#dimensionGallery.view-all),
    .gallery-main:has(#allArtworkGallery.view-all) {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Set row-gap to 0 for painting galleries in view-all mode on mobile - JavaScript controls spacing */
    #floraGallery.view-all,
    #placeGallery.view-all,
    #dimensionGallery.view-all {
        row-gap: 0;
        column-gap: 8px;
    }
    
    /* View-all page uses CSS-controlled uniform spacing, not JavaScript */
    #allArtworkGallery.view-all {
        row-gap: 8px !important;
        column-gap: 8px;
    }
    
    /* Ensure no individual item margins on mobile for view-all page */
    #allArtworkGallery.view-all .artwork-item {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Fix image orientation issues on mobile - ensure images display correctly in view-all mode */
    /* Only apply to paintings galleries, NOT sculpture gallery */
    /* Force all paintings gallery images to display in natural orientation without any rotation */
    #floraGallery.view-all .artwork-item img,
    #placeGallery.view-all .artwork-item img,
    #dimensionGallery.view-all .artwork-item img,
    #allArtworkGallery.view-all .artwork-item:not([data-artwork-id="awakening"]) img {
        /* Prevent any transforms from being applied - force natural orientation */
        transform: none !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        -ms-transform: none !important;
        -o-transform: none !important;
        /* Ensure images maintain their aspect ratio and display naturally */
        object-fit: contain;
        width: 100%;
        height: auto;
        display: block;
        /* Reset transform origin */
        transform-origin: initial !important;
    }
    
    /* Ensure awakening sculpture in view-all page gets proper rotation on mobile */
    #allArtworkGallery.view-all .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"] {
        transform: rotate(90deg) !important;
        -webkit-transform: rotate(90deg) !important;
        transform-origin: center center !important;
        image-orientation: none !important;
    }
    
    /* Ensure no rotation classes affect paintings gallery images on mobile */
    #floraGallery.view-all .artwork-item,
    #placeGallery.view-all .artwork-item,
    #dimensionGallery.view-all .artwork-item {
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    /* View-all page: ensure no transforms or positioning that affects spacing */
    #allArtworkGallery.view-all .artwork-item {
        transform: none !important;
        -webkit-transform: none !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
    }
    
    /* Override any rotate-90 classes that might be incorrectly applied on mobile */
    /* This is more specific than the general .artwork-item.rotate-90 rule */
    #floraGallery.view-all .artwork-item.rotate-90,
    #placeGallery.view-all .artwork-item.rotate-90,
    #dimensionGallery.view-all .artwork-item.rotate-90 {
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    #floraGallery.view-all .artwork-item.rotate-90 img,
    #placeGallery.view-all .artwork-item.rotate-90 img,
    #dimensionGallery.view-all .artwork-item.rotate-90 img {
        transform: none !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        -ms-transform: none !important;
        -o-transform: none !important;
        transform-origin: initial !important;
        /* Ensure opacity is visible */
        opacity: 1 !important;
    }
    
    /* Position windhover directly under fiddlehead in view-all mode on mobile */
    /* Override JavaScript positioning to place it right below fiddlehead */
    #floraGallery.view-all .artwork-item[data-artwork-id="windhover"] {
        margin-top: -40px !important; /* Move up two spaces (40px total) */
        /* Ensure it's in the same column as fiddlehead (left column) */
        grid-column: 1;
        /* Use transform to position it directly under fiddlehead if needed */
        transform: translateY(0) !important;
    }
    
    /* Ensure fiddlehead and windhover are in the same column and close together */
    #floraGallery.view-all .artwork-item[data-artwork-id="fiddleheadfondness"] {
        grid-column: 1;
    }
    
    /* Remove extra margin-bottom from Flora & Fauna section since windhover is now positioned closer */
    .category-section:has(#floraGallery.view-all) {
        margin-bottom: 40px !important; /* Back to default spacing */
    }
    
    /* Prevent layout shifts on mobile gallery - ensure first image loads first and maintains position */
    .gallery-grid {
        /* Lock grid structure to prevent reordering */
        grid-auto-flow: row;
    }
    
    .gallery-grid .artwork-item:first-child {
        /* Force first item to stay in first position */
        grid-row-start: 1;
        grid-column-start: 1;
        min-height: 0;
    }
    
    /* Ensure images don't cause layout shifts by maintaining container structure */
    .gallery-grid .artwork-item {
        contain: layout;
        /* Prevent items from moving during load */
        position: relative;
    }
    
    /* Ensure first image is visible immediately */
    .gallery-grid .artwork-item:first-child img {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Sculpture gallery - apply same structure as paintings gallery */
    /* Use gap for spacing, but override individual margin-top rules on mobile */
    #sculptureGallery:not(.view-all) {
        gap: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Ensure first item doesn't overlap header */
    #sculptureGallery:not(.view-all) .artwork-item:first-child {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Apply consistent spacing between all sculpture photos on mobile */
    /* Using the largest distance (480px) uniformly for all photos to ensure equidistant spacing */
    #sculptureGallery:not(.view-all) .artwork-item:not(:first-child) {
        margin-top: 480px !important;
    }
    
    /* Sculpture gallery - fix container overflow and spacing for rotated images on mobile */
    /* CRITICAL: Fix awakening sculpture (first photo) container to prevent overlap and ensure proper width */
    /* Note: margin-top is 0 for first-child (set above), so only set other margins */
    #sculptureGallery .artwork-item[data-artwork-id="awakening"] {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        /* Let container size naturally to fit image - ensures watermark aligns properly */
        height: auto !important;
        display: block !important;
        /* Ensure container aligns with image - no extra space */
        align-self: start !important;
    }
    
    /* Ensure awakening image is properly constrained within container */
    #sculptureGallery .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"] {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        /* Rotated image needs proper scaling - handled by JavaScript, but ensure container constraints */
        max-width: 100% !important;
        position: relative !important;
    }
    
    /* Fix The Dance sculpture container on mobile - ensure full image is visible */
    /* Note: margin-top is controlled by spacing rules above (144px for non-first-child) */
    #sculptureGallery .artwork-item[data-artwork-id="thedance"] {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        margin-top: 520px !important; /* Lower by two spaces (40px more than standard 480px) */
        padding: 0 !important;
        box-sizing: border-box !important;
        display: block !important;
        /* Let container size naturally to fit rotated image */
        height: auto !important;
        /* Ensure container aligns with image - no extra space */
        align-self: start !important;
    }
    
    #sculptureGallery .artwork-item[data-artwork-id="thedance"] img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
        /* Ensure full image is visible when rotated */
        position: relative !important;
    }
    
    /* Ensure all sculpture gallery items have consistent container behavior on mobile */
    /* Rotated images (awakening, thedance) need overflow:visible to prevent cropping */
    /* Note: margin-top is controlled by spacing rules above, so only set other margins */
    #sculptureGallery .artwork-item {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
        align-self: start !important;
    }
    
    /* Non-rotated images can use overflow:hidden for cleaner edges */
    #sculptureGallery .artwork-item:not([data-artwork-id="awakening"]):not([data-artwork-id="thedance"]) {
        overflow: hidden !important;
    }
    
    #sculptureGallery .artwork-item img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* View-all mode: ensure proper spacing and no overlap */
    #sculptureGallery.view-all .artwork-item {
        width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    
    #sculptureGallery.view-all .artwork-item[data-artwork-id="awakening"] {
        width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
        /* Ensure first item aligns with other items */
        grid-column: 1;
        grid-row: 1;
    }
    
    #sculptureGallery.view-all .artwork-item[data-artwork-id="thedance"] {
        width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        margin: 0 !important;
        margin-top: 20px !important; /* Lower by one space (20px) in view-all mode */
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    
    /* Carousel positioning on mobile (applies to all sculptures including awakening and flame) */
    .artwork-carousel {
        position: relative;
        min-height: 0;
    }
    
    /* Ensure images maintain exact position when swiping */
    .artwork-modal.active .artwork-carousel {
        /* Prevent layout shifts when switching between images */
        will-change: contents;
    }
    
    .modal-image.rotate-90 {
        /* Ensure consistent transform origin for rotated images (The Dance, aw.webp, aw3.webp) */
        transform-origin: center center !important;
    }
    
    /* Ensure aw.webp in gallery is full width on mobile */
    #sculptureGallery:not(.view-all) .artwork-item[data-artwork-id="awakening"] img[src*="aw.webp"] {
        width: 100% !important;
        height: auto !important;
        display: block;
        object-fit: contain;
        max-width: 100%;
    }
    
    #sculptureGallery:not(.view-all) .artwork-item[data-artwork-id="awakening"] {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    /* Ensure awakening image maintains consistent size when toggling back from view-all */
    #sculptureGallery:not(.view-all) .artwork-item[data-artwork-id="awakening"] img[src*="awake-main"] {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Typography adjustments for about and process pages on mobile */
    .about-text-content p,
    .process-text-content p,
    .about-intro {
        font-size: 20px;
        line-height: 1.75;
    }
    
    .artist-statement {
        font-size: 18px;
        line-height: 1.8;
    }
    
    .about-statement-section {
        margin-bottom: 40px;
    }
}

