/* -------------------------------------------------------------------
   THEME VARIABLES (Light Mode by default, Dark Mode overrides)
   ------------------------------------------------------------------- */
   .dark-mode {
    /* -------- Light Mode Variables -------- */
    --primary-bg:       #fdfdfd;
    --secondary-bg:     #ffffff;
    --text-color:       #222222;
    --accent-color:     #428ad3;   /* A refined gold accent */
    --accent-text:      #ffffff;
    --hover-bg:         #eaeaea;
    --header-footer-bg: #ffffff;
    --banner-bg:        #3c85ce;
    --banner-text:      #ffffff;
    --card-bg:          #f9f9f9;
    --border-color:     #ddd;
    --shadow-color:     rgba(0, 0, 0, 0.1);

    /* Danger / Alert colors (for remove buttons, etc.) */
    --danger-bg:        #f44336;
    --danger-hover-bg:  #d32f2f;

    /* Optional info-message background (red alert) */
    --info-bg:          #de3024;
    --info-text:        #ffffff;
}

:root {
    --primary-bg:       #1b1b1b;
    --secondary-bg:     #2a2a2a;
    --text-color:       #eeeeee;
    --accent-color:     #428ad3;
    --accent-text:      #1b1b1b;
    --hover-bg:         #333333;
    --header-footer-bg: #2a2a2a;
    --banner-bg:        #353535;
    --banner-text:      #428ad3;
    --card-bg:          #262626;
    --border-color:     #444;
    --shadow-color:     rgba(0, 0, 0, 0.3);

    --danger-bg:        #f44336;
    --danger-hover-bg:  #d32f2f;

    --info-bg:          #de3024;
    --info-text:        #ffffff;
}

/* -------------------------------------------------------------------
   GLOBAL STYLES (Retains your original layout & structure)
   ------------------------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--primary-bg);
    color: var(--text-color);
    direction: rtl;
}

header {
    background-color: var(--header-footer-bg);
    padding-bottom: 10px;
    color: var(--text-color);
    align-items: center;
    text-align: center;
}

header h1 {
    margin: 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin-left: 15px;
}

nav ul li a {
    color: var(--accent-color);
    text-decoration: none;
}

nav ul li a.active,
nav ul li a.current {
    background-color: var(--hover-bg);
    border-radius: 5px;
    text-size-adjust: 30px;
    padding: 10px;
    justify-content: center;
    text-align: center;
    align-items: center;
    transition: background-color 0.1s;
}

nav ul li a:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

main {
    margin-top: 1%;
    display: flex; /* Use flexbox to align sections side by side */
    flex-wrap: nowrap; /* Ensure flexibility for smaller screens */
    justify-content: space-evenly;
}

.productMain {
    margin-top: 1%;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-evenly;
}

/* -------------------------
   PRODUCT PAGE STYLES
------------------------- */
.product-container {
    display: flex; 
    flex-wrap: nowrap; 
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 5px;
    border-radius: 7px;
    background-color: transparent; /* Use transparent so root BG shows */
    
}

.hero {
    flex: 0 0 auto;
    max-width: 100%;
    background-color: var(--secondary-bg);
    padding: 20px;
    border-radius: 20px;
    color: var(--text-color);
    box-shadow: 0px 2px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#leftHero {
    flex: 1 1 40%;
    max-width: 25%;
    background-color: var(--secondary-bg);
    padding: 20px;
    border-radius: 20px;
    color: var(--text-color);
    box-shadow: 0px 2px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.customizer {
    flex: 1 1 300px;
    margin-right: 20px;
    background-color: var(--secondary-bg);
    padding: 7px;
    border-radius: 10px;
    box-shadow: 0px 2px 10px var(--shadow-color);
}

#previewContainer {
    flex: 1 1 400px;
    height: 600px;
    background-color: var(--header-footer-bg);
    border: 1px solid var(--border-color);
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0px 2px 10px var(--shadow-color);
}

#addToCartButton,
#downloadButton {
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
    width: calc(50% - 20px);
}

#addToCartButton:hover,
#downloadButton:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

#formatSelect {
    padding: 10px;
    font-size: 16px;
    margin: 10px 5px;
    width: calc(50% - 20px);
    background-color: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.examples {
    margin-top: 50px;
    max-height: 10%;
}

.example-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
}

