/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Utopia Mode Colors */
    --utopia-bg: #D4C5B9;
    --utopia-accent: #00BCD4;
    --utopia-text: #1a1a1a;
    
    /* Reality Mode Colors */
    --reality-bg: #0a0a0a;
    --reality-accent: #ffffff;
    --reality-text: #ffffff;
    
    /* Fonts */
    --font-primary: 'Space Mono', monospace;
    --font-secondary: 'Roboto Mono', monospace;
}

body {
    font-family: var(--font-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== UTOPIA MODE ===== */
body.utopia-mode {
    background-color: var(--utopia-bg);
    color: var(--utopia-text);
}

body.utopia-mode .mode-btn {
    background-color: var(--utopia-accent);
    color: #ffffff;
}

body.utopia-mode .grid-btn {
    background-color: var(--utopia-text);
    color: #ffffff;
}

body.utopia-mode .building-info {
    background: rgba(212, 197, 185, 0.95);
    color: var(--utopia-text);
}

body.utopia-mode .nav-arrow {
    background: transparent;
    color: #ffffff;
}

/* ===== REALITY MODE ===== */
body.reality-mode {
    background-color: var(--reality-bg);
    color: var(--reality-text);
}

body.reality-mode .mode-btn {
    background-color: var(--reality-accent);
    color: #000000;
}

body.reality-mode .grid-btn {
    background-color: var(--reality-accent);
    color: #000000;
}

body.reality-mode .building-info {
    background: rgba(10, 10, 10, 0.95);
    color: var(--reality-text);
}

body.reality-mode .nav-arrow {
    background: transparent;
    color: #ffffff;
}

/* ===== HEADER ===== */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
}

.header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.site-title {
    position: fixed;
    bottom: 40px;
    right: 40px;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: var(--font-primary);
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 100;
}

.header-controls {
    display: flex;
    gap: 20px;
}

.mode-btn,
.grid-btn {
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    opacity: 0.5;
}

.mode-btn:hover,
.grid-btn:hover {
    transform: scale(1.05);
    letter-spacing: 3px;
    opacity: 0.7;
}

/* ===== SLIDESHOW ===== */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.slideshow-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* ===== BUILDING INFO OVERLAY ===== */
.building-info {
    position: fixed;
    bottom: 40px;
    left: 40px;
    padding: 20px 30px;
    z-index: 100;
    font-family: var(--font-secondary);
    opacity: 0.8;
}

.building-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.building-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.photo-name {
    font-size: 12px;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ===== NAVIGATION ARROWS ===== */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 48px;
    font-size: 48px;
    border: none;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    opacity: 1;
    line-height: 0;
    padding: 0;
}

.nav-arrow-left {
    left: 40px;
}

.nav-arrow-right {
    right: 40px;
}

.nav-arrow:hover {
    transform: translateY(-50%) scale(1.2);
}

/* ===== GRID VIEW ===== */
.grid-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 2000;
    overflow-y: auto;
    padding: 0;
    transition: opacity 0.3s ease;
}

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

.grid-close-btn-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2001;
}

.close-grid-btn {
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid #ffffff;
    opacity: 0.5;
}

.close-grid-btn:hover {
    opacity: 0.9;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: 100%;
    min-height: 100vh;
}

.grid-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.grid-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

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

