/* === 1. Resets and Basic Layout === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #081627;
}

body { 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Rich Cyanotype Blueprint Background and Grid Pattern */
    background-color: #0b1e36;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: 'Fira Code', 'SF Mono', Consolas, Monaco, monospace, system-ui; 
    color: #e0f2fe; /* Light ice blue text */
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar for a premium technical look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #061324;
}
::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

div[data-module="product_card.bui"] {
    display: contents !important;
}

/* === 2. Slider / Banner Styles === */
[data-module="slider.bui"] {
    position: relative;
    margin: 0 auto 30px;
    max-width: 100%;
    width: 100%;
    min-height: 400px;
    background-color: rgba(6, 19, 36, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

#bui_3195388780800377648 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#bui_3195388780800377648::-webkit-scrollbar { 
    display: none; 
}

#bui_3195388780800377648 > div {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

#bui_3195388780800377648 img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.85) contrast(1.1) hue-rotate(190deg); /* Give images a subtle schematic tint */
}

/* Arrow controls */
.banner-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(13, 38, 77, 0.8);
    border: 1px solid #38bdf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s;
}
.banner-arrows:hover { 
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.banner-arrows:hover .icon::before {
    border-color: #0b1e36;
}
.banner-left { left: 15px; }
.banner-right { right: 15px; }

.banner-arrows .icon::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 2px solid #38bdf8;
    border-right: 2px solid #38bdf8;
}
.banner-left .icon::before { transform: rotate(-135deg); margin-left: 4px; }
.banner-right .icon::before { transform: rotate(45deg); margin-right: 4px; }

/* Slide indicators */
#radio-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}
#radio-box > div {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.5);
    transition: all 0.3s;
}
#radio-box div.active-slide {
    background: #38bdf8;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

/* === 3. Product Grid & Card (Blueprint Theme) === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    padding: 20px;
    background: transparent;
    min-height: 800px;
}

.product {
    background: rgba(13, 38, 77, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 4px;
    padding: 18px;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Technical schematic border effect */
.product::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 6px; height: 6px;
    border-top: 2px solid #38bdf8;
    border-left: 2px solid #38bdf8;
}
.product::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 6px; height: 6px;
    border-bottom: 2px solid #38bdf8;
    border-right: 2px solid #38bdf8;
}

.product:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
    background: rgba(13, 38, 77, 0.9);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.grid__img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #061324;
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.grid__img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: normal;
    transition: transform 0.3s;
}

.product:hover .grid__img img {
    transform: scale(1.04);
}

.grid__text {
    font-size: 13px;
    color: #ffffff;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 38px;
    font-weight: 500;
}

.grid__price {
    font-size: 16px;
    font-weight: bold;
    color: #facc15; /* Golden Yellow for high visibility drafting */
    margin-top: auto;
    font-family: monospace;
}

/* === 4. Viewport and Global Layout Elements === */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#bui_1000 { 
    flex: 1 0 auto;
    display: block; 
}

[data-module="footer.bui"] {
    flex-shrink: 0;
    margin-top: auto;
}

/* === 5. Footer styling === */
footer[role="contentinfo"] {
    background-color: rgba(6, 19, 36, 0.7);
    backdrop-filter: blur(4px);
    border-top: 1px solid #1e3a8a;
    color: #93c5fd;
    padding: 40px 20px;
}

footer[role="contentinfo"] > div {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

footer[role="contentinfo"] > div > div:first-child {
    flex: 1;
    min-width: 280px;
}

footer[role="contentinfo"] p {
    margin: 6px 0;
    font-size: 13px;
}

footer[role="contentinfo"] > div > div:nth-child(2) {
    flex: 2;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

footer[role="contentinfo"] strong {
    display: block;
    color: #38bdf8;
    font-size: 15px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-family: 'Fira Code', 'SF Mono', monospace;
}

footer[role="contentinfo"] ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer[role="contentinfo"] ul li {
    margin-bottom: 8px;
    font-size: 13px;
}

footer[role="contentinfo"] ul li a {
    color: #93c5fd;
    text-decoration: none;
    transition: color 0.2s;
}

footer[role="contentinfo"] ul li a:hover {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
}

footer[role="contentinfo"] form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    max-width: 350px;
}

footer[role="contentinfo"] input[type="email"] {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background-color: #0c2340;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

footer[role="contentinfo"] input[type="email"]::placeholder {
    color: #4b5563;
}

footer[role="contentinfo"] button[type="submit"] {
    background-color: #13315c;
    border: 1px solid #38bdf8;
    color: #38bdf8;
    padding: 0 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

footer[role="contentinfo"] button[type="submit"]:hover {
    background-color: #38bdf8;
    color: #061324;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* === 6. Dynamic Component Gallery Previews === */
.product-gallery > div {
    display: none !important;
}

.product-gallery[data-sku="COMP-3D-LANDSCAPE"] .preview-landscape {
    display: block !important;
}
.product-gallery[data-sku="COMP-3D-DINOSAUR"] .preview-dinosaur {
    display: block !important;
}
.product-gallery[data-sku="COMP-FLIGHTS-TELEMETRY"] .preview-flights {
    display: block !important;
}
.product-gallery[data-sku="COMP-VORONOI-MAP"] .preview-voronoi {
    display: block !important;
}
.product-gallery[data-sku="COMP-3D-SURFACE"] .preview-surface {
    display: block !important;
}
.product-gallery[data-sku="COMP-GANTT-SCHEDULER"] .preview-gantt {
    display: block !important;
}