.example-images img {
    max-width: 30%;
    min-width: 200px;
    margin: 10px;
    border-radius: 20px;
    border: 3px solid var(--border-color);
}

/* -------------------------
   FORM STYLES
------------------------- */
#nameTagForm {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.input-group input[type="text"],
.input-group select {
    margin: 5px 10px;
    padding: 8px;
    flex: 1 1 calc(50% - 20px);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
}

.input-group label {
    margin: 5px 10px;
    flex: 1 1 100%;
    color: var(--text-color);
}

/* Toggle Switch Styles */
.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    transition: 0.4s;
    border-radius: 28px;
}

.switch input:checked + .slider {
    background-color: var(--accent-color);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

.toggle-label {
    font-size: 16px;
    color: var(--text-color);
}

/* -------------------------
   FOOTER STYLES
------------------------- */
footer {
    background-color: var(--header-footer-bg);
    color: var(--text-color);
    text-align: center;
    padding: 10px 0;
    margin-top: 50px;
}

footer p {
    margin: 0.5rem;
}

footer .nav-buttons {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

footer .nav-buttons li {
    display: inline-flex;
}

/* -------------------------
   RESPONSIVE STYLES
------------------------- */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
        align-items: center;
    }

    #leftHero {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 10px 0;
        order: 2; /* Shows below rightBlock on mobile */
    }

    #rightBlock {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 10px 0;
        order: 1; /* Shows above leftHero on mobile */
    }

    .customizer {
        flex: 0;
        margin-right: 20px;
        background-color: var(--secondary-bg);
        padding: 7px;
        border-radius: 10px;
        box-shadow: 0px 2px 10px var(--shadow-color);
    }

    .customizer,
    #previewContainer {
        width: 100%;
        margin-right: 0;
        margin-top: 20px;
    }

    #previewContainer {
        height: 300px;
    }

    .input-group input[type="text"],
    .input-group select {
        flex: 1 1 100%;
        margin: 5px 0;
    }

    .input-group label {
        text-align: center;
    }

    #addToCartButton,
    #downloadButton,
    #formatSelect {
        width: 100%;
        margin: 10px 0;
    }

    .toggle-switch {
        justify-content: center;
    }

    .example-images img {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .side-cart {
        width: 100%;
        max-width: 100%;
    }

    .side-cart {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    nav ul li {
        display: block;
        margin: 5px 0;
        background-color: var(--header-footer-bg);
    }

    nav ul li a {
        font-size: 18px;
    }

    .switch {
        width: 40px;
        height: 24px;
    }

    .slider:before {
        width: 16px;
        height: 16px;
    }

    .slider:before {
        left: 4px;
        bottom: 4px;
    }

    .switch input:checked + .slider:before {
        transform: translateX(16px);
    }
}

/* -------------------------
   PRODUCT LIST & CARDS
------------------------- */
.product-list {
    flex: 1 1 auto;
    max-width: 100%;
    background-color: var(--secondary-bg);
    padding: 20px;
    border-radius: 20px;
    margin-left: 5px;
    box-shadow: 0px 2px 10px var(--shadow-color);
    
}

.product-list h2,
.hero h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: var(--text-color);
}

.products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    align-items: stretch; /* Ensure all cards stretch to same height */
    margin-bottom: 1rem;
}

/* Category rows for grouping */
.category-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch; /* Ensure all cards in the row have same height */
}

