/* Mosaic Styles */
.gallery-section {
    --home-header-clearance: calc(var(--shell-header-height, 68px) + var(--shell-frame-offset, 12px) + 8px);
    --home-footer-clearance: calc(var(--home-footer-offset, var(--shell-footer-height, 56px)) + var(--shell-frame-offset, 12px) + 8px);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding-top: var(--home-header-clearance);
    padding-bottom: var(--home-footer-clearance);
}

.selection-countdown {
    --countdown-fade-ms: 420ms;
    position: fixed;
    top: auto;
    bottom: calc(var(--home-footer-offset, 0px) + var(--shell-frame-offset, 12px));
    left: 0;
    right: 0;
    z-index: 1120;
    width: 100%;
    padding: 20px 20px 26px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(17, 17, 17, 0.78);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
    pointer-events: none;
    transform: scale(1);
    transform-origin: bottom right;
    opacity: 1;
    transition: opacity var(--countdown-fade-ms) ease;
}

.selection-countdown.is-block-fade {
    opacity: 0;
}

.selection-countdown.is-footer-timer {
    position: fixed;
    left: auto;
    right: 18px;
    bottom: calc(var(--home-footer-offset, 0px) + var(--shell-frame-offset, 12px) + 6px);
    width: auto;
    max-width: min(520px, calc(100vw - 36px));
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    z-index: 1220;
}

.selection-countdown.is-footer-timer .selection-countdown-title {
    font-size: clamp(0.98rem, 1.9vw, 1.32rem);
    letter-spacing: 0.06em;
    text-align: left;
    color: #f0f0f0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.selection-countdown.is-footer-timer .selection-countdown-value {
    font-size: clamp(1.16rem, 2.6vw, 1.68rem);
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    text-align: left;
    color: #ffdd6b;
    text-shadow: 0 0 10px rgba(255, 221, 107, 0.28);
}

.selection-countdown-title,
.selection-countdown-value {
    opacity: 1;
    transition: opacity var(--countdown-fade-ms) ease;
}

.selection-countdown.is-text-fade .selection-countdown-title,
.selection-countdown.is-text-fade .selection-countdown-value {
    opacity: 0;
}

