/* Mobile-First Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --bg-dark: #000000;
    --bg-container: transparent;
    --text-light: #FBEED3;
    --text-mono: 'Geist Mono', 'Courier New', monospace;
    --btn-default: #f5f5dc;
    --btn-default-text: #333333;
    --btn-active: #4a90e2;
    --btn-active-text: #e8e8d0;
    --btn-disabled: #2a2a2a;
    --btn-disabled-text: #666666;
    --border-red: #ff4444;
    --logo-orange: #ff6b35;
}

/* Base Styles */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--text-mono);
    background-color: var(--bg-dark);
    background-image: url('assets/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-light);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    padding: 0.5rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); /* Safe area for notched devices */
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: hidden;
    position: fixed;
    width: 100%;
}

.container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    gap: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header & Logo */
.header {
    width: 100%;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.15rem;
    flex-shrink: 0;
}

.logo {
    max-width: 90px;
    height: auto;
    object-fit: contain;
}

/* Title */
.title {
    font-size: 1.5rem;
    font-weight: normal;
    text-align: center;
    width: 100%;
    color: var(--text-light);
    margin: 0;
    padding: 0 0.5rem;
    flex-shrink: 0;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;   
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.carousel-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: block;
}

.carousel-track {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    position: relative;
}

.carousel-slide {
    width: 20%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    /* align-items: center; */
    justify-content: center;
}

.pump-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    display: block;
}


/* Description Text */
.description {
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
    color: var(--text-light);
    width: 100%;
    margin: 0;
    padding: 0 0.5rem;
    font-weight: 400;
    flex-shrink: 0;
    overflow: visible;
    display: block;
}

/* Mobile specific - 852px height constraint */
@media (max-height: 852px) {
    body {
        max-height: 100vh;
        max-height: 100dvh;
        padding: 0.3rem;
        padding-bottom: max(0.3rem, env(safe-area-inset-bottom));
        height: 100vh;
        height: 100dvh;
    }
    
    .container {
        max-height: 100vh;
        max-height: 100dvh;
        gap: 0.2rem;
        padding: 0.5rem 0.5rem calc(4.5rem + env(safe-area-inset-bottom)) 0.5rem;
        height: 100vh;
        height: 100dvh;
        justify-content: space-between;
    }
    
    .header {
        margin-bottom: 0;
        flex: 0 0 auto;
    }
    
    .logo {
        max-width: 85px;
    }
    
    .title {
        font-size: 0.75rem;
        padding: 0 0.4rem;
        margin-bottom: 0;
        flex: 0 0 auto;
        line-height: 1;
    }
    
    .image-container {
        max-height: none;
        padding: 0;
        flex: 1 1 auto;
        width: 100%;
    }
    
    .carousel-wrapper {
        height: 100%;
        width: 100%;
    }
    
    .pump-image {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .description {
        font-size: 0.65rem;
        line-height: 1.2;
        padding: 0 0.4rem;
        margin: 0;
        max-height: none;
        overflow: visible;
        flex: 0 0 auto;
    }
    
    .view-btn {
        padding: 0.5rem 0.25rem;
        font-size: 0.6rem;
    }
    
    .button-grid {
        height: auto;
        min-height: 80px;
        flex: 0 0 auto;
    }
    
    .ar-container {
        max-height: none;
        padding: 0;
        flex: 1 1 auto;
    }
}

/* Mobile responsive - small screens */
@media (max-width: 480px) {
    .container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        padding: 0.25rem 0.4rem calc(1rem + env(safe-area-inset-bottom)) 0.4rem;
    }
    
    .logo {
        max-width: 80px;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .image-container {
        max-height: 350px;
        margin-top: 40px;
    }
    
    .pump-image {
        max-width: 329px;
        max-height: 329px;
    }
    
    .ar-container {
        max-height: 350px;
        flex: 0 0 auto;
    }
    
    .description {
        margin-top: 0;
        font-size: 0.75rem;
        line-height: 1.3;
        padding: 0 0.3rem;
        flex: 0 0 auto;
    }
    
    .view-btn {
        padding: 0.6rem 0.25rem;
        font-size: 0.6rem;
    }
}

/* AR Container */
.ar-container {
    display: none;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    padding: 0.25rem;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 280px;
    align-items: center;
    justify-content: center;
}

.ar-container.active {
    display: flex;
}

.ar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    background-color: transparent;
}

/* Button Grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    width: 100%;
    flex-shrink: 0;
    border: 2px solid var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-dark);
    margin-bottom: env(safe-area-inset-bottom, 0px);
}

.view-btn {
    padding: 0.7rem 0.3rem;
    font-family: var(--text-mono);
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    background-color: var(--btn-default);
    color: var(--btn-default-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-right: 2px solid var(--bg-dark);
    border-bottom: 2px solid var(--bg-dark);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
    line-height: 1.2;
    opacity: 0.25;
}

.view-btn:last-child {
    border-right: none;
}

.view-btn:nth-child(3),
.view-btn:nth-child(6) {
    border-right: none;
}

.view-btn:nth-child(4),
.view-btn:nth-child(5),
.view-btn:nth-child(6) {
    border-bottom: none;
}

.view-btn:not(:disabled):hover {
    background-color: #e8e8d0;
    transform: scale(1.02);
    opacity: 1;
}

.view-btn:disabled,
.view-btn[disabled] {
    background-color: var(--btn-disabled);
    color: var(--btn-disabled-text);
    cursor: not-allowed;
    opacity: 0.25;
    pointer-events: none;
}

.view-btn.active {
    background-color: var(--btn-active-text);
    color: var(--btn-default-text);
    opacity: 1;
}

.view-btn.clicked {
    background-color: var(--btn-default);
    color: var(--btn-default-text);
    opacity: 1;
}

.ar-btn.active {
    background-color: var(--btn-active);
    color: var(--btn-active-text);
    opacity: 1;
}

.ar-btn.active:hover {
    background-color: var(--btn-active);
    color: var(--btn-active-text);
}
    

/* Tablet Styles */
@media (min-width: 768px) {
    body {
        padding: 2rem;
    }

    .container {
        max-width: 800px;
        gap: 1rem;
    }

    .logo {
        max-width: 150px;
    }

    .title {
        font-size: 1.2rem;
        padding: 0 2rem;
        text-align: center;
    }

    .description {
        font-size: 1rem;
        padding: 0 2rem;
        text-align: left;
    }

    .image-container,
    .ar-container {
        padding: 1rem;
    }

    .view-btn {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
        gap: 2.5rem;
    }

    .logo {
        max-width: 180px;
    }

    .title {
        font-size: 1.4rem;
        text-align: center;
    }

    .description {
        font-size: 1.1rem;
    }

    .view-btn {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1200px;
    }

    .title {
        font-size: 1.6rem;
        text-align: center;
    }

    .description {
        font-size: 1.2rem;
    }
}