.product-card {
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    width: 300px;
    margin: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height available */
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-5px);
    background-color: var(--hover-bg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

.product-card h3 {
    margin: 15px 0 10px 0;
    font-size: 1.5em;
    color: var(--accent-color);
    text-align: center; /* Center align the product title */
}

.product-card p {
    color: var(--text-color);
    font-size: 1em;
    margin-bottom: 15px;
    flex: 1; /* Allow description to grow and push other elements */
    text-align: center; /* Center align the description text */
}

/* Create a bottom section that will always be at the same height */
.product-card .bottom-section {
    margin-top: auto; /* Push this section to bottom */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.product-card .price {
    font-size: 1.2em;
    color: var(--text-color);
    margin: 0; /* Remove margins since we use gap in bottom-section */
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 5px;
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 2em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

@media (max-width: 768px) {
    .products-container {
        flex-direction: column;
        align-items: center;
    }

    .product-card {
        width: 90%;
    }
}

.product-detail {
    padding: 40px 20px;
    background-color: var(--secondary-bg);
}

.product-detail h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: var(--text-color);
}

.product-detail p {
    text-align: center;
    color: var(--text-color);
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* -------------------------
   CART SECTION
------------------------- */
.cart-section {
    padding: 20px;
    margin: 10px;
    border-radius: 5px;
    background-color: var(--secondary-bg);
}

.cart-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: var(--text-color);
}

.cart-item {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.cart-item h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
}

.cart-item p {
    margin-bottom: 10px;
    color: var(--text-color);
}

.cart-item ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}

.remove-button,
.remove-discount-button {
    padding: 8px 16px;
    background-color: var(--danger-bg);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-button:hover,
.remove-discount-button:hover {
    background-color: var(--danger-hover-bg);
}

.cart-summary {
    text-align: center;
    margin-top: 30px;
}

.cart-summary h3 {
    font-size: 1.5em;
    color: var(--text-color);
}

#checkoutButton {
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

#checkoutButton:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

/* -------------------------
   SIDE CART
------------------------- */
.side-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100%;
    background: var(--secondary-bg);
    box-shadow: -2px 0 5px var(--shadow-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.side-cart .close-cart-button {
    align-self: flex-end;
    margin-top: 10px;
}

.side-cart .cart-section {
    overflow-y: auto;
    flex-grow: 1;
}

.side-cart.hidden {
    transform: translateX(100%);
}

.side-cart.visible {
    transform: translateX(0);
}

.cart-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cart-preview {
    width: 100px;
    height: 100px;
    margin-right: 10px;
    background: #333; /* placeholder until preview loads */
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--text-color);
}

.cart-item-info p {
    margin: 5px 0;
    font-size: 1em;
    color: var(--text-color);
}

header {
    justify-content: space-between;
    background-color: var(--header-footer-bg);
}

.siteheader {
    width: 70%; 
    max-width: 1200px; 
    height: auto;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav-buttons {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-buttons {
    flex-direction: row;
    gap: 10px;
}

.nav-buttons li {
    display: inline-flex;
}

@media (max-width: 768px) {
    header {
        flex-direction: row-reverse; 
        align-items: center;
        justify-content: space-between;
    }

    .siteheader {
        width: 70%;
    }

    .navbar {
        justify-content: center;
        flex: 1;
    }

    .nav-buttons {
        flex-direction: row;
        gap: 10px;
    }

    .nav-buttons li {
        display: inline-flex;
    }
}

.navbar ul li a {
    display: inline-block;
    border-radius: 5px; 
    padding: 10px 15px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

/* Cart Container */
main {
    margin-top: 1%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-evenly;
}
.productMain {
    margin-top: 1%;
    flex-wrap: nowrap;
    justify-content: space-evenly;
}

/* Cart Layout */
.cart-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.cart-summary {
    flex: 0 0 40%;
    max-width: 400px;
    background-color: var(--secondary-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow-color);
    overflow: hidden;
    box-sizing: border-box;
}

.cart-items {
    flex: 1 1 60%;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px var(--shadow-color);
    overflow-y: auto;
    max-height: 500px;
    box-sizing: border-box;
}

.discount-section {
    margin-top: 20px;
    background-color: var(--secondary-bg);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.discount-section label {
    color: var(--text-color);
    font-size: 0.9em; 
    flex: 1 1 auto;
}

.discount-section input[type="text"] {
    flex: 2 1 auto;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 5px;
    padding: 10px;
    font-size: 0.9em;
    max-width: 200px;
    box-sizing: border-box;
}

.discount-section button {
    flex: 0 0 auto;
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 0.9em;
    white-space: nowrap;
    box-sizing: border-box;
}

.discount-section button:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

.example-video,
.example-model {
    border-radius: 20px;
    width: 30%;
    border: 3px solid var(--border-color);
}

/* Responsive Adjustments for Cart */
@media (max-width: 768px) {
    .cart-container {
        flex-direction: column; 
        align-items: stretch;
    }
    .example-video,
    .example-model {
        width: 80%;
    }
    .cart-summary {
        flex: 1 1 auto;
        max-width: 100%;
        margin-bottom: 20px;
    }
    .cart-items {
        flex: 1 1 auto;
    }
    .discount-section {
        flex-direction: row-reverse;
        align-items: stretch;
    }
    .discount-section label,
    .discount-section input[type="text"],
    .discount-section button {
        flex: 1 1 auto;
        max-width: 100%;
        text-align: center;
    }
}

/* Scrolling Banner */
.scrolling-banner {
    width: 100%;
    background-color: var(--accent-color);
    color: var(--accent-text);
    font-size: 1.2rem;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.scrolling-banner span {
    display: inline-block;
    animation: scroll-text 13s linear infinite;
    white-space: nowrap;
}

@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Coming Soon Banner */
.coming-soon-banner {
    background-color: var(--banner-bg);
    color: var(--banner-text);
    text-align: center;
    padding: 15px 0;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
    position: relative;
    z-index: 1000;
    box-shadow: 0px 2px 5px var(--shadow-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.coming-soon-banner:hover {
    filter: brightness(95%);
}

/* Info Message (red alert) */
.info-message {
    background-color: var(--info-bg);
    color: var(--info-text);
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-bottom: 20px;
    max-width: 100%;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* Toggle Switch with Icons */
.input-group.toggle-switch {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.switch-with-icons {
    position: relative;
    display: inline-block;
    width: 100px;
    height: 40px;
}

.switch-with-icons input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-with-icons {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    transition: background-color 0.4s ease-in-out;
}

.slider-with-icons img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.4s ease-in-out;
}

.slider-with-icons .toggle-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff91;
    font-size: 12px;
    font-weight: bold;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.switch-with-icons input:checked + .slider-with-icons {
    background-color: var(--accent-color);
}

.switch-with-icons input:checked + .slider-with-icons img.icon-left {
    filter: brightness(0) invert(1);
    transition: filter 0.8s ease-in-out;
    opacity: 1;
}

.switch-with-icons input:checked + .slider-with-icons img.icon-right {
    filter: brightness(0) invert(0);
    transition: filter 0.8s ease-in-out;
    opacity: 1;
}

.switch-with-icons input:not(:checked) + .slider-with-icons img.icon-left {
    filter: brightness(0) invert(0);
    opacity: 1;
    transition: filter 0.8s ease-in-out;
}

.switch-with-icons input:not(:checked) + .slider-with-icons img.icon-right {
    filter: brightness(0) invert(1);
    transition: filter 0.8s ease-in-out;
    opacity: 0.8;
}

/* Advertisement Section */
.advertisement {
    background-color: var(--secondary-bg);
    padding: 30px 20px;
    margin: 20px 0;
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    box-shadow: 0px 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.advertisement:hover,
.hero:hover {
    transform: translateY(-1px);
    box-shadow: 0px 8px 20px var(--shadow-color);
}
.advertisement h2 {
    color: var(--accent-color);
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}
.advertisement p {
    color: var(--text-color);
    font-size: 1.1em;
    line-height: 1.6;
    text-align: right;
}
.advertisement p strong {
    color: #ffffff; 
}

/* Search Container / Search Results */
#searchResultsContainer {
    direction: rtl;
    background-color: var(--secondary-bg);
    border-radius: 5px;
    overflow: hidden;
    color: var(--accent-color);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: var(--hover-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-image {
    width: 50px;
    height: 50px;
    margin-left: 10px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.result-details {
    flex: 1;
    color: #fff;
}

.result-details strong {
    color: var(--accent-color);
    font-size: 1em;
}

.no-result-item {
    padding: 10px;
    text-align: center;
    color: var(--accent-color);
}

.nav-buttons .search-container {
    position: relative;
}

.nav-buttons #searchInput {
    width: 200px;
    padding: 5px;
    background-color: var(--hover-bg);
    color: var(--text-color);
    border-radius: 5px;
}

.nav-buttons #searchInput::placeholder {
    color: #aaa;
}

@media (max-width: 768px) {
    .nav-buttons #searchInput {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .nav-buttons #searchInput {
        width: 100px;
    }
}

.product-card.unavailable {
    opacity: 0.5;
    color: grey;
    cursor: not-allowed;
    pointer-events: none;
}

.product-card.unavailable h3,
.product-card.unavailable p,
.product-card.unavailable .price {
    text-decoration: line-through;
}

#rightBlock {
    flex: 1 1 60%;
}

.product-card .collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 60px;
    gap: 2px;
    width: 100%;
    background-color: #f5f5f5;
    margin-bottom: 8px;
}

.product-card .collage img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.product-card {
  width: 320px;
  margin: 10px;
  padding: 10px;
  display: flex; 
  flex-direction: column; 
  align-items: center;
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
}

.product-card .collage {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 50px;
  gap: 2px;
  background-color: #f5f5f5;
  overflow: hidden;
}

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

.cat-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #333;
    overflow: hidden;
    margin-bottom: 10px;
}
.cat-thumbnail img {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    object-fit: cover;
}
#rightBlock {
    position: relative;
}
.back-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    font-size: 0.9em;
    padding: 8px 12px;
}

/* -------------------------------------------------------------------
   SHOWCASE PRODUCT STYLES
   ------------------------------------------------------------------- */

/* Showcase Container - Grid Layout */
#showcaseContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 400px));
    gap: 25px;
    width: 100%;
    padding: 20px 0;
    align-items: stretch; /* Ensure all cards have same height */
    justify-items: center;
    justify-content: center; /* Center the grid when fewer items */
}

/* When there's only one product, limit its width */
#showcaseContainer.single-product {
    grid-template-columns: minmax(400px, 600px);
    max-width: 600px;
    margin: 0 auto;
}

/* Alternative approach using :has() for modern browsers */
#showcaseContainer:has(.showcase-product-card:only-child) {
    grid-template-columns: minmax(400px, 600px);
    max-width: 600px;
    margin: 0 auto;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
    #showcaseContainer .showcase-product-card:only-child {
        max-width: 600px;
        width: 100%;
    }
}

/* Showcase Product Cards - Equal Height Grid Items */
.showcase-product-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 0;
    padding: 20px;
    box-shadow: var(--shadow-color) 0px 4px 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height available in grid */
    width: 100%; /* Take full width available in grid */
    max-width: 400px; /* Consistent maximum width */
    min-height: 500px; /* Minimum height to ensure consistency */
}

