:root {
    --bg-color: #f8f9fa;
    --text-color: #1a1e23;
    --primary-color: #008080;
    /* Teal */
    --primary-hover: #006666;
    --secondary-color: #ffbf00;
    /* Amber */
    --accent-color: #e6fcf5;
    /* Light teal for cards */
    --white: #ffffff;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #868e96;
    --gray-800: #343a40;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --border-radius: 12px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --max-width: 1280px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
    margin-left: -2px;
    /* Pull the .ai closer */
}

.logo-icon {
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-icon::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.search-box {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.95rem;
    background: var(--gray-100);
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
}

nav ul {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-800);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-ai-assistant {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-ai-assistant:hover {
    background: var(--primary-hover);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-color) 100%);
}

.hero-ai-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.hero-ai-avatar {
    width: 60px;
    height: 60px;
    background: var(--white);
    border: 6px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 128, 128, 0.1);
}

.hero-ai-avatar::before {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
}



.hero-ai-message {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    max-width: 600px;
}

.hero-ai-message::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--white);
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 0;
}

.hero-search {
    width: 100%;
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    border-radius: 40px;
}

.hero-search input:focus {
    outline: none;
}

.hero-search button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 30px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hero-search button:hover {
    opacity: 0.9;
}

.hero-modes {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.mode-chip {
    padding: 6px 16px;
    background: var(--gray-200);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-chip.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Worlds Section */
.worlds {
    padding: 60px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.world-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.world-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    height: 200px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.world-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.world-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.world-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: var(--white);
}

.world-card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.world-card-content span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* AI Recommendations */
.ai-recommendations {
    padding: 60px 0;
    background: var(--accent-color);
}

.recommendation-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scrollbar-width: none;
}

.recommendation-card {
    min-width: 300px;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.badge-ai {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.ai-reasoning {
    background: var(--gray-100);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--gray-800);
    font-style: italic;
    border-left: 3px solid var(--primary-color);
}

/* Product Groups */
.products-section {
    padding: 60px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
}

.product-img-wrapper {
    height: 200px;
    margin-bottom: 15px;
    position: relative;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.price-tag {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.price-from {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 400;
}

.product-tags {
    margin-top: 8px;
    display: flex;
    gap: 5px;
}

.tag {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: var(--gray-200);
    border-radius: 4px;
    color: var(--gray-800);
    font-weight: 600;
}

/* AI Assistant Bubble */
.ai-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 128, 128, 0.3);
    cursor: pointer;
    z-index: 2000;
}

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 2000;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.ai-chat-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    border: 1px solid var(--gray-300);
    padding: 8px 12px;
    border-radius: 20px;
}

/* Footer */
footer {
    background: var(--gray-800);
    color: var(--white);
    padding: 60px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.tag.inspiration {
    background: #fff4e6;
    color: #d9480f;
}

.tag.comparison {
    background: var(--accent-color);
    color: var(--primary-color);
}

.product-card h4 {
    margin-top: 10px;
}

/* World details simulated page */
.world-hub {
    display: none;
    /* Hidden by default, toggled in JS */
}

.world-hub.active {
    display: block;
}

/* Product Parameters Section */
.product-params {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.param-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.param-value {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px !important;
    }

    .header-inner {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px;
        padding: 10px 15px !important;
    }

    .logo {
        font-size: 1.2rem !important;
    }

    .logo-icon {
        width: 18px !important;
        height: 18px !important;
        border-width: 2px !important;
    }

    .logo-icon::after {
        width: 4px !important;
        height: 4px !important;
    }

    .nav-desktop ul {
        flex-direction: row !important;
        gap: 12px !important;
        align-items: center !important;
    }

    .nav-desktop .btn-ai-assistant {
        padding: 0 !important;
        font-size: 0 !important;
        width: 36px;
        height: 36px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50%;
        gap: 0 !important;
    }

    .nav-desktop .btn-ai-assistant i {
        font-size: 1.1rem !important;
        margin: 0 !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.85rem !important;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    h1,
    h2 {
        font-size: 1.6rem !important;
    }

    .product-info-panel .price-tag {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }


    .hero-search {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        gap: 12px;
    }

    .hero-search input {
        background: var(--white);
        border: 1px solid var(--gray-200);
        box-shadow: var(--shadow-sm);
        border-radius: 12px;
        padding: 12px 20px;
    }

    .hero-search button {
        padding: 15px;
        border-radius: 12px;
        width: 100%;
        font-size: 1rem;
    }

    .hero-modes {
        flex-wrap: wrap;
        gap: 10px;
    }

    .world-grid {
        grid-template-columns: 1fr;
    }

    .product-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .product-gallery img {
        padding: 20px !important;
    }

    .product-gallery div {
        grid-template-columns: 1fr 1fr 1fr !important;
    }


    .offer-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
        padding: 15px !important;
    }

    .offer-row .price-tag {
        font-size: 1.2rem !important;
    }

    .offer-row .btn-go-to,
    .offer-row .btn-ai-assistant {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .product-params {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col .logo {
        justify-content: center;
    }

    .ai-chat-window {
        width: 100%;
        right: 0;
        bottom: 0;
        height: 80vh;
        border-radius: 20px 20px 0 0;
    }
}

@media (max-width: 480px) {
    .product-params {
        grid-template-columns: 1fr;
    }

    .nav-desktop ul {
        font-size: 0.85rem;
        gap: 10px;
    }

    .btn-ai-assistant {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}