.selection-countdown-title {
    font-size: clamp(2rem, 6.8vw, 5rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    color: #ffdd6b;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 221, 107, 0.2);
}

.selection-countdown-value {
    font-size: clamp(1.2rem, 4.8vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.05;
    color: #f0f0f0;
    text-align: center;
    font-variant-numeric: tabular-nums;
    border: 1px solid rgba(255, 221, 107, 0.5);
    border-radius: 10px;
    background: rgba(255, 221, 107, 0.08);
    padding: 10px 18px;
}

.selection-countdown.is-first-sale-closed .selection-countdown-title {
    display: none;
}

.selection-countdown.is-first-sale-closed .selection-countdown-value {
    font-size: clamp(2rem, 7.2vw, 4.8rem);
    letter-spacing: 0.08em;
    padding: 16px 26px;
    border-width: 2px;
}

.selection-debug-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
    background: rgba(255, 221, 107, 0.92);
    border-radius: 999px;
    padding: 4px 10px;
}

.selection-countdown.is-footer-timer .selection-debug-badge {
    font-size: 0.64rem;
    padding: 3px 8px;
}

.drop-animation-test-button {
    margin-top: 8px;
    border: 1px solid rgba(255, 221, 107, 0.8);
    background: rgba(255, 221, 107, 0.14);
    color: #ffdd6b;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    pointer-events: auto;
}

.drop-animation-footer-test {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.drop-animation-test-button--footer {
    margin-top: 0;
}

.drop-garage-door {
    position: absolute;
    inset: 0;
    z-index: 130;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.96) 0%, rgba(10, 10, 10, 0.98) 100%);
    transform: translateY(-100%);
    transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.drop-garage-door.is-opening {
    transition-duration: 2.2s;
    transition-timing-function: cubic-bezier(0.42, 0.08, 0.68, 0.22);
}

.drop-garage-door.is-closing {
    transition-duration: 1.5s;
}

.drop-garage-door.is-animating {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.drop-garage-door.is-closed {
    transform: translateY(0);
    pointer-events: auto;
}

.drop-garage-door-label {
    color: #ffdd6b;
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 221, 107, 0.2);
    margin-top: clamp(90px, 18vh, 220px);
}

.drop-garage-door.has-prelaunch-panel {
    align-items: center;
    padding: 32px 20px;
}

.prelaunch-interest-panel {
    width: min(640px, 100%);
    padding: 28px 24px;
    border: 1px solid rgba(255, 221, 107, 0.28);
    border-radius: 18px;
    background: rgba(12, 12, 12, 0.84);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
    text-align: center;
}

.prelaunch-interest-eyebrow {
    margin: 0 0 8px;
    color: rgba(255, 221, 107, 0.86);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.prelaunch-interest-title {
    margin: 0 0 10px;
    color: #ffdd6b;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.prelaunch-interest-copy,
.prelaunch-interest-note {
    color: #f0f0f0;
    margin: 0;
}

.prelaunch-interest-copy {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 18px;
}

.prelaunch-interest-note {
    margin-top: 12px;
    font-size: 0.88rem;
    color: rgba(240, 240, 240, 0.78);
}

.prelaunch-interest-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.prelaunch-interest-fields {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr;
    gap: 12px;
}

.prelaunch-interest-field {
    text-align: left;
}

.prelaunch-interest-field label {
    display: block;
    margin-bottom: 6px;
    color: #ffdd6b;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prelaunch-interest-input,
.prelaunch-interest-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 221, 107, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.prelaunch-interest-select option {
    color: #111;
}

.prelaunch-interest-submit {
    align-self: center;
    min-width: 180px;
    border: 1px solid rgba(255, 221, 107, 0.85);
    border-radius: 999px;
    background: rgba(255, 221, 107, 0.14);
    color: #ffdd6b;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 11px 18px;
    cursor: pointer;
}

.prelaunch-interest-message {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.prelaunch-interest-message.is-success {
    background: rgba(79, 176, 108, 0.18);
    border: 1px solid rgba(79, 176, 108, 0.4);
    color: #dff7e5;
}

.prelaunch-interest-message.is-error,
.prelaunch-interest-error {
    color: #ffd5d5;
}

.prelaunch-interest-error {
    margin-top: 6px;
    font-size: 0.82rem;
}

@media (max-width: 720px) {
    .prelaunch-interest-panel {
        padding: 22px 18px;
    }

    .prelaunch-interest-fields {
        grid-template-columns: 1fr;
    }

    .prelaunch-interest-submit {
        width: 100%;
    }
}

.mosaic-grid {
    display: flex;
    flex-direction: column;
    --items-count: 1;
    gap: 0;
    height: 100%;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 18px;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    flex: 0 0 calc(100% / var(--items-count));
    opacity: 1;
    transition: flex-basis 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.14s linear;
    will-change: flex-basis, opacity;
    backface-visibility: hidden;
    z-index: 1;
    min-height: 0;
}

.mosaic-grid.freeze-motion .mosaic-item {
    transition: none;
}

.mosaic-grid.has-active .mosaic-item {
    flex: 0 0 68px;
    opacity: 0.5;
}

.mosaic-grid.has-active .mosaic-item.active {
    flex: 0 0 calc(100% - ((var(--items-count) - 1) * 68px));
    z-index: 100;
    opacity: 1;
}

.mosaic-grid.has-active .mosaic-item:not(.active) {
    overflow: hidden;
}

.mosaic-grid.has-active .mosaic-item:not(.active) .cart-overlay,
.mosaic-grid.has-active .mosaic-item:not(.active) .limit-overlay {
    left: auto;
    right: 2px;
    max-width: calc(100% - 4px);
    padding: 4px 6px;
    font-size: 10px;
    transform: translateY(-50%) scale(0.65);
    transform-origin: right center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosaic-item.is-in-cart img {
    filter: grayscale(100%);
    opacity: 0.45;
}

.mosaic-item.is-in-cart {
    overflow: visible;
}

.cart-overlay {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%) scale(0.9);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.mosaic-item.is-in-cart .cart-overlay {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.mosaic-item.is-limit-reached img {
    filter: grayscale(100%);
    opacity: 0.45;
}

.mosaic-item.is-sale-closed img {
    filter: grayscale(100%);
    opacity: 0.45;
}

.mosaic-item.is-limit-reached {
    overflow: visible;
}

.mosaic-item.is-sale-closed {
    overflow: visible;
}

.limit-overlay {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%) scale(0.9);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.mosaic-item.is-limit-reached .limit-overlay {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.mosaic-item.is-sale-closed .limit-overlay {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.drop-garage-door.is-closed ~ .container .mosaic-item.is-sale-closed .limit-overlay {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
}

.gallery-section.is-withdrawing-overlays .container .mosaic-item .limit-overlay {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
}

main > .container-fluid {
    padding: 0;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-section > .container {
    padding: 0;
    max-width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    padding: 0;
}

.image-modal.is-open {
    display: flex;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
    color: #f0f0f0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.image-modal-stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
}

.image-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 14px 0;
    min-height: 48px;
}

.image-modal-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 24px 0;
}

.image-modal-close {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.image-modal-body {
    display: grid;
    grid-template-columns: 72px 1fr 72px;
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    padding: 6px 0;
}

.image-modal-side {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.image-modal-nav {
    width: 48px;
    height: 80%;
    border: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.image-modal-nav.is-hidden {
    display: none;
}

.image-modal-media {
    width: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    min-height: 0;
    position: relative;
}

.image-modal-media img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
}

.image-modal-media.is-in-cart img {
    filter: grayscale(100%);
}

.image-modal-media.is-sold-out img {
    filter: grayscale(100%);
}

.image-modal-media.is-sale-closed img {
    filter: grayscale(100%);
}

.image-modal-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #f0f0f0;
    font-size: 1.45rem;
    letter-spacing: 0.03em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.image-modal-overlay.is-visible {
    opacity: 1;
}

.image-modal-overlay.is-sale-closed {
    color: #ffdd6b;
    text-shadow: 0 0 10px rgba(255, 221, 107, 0.25);
}


.image-modal-meta {
    padding: 12px 24px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #111;
}

.image-modal-meta-main {
    display: grid;
    gap: 6px;
}

.image-modal-cart {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.image-modal-cart.is-disabled,
.image-modal-cart:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.image-modal-price {
    font-size: 1.1rem;
    color: #c0c0c0;
    line-height: 1.2;
}

.image-modal-text {
    font-size: 0.95rem;
    color: #a0a0a0;
    line-height: 1.3;
}

.image-modal-dots {
    display: flex;
    gap: 8px;
    padding: 8px 24px 12px;
    justify-content: center;
}

.image-modal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.image-modal-dot.active {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}