.showcase-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-color) 0px 8px 24px;
}

.showcase-product-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto; /* Take available space, pushing variations to bottom */
    min-height: 0; /* Allow flex shrinking */
}

.showcase-product-visual {
    flex: 0 0 auto;
    width: 100%;
    order: 1;
    min-height: 200px; /* Ensure consistent image area height */
    margin-bottom: 20px;
}

.showcase-product-details {
    flex: 1 1 auto;
    min-width: 0;
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 20px;
}

/* Image Container - Compact Dimensions */
.product-image-container {
    width: 100%;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.product-main-image {
    width: 100%;
    position: relative;
    padding-top: 60%; /* 5:3 aspect ratio for more compact display */
    overflow: hidden;
}

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

.image-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    background-color: var(--accent-color);
    color: var(--accent-text);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: bold;
}

.nav-btn:hover {
    background-color: var(--hover-bg);
    transform: scale(1.1);
    box-shadow: var(--shadow-color) 0px 2px 8px;
}

.nav-btn:active {
    transform: scale(0.95);
}

.image-counter {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    padding: 0 10px;
}

/* Product Info */
.product-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    justify-content: flex-start;
}

.product-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.3;
    text-align: center;
}

.product-description {
    font-size: 1em;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: center;
    flex: 1 1 auto;
}