.grid-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.grid-item-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.grid-item-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.grid-item-photo-name {
    font-size: 12px;
    font-family: var(--font-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    margin-top: 2px;
}

/* ===== BUILDING INFO HEADER ===== */
.building-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* ===== INFO BUTTON ===== */
.info-btn {
    padding: 5px 12px;
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid #ffffff;
    cursor: pointer;
    background-color: #ffffff;
    color: #000000;
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.info-btn:hover {
    background-color: transparent;
    color: #ffffff;
    opacity: 1;
}

body.utopia-mode .info-btn {
    border-color: #1a1a1a;
    background-color: #1a1a1a;
    color: #ffffff;
}

body.utopia-mode .info-btn:hover {
    background-color: transparent;
    color: #1a1a1a;
}

/* ===== DESCRIPTION PANEL ===== */
.description-panel {
    position: fixed;
    left: 40px;
    bottom: 220px;
    width: min(60vw, 850px);
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 20px 28px;
    z-index: 200;
    font-family: var(--font-secondary);
    animation: panelSlideUp 0.4s ease-out;
    opacity: 0.8;
}

.description-panel.hidden {
    display: none;
}

body.utopia-mode .description-panel {
    background: rgba(212, 197, 185, 0.97);
    color: var(--utopia-text);
}

body.reality-mode .description-panel {
    background: rgba(10, 10, 10, 0.97);
    color: var(--reality-text);
}


.desc-text {
    font-size: 10px;
    line-height: 1.65;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.desc-close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    padding: 4px 8px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: transparent;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

body.utopia-mode .desc-close-btn {
    color: var(--utopia-text);
}

body.reality-mode .desc-close-btn {
    color: #ffffff;
}

.desc-close-btn:hover {
    opacity: 1;
}

@keyframes panelSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .fixed-header {
        padding: 15px 20px;
    }
    
    .site-title {
        font-size: 24px;
        letter-spacing: 2px;
        bottom: 20px;
        right: 20px;
    }
    
    .mode-btn,
    .grid-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .building-info {
        bottom: 20px;
        left: 20px;
        padding: 15px 20px;
    }
    
    .building-number {
        font-size: 32px;
    }
    
    .building-name {
        font-size: 14px;
    }
    
    .nav-arrow {
        width: 50px;
        height: 40px;
        font-size: 36px;
    }
    
    .nav-arrow-left {
        left: 20px;
    }
    
    .nav-arrow-right {
        right: 20px;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .grid-item-number {
        font-size: 24px;
    }
    
    .grid-item-name {
        font-size: 12px;
    }

    .description-panel {
        left: 20px;
        right: 20px;
        width: auto;
        bottom: 180px;
        max-height: calc(100vh - 220px);
        padding: 20px;
    }
}

/* ============================================================
   BUY BUTTON (main slideshow header)
   ============================================================ */

.buy-btn {
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    background-color: #00BCD4;
    color: #ffffff;
    opacity: 1;
}

.buy-btn:hover {
    transform: scale(1.05);
    letter-spacing: 3px;
    opacity: 0.85;
}

/* ============================================================
   BUY PAGE — LAYOUT
   ============================================================ */

/* Override fixed bottom-right positioning of .site-title */
.buy-site-title {
    position: static;
    bottom: auto;
    right: auto;
    font-size: 18px;
    letter-spacing: 4px;
    text-shadow: none;
    z-index: auto;
    color: inherit;
}

body.reality-mode .buy-site-title { color: rgba(255,255,255,0.7); }
body.utopia-mode  .buy-site-title { color: var(--utopia-text); opacity: 0.7; }

.buy-header .header-content {
    justify-content: space-between;
    width: 100%;
}

.back-link {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

body.reality-mode .back-link { color: #ffffff; }
body.utopia-mode  .back-link { color: var(--utopia-text); }
.back-link:hover { opacity: 1; }

/* Two-column grid */
.buy-layout {
    display: grid;
    grid-template-columns: 55fr 45fr;
    min-height: 100vh;
    padding-top: 80px;
}

/* Left: sticky photo */
.buy-photo-panel {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.reality-mode .buy-photo-panel { background: #000000; }
body.utopia-mode  .buy-photo-panel { background: #1a1a1a; }

.buy-photo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Right: scrollable info panel */
.buy-info-panel {
    padding: 60px 52px 100px 52px;
    font-family: var(--font-secondary);
}

body.reality-mode .buy-info-panel {
    background: var(--reality-bg);
    color: var(--reality-text);
}

body.utopia-mode .buy-info-panel {
    background: var(--utopia-bg);
    color: var(--utopia-text);
}

/* ============================================================
   BUY PAGE — IDENTITY SECTION
   ============================================================ */

.buy-building-number {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 14px;
    font-family: var(--font-primary);
}

.buy-building-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-family: var(--font-primary);
}

.buy-photo-name {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.55;
    margin-bottom: 32px;
    text-transform: uppercase;
}

/* ============================================================
   BUY PAGE — PRINTS REMAINING
   ============================================================ */

.buy-remaining-row {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.buy-remaining-label { opacity: 0.55; }

.buy-progress-track {
    height: 2px;
    width: 100%;
    margin-bottom: 36px;
}

body.reality-mode .buy-progress-track { background: rgba(255,255,255,0.12); }
body.utopia-mode  .buy-progress-track { background: rgba(0,0,0,0.12); }

.buy-progress-fill {
    height: 100%;
    background: #00BCD4;
    transition: width 0.5s ease;
    width: 0%;
}

.buy-divider {
    border: none;
    margin-bottom: 36px;
}

body.reality-mode .buy-divider { border-top: 1px solid rgba(255,255,255,0.1); }
body.utopia-mode  .buy-divider { border-top: 1px solid rgba(0,0,0,0.12); }

/* ============================================================
   BUY PAGE — PRODUCT INFO
   ============================================================ */

.buy-medium-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 10px;
    font-family: var(--font-primary);
}

.buy-edition {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: var(--font-primary);
    margin-bottom: 30px;
}

.buy-description {
    font-size: 11px;
    line-height: 1.75;
    letter-spacing: 0.2px;
    opacity: 0.65;
    margin-bottom: 40px;
}

.buy-description p { margin-bottom: 14px; }
.buy-description p:last-child { margin-bottom: 0; }

/* ============================================================
   BUY PAGE — SIZE SELECTOR
   ============================================================ */

.buy-size-heading {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 4px;
    font-family: var(--font-primary);
}

.buy-size-options { margin-bottom: 14px; }

.buy-size-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 15px 10px;
    cursor: pointer;
    transition: padding-left 0.15s ease, color 0.15s ease;
    font-size: 13px;
    letter-spacing: 1px;
}

body.reality-mode .buy-size-row { border-bottom: 1px solid rgba(255,255,255,0.08); }
body.utopia-mode  .buy-size-row { border-bottom: 1px solid rgba(0,0,0,0.08); }

body.reality-mode .buy-size-row:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
body.utopia-mode  .buy-size-row:first-child { border-top: 1px solid rgba(0,0,0,0.08); }

.buy-size-row:hover,
.buy-size-row.selected {
    color: #00BCD4;
    padding-left: 18px;
}

.buy-size-row-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.buy-size-row-label {
    font-weight: 700;
    font-family: var(--font-primary);
}

.buy-size-row-dims {
    font-size: 10px;
    opacity: 0.5;
    letter-spacing: 1px;
}

.buy-size-row-price {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-primary);
    letter-spacing: 1px;
    flex-shrink: 0;
    margin-left: 16px;
}

.buy-size-row.selected .buy-size-row-price { color: #00BCD4; }

.buy-price-note {
    font-size: 10px;
    letter-spacing: 1px;
    opacity: 0.4;
    margin-bottom: 32px;
    text-transform: uppercase;
}

/* ============================================================
   BUY PAGE — BUY NOW BUTTON
   ============================================================ */

.buy-now-btn {
    display: block;
    width: 100%;
    padding: 18px 24px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, letter-spacing 0.2s ease;
    background-color: #00BCD4;
    color: #ffffff;
    margin-bottom: 40px;
}

.buy-now-btn:not(:disabled):hover {
    opacity: 0.85;
    letter-spacing: 3px;
}

.buy-now-btn:disabled {
    cursor: not-allowed;
}

body.reality-mode .buy-now-btn:disabled {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.25);
}

body.utopia-mode .buy-now-btn:disabled {
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,0.25);
}

/* ============================================================
   BUY PAGE — SUCCESS MESSAGE
   ============================================================ */

.buy-success {
    padding: 28px 32px;
    border: 1px solid #00BCD4;
}

.buy-success.hidden { display: none; }

.buy-success-heading {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #00BCD4;
    margin-bottom: 14px;
}

.buy-success-body {
    font-size: 12px;
    line-height: 1.7;
    opacity: 0.7;
    margin-bottom: 20px;
}

.buy-success-link {
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    color: #00BCD4;
    text-transform: uppercase;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.buy-success-link:hover { opacity: 1; }

/* ============================================================
   BUY PAGE — STRIPE SETUP MODAL
   ============================================================ */

.buy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.buy-modal-overlay.hidden { display: none; }

.buy-modal {
    background: #111111;
    color: #ffffff;
    padding: 48px;
    max-width: 520px;
    width: 100%;
    position: relative;
    font-family: var(--font-secondary);
    max-height: 90vh;
    overflow-y: auto;
}

.buy-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.buy-modal-close:hover { opacity: 1; }

.buy-modal-heading {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 24px;
    padding-right: 24px;
}

.buy-modal-body {
    font-size: 11px;
    line-height: 1.7;
    opacity: 0.75;
    margin-bottom: 28px;
}

.buy-modal-body p { margin-bottom: 16px; }

.buy-modal-body code {
    font-family: var(--font-secondary);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    font-size: 10px;
}

.buy-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.buy-modal-step {
    display: flex;
    gap: 14px;
    font-size: 11px;
    line-height: 1.6;
}

.step-num {
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 700;
    color: #00BCD4;
    flex-shrink: 0;
    padding-top: 2px;
}

.buy-modal-demo-note {
    margin-top: 20px;
    opacity: 0.5;
    font-style: italic;
}

.buy-modal-order {
    border: 1px solid rgba(255,255,255,0.12);
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 11px;
    letter-spacing: 1px;
}

.modal-order-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    opacity: 0.8;
}

.modal-order-line span:first-child {
    opacity: 0.5;
    font-family: var(--font-primary);
    font-size: 10px;
    letter-spacing: 2px;
}

.buy-modal-confirm {
    display: block;
    width: 100%;
    padding: 15px 24px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    background: #00BCD4;
    color: #ffffff;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
}

.buy-modal-confirm:hover { opacity: 0.85; }

/* ============================================================
   BUY PAGE — RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .buy-layout {
        grid-template-columns: 1fr;
        padding-top: 70px;
    }

    .buy-photo-panel {
        position: relative;
        top: auto;
        height: 55vw;
        min-height: 260px;
    }

    .buy-info-panel {
        padding: 36px 24px 70px 24px;
    }

    .buy-building-number { font-size: 52px; }
    .buy-building-name   { font-size: 16px; }
    .buy-edition         { font-size: 26px; }

    .buy-site-title { display: none; }

    .buy-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}