/* Product Variations - Bottom positioned */
.product-variations {
    margin-top: auto; /* Push to bottom of flex container */
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    flex: 0 0 auto; /* Don't grow, stay at bottom */
}

.variation-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 0.95em;
    text-align: center;
}

.variation-select {
    width: 40%;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variation-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(66, 138, 211, 0.1);
}

.variation-select:hover {
    border-color: var(--accent-color);
}

/* Variation Buttons Grid */
.variation-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    justify-content: center;
    align-items: center;
}

.variation-button {
    padding: 12px 16px;
    border-radius: 8px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
    min-width: 180px;
}

.variation-button:hover {
    border-color: var(--accent-color);
    background-color: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.variation-button.selected {
    background-color: var(--accent-color);
    color: var(--accent-text);
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(66, 138, 211, 0.3);
}

.variation-button.selected:hover {
    background-color: var(--accent-color);
    color: var(--accent-text);
    transform: translateY(-1px);
}

/* Product Divider */
.product-divider {
    margin: 40px 0;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--card-bg), var(--secondary-bg));
    border-radius: 12px;
    padding: 40px 30px;
    margin-top: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-color) 0px 4px 12px;
}

.contact-content h3 {
    font-size: 1.6em;
    color: var(--text-color);
    margin-bottom: 16px;
    font-weight: bold;
}

.contact-content p {
    font-size: 1.1em;
    color: var(--text-color);
    margin-bottom: 12px;
    line-height: 1.6;
    opacity: 0.9;
}

.contact-actions {
    margin-top: 25px;
}

.contact-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-color) 0px 4px 12px;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-color) 0px 8px 24px;
}

/* Empty/Error States */
.empty-state, .error-state {
    text-align: center;
    padding: 60px 30px;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 40px 0;
}

.empty-state-content, .error-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state h3, .error-state h3 {
    font-size: 1.4em;
    color: var(--text-color);
    margin-bottom: 16px;
}

.empty-state p, .error-state p {
    font-size: 1em;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    font-style: italic;
    opacity: 0.6;
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

/* -------------------------------------------------------------------
   RESPONSIVE DESIGN FOR SHOWCASE
   ------------------------------------------------------------------- */

@media (max-width: 768px) {
    #showcaseContainer {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px 0;
    }
    
    /* Single product layout on mobile */
    #showcaseContainer.single-product {
        grid-template-columns: 1fr;
        max-width: 100%;
        margin: 0;
    }
    
    .showcase-product-card {
        padding: 15px;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .showcase-product-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .showcase-product-visual {
        width: 100%;
    }
    
    .showcase-media-content {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
    
    .showcase-model-viewer {
        height: 160px;
        max-height: 160px;
    }
    
    .product-title {
        font-size: 1.2em;
    }
    
    .contact-section {
        padding: 30px 20px;
        margin-top: 40px;
    }
    
    .contact-content h3 {
        font-size: 1.4em;
    }
    
    .contact-content p {
        font-size: 1em;
    }
    
    .contact-btn {
        padding: 12px 24px;
        font-size: 1em;
    }
    
    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .image-navigation {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    #showcaseContainer {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px 0;
    }
    
    .showcase-product-card {
        padding: 12px;
        margin-bottom: 0;
    }
    
    .showcase-media-content {
        height: 160px;
        min-height: 160px;
        max-height: 160px;
    }
    
    .showcase-model-viewer {
        height: 140px;
        max-height: 140px;
    }
    
    .product-main-image {
        padding-top: 65%; /* Slightly taller on small mobile */
    }
    
    .contact-section {
        padding: 25px 15px;
    }
    
    .variation-select {
        padding: 10px 14px;
        width: 90%;
        font-size: 0.95em;
    }
    
    .variation-buttons-grid {
        flex-direction: column;
        gap: 10px;
    }
    
    .variation-button {
        padding: 10px 14px;
        font-size: 0.9em;
        min-width: auto;
        width: 100%;
    }
}

/* Mixed Media Support for Showcase - Grid Layout */
.showcase-media-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.showcase-media-section {
    flex: 1;
    min-width: 0;
}

.showcase-media-section.single {
    flex: 1 1 100%;
}

.showcase-media-section.dual {
    flex: 1 1 100%;
}

.showcase-media-header {
    text-align: center;
    padding: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.showcase-media-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    box-sizing: border-box;
}

.showcase-media-section.single .showcase-media-content {
    border-radius: 8px;
    border-top: 1px solid var(--border-color);
}

.showcase-model-viewer {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    height: 180px;
    max-height: 180px;
    border-radius: 4px;
    border: none;
    background-color: transparent;
    box-sizing: border-box;
}

.showcase-image-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-image-viewer img, .showcase-image-viewer video {
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px) {
    .showcase-media-container {
        flex-direction: column;
        gap: 10px;
    }
    .showcase-media-content {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
    .showcase-model-viewer {
        height: 160px;
        max-height: 160px;
        max-width: 100%;
    }
    .showcase-image-viewer {
        width: 100%;
        height: 100%;
    }
    .showcase-product-visual {
        min-width: 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* Mobile responsive layout for swapped blocks */
.product-container > div:last-child {
    flex-direction: column-reverse !important;
}

.product-container #leftBlock,
.product-container #rightHero {
    flex: 1 1 100% !important;
    margin: 10px 0 !important;
}
