/* ==========================================================================
   LoveToys AI Assistant
   ROYAL LUXURY UI
   Black / Burgundy / Gold
   Mobile First
   ========================================================================== */


/* ==========================================================================
   01 — ROOT
   ========================================================================== */

:root {

    --black-1: #030303;
    --black-2: #070707;
    --black-3: #0d0d0d;
    --black-4: #141414;

    --burgundy-1: #30000f;
    --burgundy-2: #520018;
    --burgundy-3: #760024;
    --burgundy-4: #a00032;

    --gold-1: #8d6a21;
    --gold-2: #b8943d;
    --gold-3: #d4af37;
    --gold-4: #f2d477;
    --gold-5: #fff0ad;

    --white: #ffffff;
    --white-soft: #eeeeee;
    --text-muted: #999999;

    --green: #19d66b;

    --border-gold:
        rgba(212, 175, 55, .45);

    --border-gold-soft:
        rgba(212, 175, 55, .18);

    --border-red:
        rgba(160, 0, 50, .65);

    --glass:
        rgba(255, 255, 255, .045);

    --glass-strong:
        rgba(255, 255, 255, .075);

    --shadow-gold:
        0 0 30px rgba(212, 175, 55, .08);

    --shadow-red:
        0 0 35px rgba(160, 0, 50, .12);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition:
        .28s cubic-bezier(.22,.61,.36,1);

}


/* ==========================================================================
   02 — RESET
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    min-height: 100%;
    background: var(--black-1);
    scroll-behavior: smooth;
}

body {

    width: 100%;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(120,0,35,.18),
            transparent 38%
        ),
        #030303;

    color: var(--white);

    font-family:
        "Cairo",
        Tahoma,
        Arial,
        sans-serif;

    overflow-x: hidden;
}

button,
input,
textarea {

    font: inherit;
}

button,
a {

    -webkit-tap-highlight-color:
        transparent;
}

button {

    border: 0;
    cursor: pointer;
}

a {

    color: inherit;
    text-decoration: none;
}


/* ==========================================================================
   03 — APPLICATION
   ========================================================================== */

.ai-page {
    position: relative;
}

.ai-assistant-app {

    position: relative;

    width: 100%;
    min-height: 100vh;

    display: flex;
    justify-content: center;

    background:
        linear-gradient(
            180deg,
            #030303 0%,
            #070707 45%,
            #020202 100%
        );

}


/* ==========================================================================
   04 — BACKGROUND
   ========================================================================== */

.luxury-background {

    position: fixed;
    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;

}

.bg-glow {

    position: absolute;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    filter: blur(80px);

    opacity: .18;

}

.bg-glow-one {

    top: -100px;
    right: -80px;

    background:
        rgba(170, 0, 55, .7);

}

.bg-glow-two {

    top: 45%;
    left: -150px;

    background:
        rgba(212, 175, 55, .15);

}

.bg-glow-three {

    bottom: -120px;
    right: 15%;

    background:
        rgba(110, 0, 35, .5);

}

.bg-noise {

    position: absolute;
    inset: 0;

    opacity: .035;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");

}


/* ==========================================================================
   05 — CHAT SHELL
   ========================================================================== */

.chat-shell {

    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 540px;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            rgba(5,5,5,.97),
            rgba(2,2,2,.99)
        );

    border-left:
        1px solid var(--border-gold-soft);

    border-right:
        1px solid var(--border-gold-soft);

    box-shadow:
        0 0 80px rgba(0,0,0,.65);

    overflow: hidden;

}


/* ==========================================================================
   06 — HEADER
   ========================================================================== */

.chat-header {

    position: relative;

    min-height: 105px;

    padding:
        18px 18px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            180deg,
            rgba(20,0,8,.96),
            rgba(4,4,4,.92)
        );

    border-bottom:
        1px solid var(--border-gold-soft);

}

.chat-header::after {

    content: "";

    position: absolute;

    bottom: -1px;
    left: 12%;
    right: 12%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold-3),
            transparent
        );

    opacity: .7;

}


/* ==========================================================================
   07 — HEADER BUTTONS
   ========================================================================== */

.header-action {

    width: 52px;
    height: 52px;

    flex: 0 0 52px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--gold-4);

    background:
        radial-gradient(
            circle,
            rgba(212,175,55,.08),
            rgba(0,0,0,.3)
        );

    border:
        1px solid var(--gold-2);

    box-shadow:
        inset 0 0 15px rgba(212,175,55,.04),
        0 0 15px rgba(212,175,55,.04);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition);

}

.header-action i {

    font-size: 18px;

}

.header-action:hover {

    transform:
        translateY(-2px);

    background:
        rgba(212,175,55,.08);

    box-shadow:
        0 0 22px rgba(212,175,55,.16);

}

.header-action:active {

    transform:
        scale(.92);

}


/* ==========================================================================
   08 — BRAND
   ========================================================================== */

.chat-brand {

    flex: 1;

    text-align: center;

    padding: 0 10px;

}

.brand-logo {

    color: var(--gold-4);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 35px;

    font-weight: 700;

    font-style: italic;

    line-height: 1;

    letter-spacing: -1.5px;

    text-shadow:
        0 0 10px rgba(212,175,55,.22),
        0 2px 2px rgba(0,0,0,.8);

}

.brand-subtitle {

    margin-top: 7px;

    color: var(--gold-4);

    font-size: 11px;

    font-weight: 600;

    white-space: nowrap;

}


/* ==========================================================================
   09 — STATUS BAR
   ========================================================================== */

.ai-status-bar {

    margin:
        0 10px;

    min-height: 48px;

    padding:
        8px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,.035),
            rgba(255,255,255,.07),
            rgba(255,255,255,.035)
        );

    border:
        1px solid rgba(255,255,255,.06);

    border-radius:
        0 0 var(--radius-md) var(--radius-md);

    backdrop-filter:
        blur(14px);

}

.ai-online-status,
.ai-security-status {

    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--white-soft);

    font-size: 11px;

    white-space: nowrap;

}

.online-indicator {

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background:
        var(--green);

    box-shadow:
        0 0 10px rgba(25,214,107,.75);

    animation:
        onlinePulse 2s infinite;

}

@keyframes onlinePulse {

    0%,
    100% {
        box-shadow:
            0 0 5px rgba(25,214,107,.5);
    }

    50% {
        box-shadow:
            0 0 16px rgba(25,214,107,.95);
    }

}

.ai-security-status {

    color: var(--gold-4);

}

.ai-security-status i {

    color: var(--gold-3);

}


/* ==========================================================================
   10 — CHAT CONTENT
   ========================================================================== */

.chat-content {

    flex: 1;

    padding:
        18px 12px 170px;

    overflow-y: auto;

    overflow-x: hidden;

    scroll-behavior: smooth;

}

.chat-content::-webkit-scrollbar {

    width: 3px;

}

.chat-content::-webkit-scrollbar-track {

    background: transparent;

}

.chat-content::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            var(--burgundy-3),
            var(--gold-3)
        );

    border-radius: 10px;

}


/* ==========================================================================
   11 — AI WELCOME
   ========================================================================== */

.ai-welcome {

    position: relative;

    margin:
        8px 4px 24px;

    padding:
        22px 16px;

    text-align: center;

    border:
        1px solid var(--border-gold-soft);

    border-radius:
        var(--radius-xl);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(130,0,38,.18),
            transparent 55%
        ),
        rgba(255,255,255,.018);

    box-shadow:
        var(--shadow-gold);

}

.ai-welcome::before {

    content: "";

    position: absolute;

    inset: 1px;

    border-radius:
        calc(var(--radius-xl) - 1px);

    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(212,175,55,.04),
            transparent 35%,
            rgba(160,0,50,.04)
        );

}

.ai-avatar-large {

    position: relative;

    width: 76px;
    height: 76px;

    margin:
        0 auto 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #1d0a0f,
            #050505
        );

    border:
        1px solid var(--gold-3);

    box-shadow:
        0 0 0 6px rgba(212,175,55,.035),
        0 0 30px rgba(212,175,55,.15);

}

.avatar-letter {

    color: var(--gold-4);

    font-family:
        Georgia,
        serif;

    font-size: 27px;

    font-style: italic;

}

.avatar-status {

    position: absolute;

    right: 3px;
    bottom: 5px;

    width: 13px;
    height: 13px;

    border-radius: 50%;

    background:
        var(--green);

    border:
        3px solid var(--black-2);

    box-shadow:
        0 0 12px rgba(25,214,107,.7);

}

.welcome-eyebrow {

    color:
        var(--gold-3);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .5px;

}

.welcome-content h1 {

    margin-top: 4px;

    font-size: 22px;

    font-weight: 800;

}

.welcome-content p {

    max-width: 390px;

    margin:
        7px auto 0;

    color:
        var(--text-muted);

    font-size: 12px;

    line-height: 1.9;

}


/* ==========================================================================
   12 — CAPABILITY CHIPS
   ========================================================================== */

.ai-capabilities {

    margin-top: 17px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 8px;

}

.capability-chip {

    min-height: 43px;

    padding:
        8px 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color:
        var(--gold-4);

    background:
        rgba(0,0,0,.45);

    border:
        1px solid var(--border-gold-soft);

    border-radius:
        var(--radius-sm);

    font-size: 11px;

    transition:
        var(--transition);

}

.capability-chip i {

    color:
        var(--gold-3);

}

.capability-chip:hover {

    border-color:
        var(--gold-3);

    background:
        rgba(212,175,55,.07);

    transform:
        translateY(-2px);

}


/* ==========================================================================
   13 — MESSAGES
   ========================================================================== */

.messages-container {

    display: flex;

    flex-direction: column;

    gap: 14px;

}

.message {

    display: flex;

    width: 100%;

    animation:
        messageIn .35s ease both;

}

@keyframes messageIn {

    from {
        opacity: 0;
        transform:
            translateY(10px);
    }

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

}

.message-ai {

    justify-content: flex-start;

    gap: 9px;

}

.message-user {

    justify-content: flex-end;

}

.message-avatar {

    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: var(--gold-4);

    font-family:
        Georgia,
        serif;

    font-size: 15px;

    font-style: italic;

    background:
        radial-gradient(
            circle,
            #200811,
            #050505
        );

    border:
        1px solid var(--gold-2);

    box-shadow:
        0 0 15px rgba(212,175,55,.07);

}

.message-content {

    max-width:
        calc(100% - 48px);

}

.message-user .message-content {

    max-width:
        82%;

}

.message-bubble {

    padding:
        12px 14px;

    border-radius:
        17px;

    color:
        var(--white-soft);

    font-size: 13px;

    line-height: 1.9;

}

.message-ai .message-bubble {

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.075),
            rgba(255,255,255,.025)
        );

    border:
        1px solid rgba(255,255,255,.07);

    border-top-right-radius:
        5px;

}

.message-user .message-bubble {

    background:
        linear-gradient(
            135deg,
            var(--burgundy-3),
            var(--burgundy-1)
        );

    border:
        1px solid rgba(210,0,65,.4);

    border-top-left-radius:
        5px;

    box-shadow:
        0 5px 25px rgba(100,0,30,.15);

}

.message-time {

    margin-top: 5px;

    color:
        #777;

    font-size: 9px;

}

.message-user .message-time {

    text-align: left;

}


/* ==========================================================================
   14 — TYPING
   ========================================================================== */

.ai-typing {

    display: flex;

    align-items: center;

    gap: 9px;

    margin:
        16px 0;

}

.typing-avatar {

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: var(--gold-4);

    font-family: Georgia, serif;

    background:
        #10070a;

    border:
        1px solid var(--gold-2);

}

.typing-bubble {

    min-height: 44px;

    padding:
        8px 13px;

    display: flex;
    align-items: center;

    gap: 4px;

    background:
        rgba(255,255,255,.045);

    border:
        1px solid rgba(255,255,255,.07);

    border-radius:
        15px;

}

.typing-bubble span {

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        var(--gold-3);

    animation:
        typingBounce 1.2s infinite;

}

.typing-bubble span:nth-child(2) {
    animation-delay: .15s;
}

.typing-bubble span:nth-child(3) {
    animation-delay: .3s;
}

.typing-bubble small {

    margin-right: 7px;

    color:
        #888;

    font-size: 9px;

}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform:
            translateY(0);
    }

    30% {
        transform:
            translateY(-4px);
    }

}


/* ==========================================================================
   15 — SECTION HEADINGS
   ========================================================================== */

.section-heading {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin:
        22px 4px 12px;

}

.section-kicker {

    display: block;

    color:
        var(--gold-3);

    font-size: 9px;

    font-weight: 700;

    margin-bottom: 2px;

}

.section-heading h2 {

    font-size: 18px;

    font-weight: 800;

}

.section-more {

    display: flex;

    align-items: center;

    gap: 6px;

    color:
        var(--gold-4);

    background:
        transparent;

    font-size: 10px;

}

.section-more i {

    font-size: 9px;

}


/* ==========================================================================
   16 — PRODUCTS
   ========================================================================== */

.smart-products-section {

    margin-top: 18px;

}

.products-carousel {

    display: flex;

    gap: 10px;

    overflow-x: auto;

    padding:
        3px 3px 12px;

    scroll-snap-type:
        x mandatory;

}

.products-carousel::-webkit-scrollbar {

    height: 2px;

}

.products-carousel::-webkit-scrollbar-thumb {

    background:
        var(--gold-2);

}


/* ==========================================================================
   17 — PRODUCT CARD
   ========================================================================== */

.product-card {

    position: relative;

    flex:
        0 0 190px;

    overflow: hidden;

    scroll-snap-align:
        start;

    border:
        1px solid var(--border-gold-soft);

    border-radius:
        var(--radius-md);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.015)
        );

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

}

.product-card:hover {

    transform:
        translateY(-5px);

    border-color:
        var(--gold-3);

    box-shadow:
        0 12px 30px rgba(0,0,0,.5),
        0 0 25px rgba(212,175,55,.07);

}

.product-image {

    position: relative;

    width: 100%;

    aspect-ratio:
        1 / 1;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #19070d,
            #080808
        );

}

.product-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform .6s ease;

}

.product-card:hover
.product-image img {

    transform:
        scale(1.06);

}

.product-badge {

    position: absolute;

    top: 8px;
    right: 8px;

    z-index: 2;

    padding:
        4px 8px;

    border-radius:
        7px;

    color:
        var(--gold-5);

    background:
        linear-gradient(
            135deg,
            #65001d,
            #30000e
        );

    border:
        1px solid rgba(212,175,55,.3);

    font-size: 9px;

    font-weight: 700;

}

.product-info {

    padding:
        11px;

}

.product-title {

    min-height:
        40px;

    color:
        var(--white);

    font-size: 12px;

    font-weight: 700;

    line-height: 1.65;

}

.product-rating {

    margin-top: 5px;

    display: flex;

    align-items: center;

    gap: 5px;

    color:
        var(--gold-4);

    font-size: 9px;

}

.product-rating span {

    color:
        #888;

}

.product-price {

    margin-top: 7px;

    color:
        #e42b50;

    font-size: 16px;

    font-weight: 800;

}

.product-old-price {

    margin-right: 5px;

    color:
        #666;

    font-size: 9px;

    text-decoration:
        line-through;

}

.product-actions {

    margin-top: 10px;

    display: flex;

    gap: 7px;

}

.product-action {

    flex: 1;

    min-height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius:
        10px;

    color:
        var(--gold-4);

    background:
        rgba(212,175,55,.04);

    border:
        1px solid var(--border-gold-soft);

    transition:
        var(--transition);

}

.product-action:hover {

    background:
        rgba(212,175,55,.1);

    border-color:
        var(--gold-3);

}

.product-action.cart {

    background:
        linear-gradient(
            135deg,
            rgba(212,175,55,.18),
            rgba(100,60,0,.08)
        );

}


/* ==========================================================================
   18 — CATEGORIES
   ========================================================================== */

.smart-categories-section {

    margin-top: 20px;

}

.categories-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

}

.category-card {

    position: relative;

    min-height: 145px;

    overflow: hidden;

    border:
        1px solid var(--border-gold-soft);

    border-radius:
        var(--radius-md);

    background:
        #080808;

    transition:
        var(--transition);

}

.category-card:hover {

    transform:
        translateY(-4px);

    border-color:
        var(--gold-3);

}

.category-card-image {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 20%,
            rgba(0,0,0,.95)
        );

}

.category-card-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: .68;

}

.category-card-content {

    position: absolute;

    inset:
        auto 11px 11px;

    z-index: 2;

}

.category-card-title {

    font-size: 13px;

    font-weight: 800;

}

.category-card-count {

    margin-top: 2px;

    color:
        #999;

    font-size: 9px;

}

.category-card-button {

    margin-top: 7px;

    padding:
        5px 10px;

    border:
        1px solid var(--gold-2);

    border-radius:
        9px;

    color:
        var(--gold-4);

    background:
        rgba(0,0,0,.5);

    font-size: 9px;

}


/* ==========================================================================
   19 — ORDER TRACKING
   ========================================================================== */

.order-tracking-card {

    padding:
        15px;

    border:
        1px solid var(--border-gold-soft);

    border-radius:
        var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(90,0,25,.08)
        );

    box-shadow:
        var(--shadow-gold);

}

.tracking-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.tracking-order-number {

    color:
        var(--gold-4);

    font-size: 15px;

    font-weight: 800;

}

.tracking-status {

    padding:
        5px 9px;

    border-radius:
        8px;

    color:
        #ffd4df;

    background:
        rgba(160,0,50,.2);

    border:
        1px solid rgba(160,0,50,.4);

    font-size: 9px;

}

.tracking-progress {

    margin-top: 20px;

    display: flex;

    align-items: center;

}

.tracking-step {

    position: relative;

    flex: 1;

    text-align: center;

}

.tracking-step::before {

    content: "";

    position: absolute;

    top: 13px;

    right: 50%;

    width: 100%;

    height: 2px;

    background:
        rgba(255,255,255,.08);

    z-index: -1;

}

.tracking-step:first-child::before {

    display: none;

}

.tracking-dot {

    width: 27px;
    height: 27px;

    margin:
        0 auto 6px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        #777;

    background:
        #111;

    border:
        1px solid #333;

}

.tracking-step.completed
.tracking-dot {

    color:
        var(--black-1);

    background:
        var(--gold-3);

    border-color:
        var(--gold-3);

}

.tracking-step.active
.tracking-dot {

    color:
        var(--white);

    background:
        var(--burgundy-3);

    border-color:
        var(--gold-3);

    box-shadow:
        0 0 15px rgba(212,175,55,.2);

}

.tracking-label {

    color:
        #888;

    font-size: 8px;

}

.tracking-step.completed
.tracking-label,
.tracking-step.active
.tracking-label {

    color:
        var(--gold-4);

}


/* ==========================================================================
   20 — QUICK SUGGESTIONS
   ========================================================================== */

.quick-suggestions {

    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding:
        15px 2px 8px;

}

.quick-suggestions::-webkit-scrollbar {

    display: none;

}

.suggestion-button {

    flex:
        0 0 auto;

    min-height: 37px;

    padding:
        7px 12px;

    display: flex;

    align-items: center;

    gap: 6px;

    color:
        var(--gold-4);

    background:
        rgba(70,0,20,.12);

    border:
        1px solid rgba(160,0,50,.45);

    border-radius:
        20px;

    font-size: 10px;

    transition:
        var(--transition);

}

.suggestion-button:hover {

    background:
        rgba(160,0,50,.2);

    border-color:
        var(--gold-3);

}

.suggestion-button i {

    color:
        var(--gold-3);

}


/* ==========================================================================
   21 — CHAT COMPOSER
   ========================================================================== */

.chat-composer-wrapper {

    position: fixed;

    bottom: 69px;

    left: 50%;

    width: min(540px, 100%);

    transform:
        translateX(-50%);

    z-index: 20;

    padding:
        9px 10px 7px;

    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(3,3,3,.94) 22%
        );

    backdrop-filter:
        blur(10px);

}

.chat-composer {

    min-height: 57px;

    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        5px;

    border:
        1px solid rgba(212,175,55,.28);

    border-radius:
        30px;

    background:
        rgba(20,20,20,.92);

    box-shadow:
        0 8px 35px rgba(0,0,0,.55);

}

.composer-button {

    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

}

.attach-button {

    color:
        var(--black-2);

    background:
        linear-gradient(
            135deg,
            var(--gold-4),
            var(--gold-2)
        );

    box-shadow:
        0 0 14px rgba(212,175,55,.12);

}

.input-wrapper {

    position: relative;

    flex: 1;

    min-width: 0;

}

.chat-input {

    width: 100%;

    min-height: 42px;
    max-height: 100px;

    padding:
        8px 7px;

    resize: none;

    border: 0;

    outline: 0;

    color:
        var(--white);

    background:
        transparent;

    font-size: 12px;

    line-height: 1.7;

}

.chat-input::placeholder {

    color:
        #666;

}

.input-counter {

    position: absolute;

    left: 4px;
    bottom: -1px;

    color:
        #555;

    font-size: 7px;

}

.send-button {

    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        white;

    background:
        linear-gradient(
            135deg,
            #9b002d,
            #4e0018
        );

    border:
        1px solid rgba(212,175,55,.25);

    box-shadow:
        0 0 20px rgba(160,0,50,.2);

    transition:
        var(--transition);

}

.send-button:hover {

    transform:
        scale(1.06);

    box-shadow:
        0 0 25px rgba(160,0,50,.35);

}

.send-button:active {

    transform:
        scale(.92);

}

.composer-footer {

    min-height: 18px;

    padding:
        3px 10px 0;

    display: flex;

    align-items: center;
    justify-content: space-between;

    color:
        #555;

    font-size: 7px;

}

.composer-ai-badge {

    display: flex;

    align-items: center;

    gap: 4px;

    color:
        var(--gold-3);

}


/* ==========================================================================
   22 — BOTTOM NAVIGATION
   ========================================================================== */

.bottom-navigation {

    position: fixed;

    bottom: 0;
    left: 50%;

    width: min(540px, 100%);

    height: 72px;

    transform:
        translateX(-50%);

    z-index: 30;

    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    align-items: center;

    padding:
        5px 5px 4px;

    background:
        rgba(5,5,5,.97);

    border-top:
        1px solid rgba(212,175,55,.18);

    box-shadow:
        0 -15px 35px rgba(0,0,0,.55);

    backdrop-filter:
        blur(20px);

}

.bottom-nav-item {

    position: relative;

    height: 62px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    color:
        #777;

    transition:
        var(--transition);

}

.nav-icon {

    position: relative;

    width: 35px;
    height: 35px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 17px;

}

.nav-label {

    font-size: 8px;

    white-space: nowrap;

}

.bottom-nav-item.active {

    color:
        var(--gold-4);

}

.bottom-nav-item.active
.nav-icon {

    color:
        var(--gold-4);

    border:
        1px solid var(--gold-3);

    background:
        radial-gradient(
            circle,
            rgba(212,175,55,.15),
            rgba(212,175,55,.025)
        );

    box-shadow:
        0 0 18px rgba(212,175,55,.15);

    transform:
        translateY(-5px);

}

.ai-nav-glow {

    position: absolute;

    inset: -6px;

    border-radius: 50%;

    border:
        1px solid rgba(212,175,55,.18);

    animation:
        navGlow 2.5s infinite;

}

@keyframes navGlow {

    0%,
    100% {
        opacity: .3;
        transform: scale(.9);
    }

    50% {
        opacity: .8;
        transform: scale(1.08);
    }

}

.cart-count {

    position: absolute;

    top: -4px;
    right: -4px;

    min-width: 17px;
    height: 17px;

    padding:
        0 4px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        white;

    background:
        #a90035;

    border:
        2px solid var(--black-2);

    font-size: 8px;

}


/* ==========================================================================
   23 — SIDE PANEL
   ========================================================================== */

.chat-side-panel {

    position: fixed;

    top: 0;
    bottom: 0;

    right: 0;

    z-index: 100;

    width:
        min(360px, 90%);

    padding:
        20px;

    background:
        linear-gradient(
            180deg,
            #0d0508,
            #030303
        );

    border-left:
        1px solid var(--border-gold);

    box-shadow:
        -20px 0 60px rgba(0,0,0,.65);

    transform:
        translateX(110%);

    transition:
        transform .4s cubic-bezier(.22,.61,.36,1);

}

.chat-side-panel.open {

    transform:
        translateX(0);

}

.side-panel-header {

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding-bottom:
        18px;

    border-bottom:
        1px solid rgba(255,255,255,.06);

}

.side-panel-header h2 {

    color:
        var(--gold-4);

    font-size: 20px;

}

.side-panel-close {

    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        var(--gold-4);

    background:
        rgba(255,255,255,.04);

    border:
        1px solid var(--border-gold-soft);

}

.new-chat-button {

    width: 100%;

    margin-top: 18px;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    color:
        var(--black-2);

    background:
        linear-gradient(
            135deg,
            var(--gold-4),
            var(--gold-2)
        );

    border-radius:
        var(--radius-sm);

    font-weight: 800;

}

.conversation-list {

    margin-top:
        20px;

}


/* ==========================================================================
   24 — OVERLAY
   ========================================================================== */

.app-overlay {

    position: fixed;

    inset: 0;

    z-index: 90;

    background:
        rgba(0,0,0,.7);

    backdrop-filter:
        blur(5px);

}


/* ==========================================================================
   25 — MODAL
   ========================================================================== */

.modal-layer {

    position: fixed;

    inset: 0;

    z-index: 200;

    display: flex;

    align-items: flex-end;
    justify-content: center;

}

.modal-backdrop {

    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,.78);

    backdrop-filter:
        blur(8px);

}

.product-modal {

    position: relative;

    z-index: 2;

    width:
        min(540px, 100%);

    max-height:
        92vh;

    overflow-y:
        auto;

    padding:
        20px;

    border:
        1px solid var(--border-gold);

    border-bottom: 0;

    border-radius:
        30px 30px 0 0;

    background:
        linear-gradient(
            180deg,
            #11070b,
            #030303
        );

    box-shadow:
        0 -20px 70px rgba(0,0,0,.75);

}

.modal-close {

    position: absolute;

    top: 12px;
    left: 12px;

    width: 40px;
    height: 40px;

    z-index: 5;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        var(--gold-4);

    background:
        rgba(0,0,0,.65);

    border:
        1px solid var(--border-gold-soft);

}


/* ==========================================================================
   26 — TOAST
   ========================================================================== */

.toast-container {

    position: fixed;

    top: 20px;
    left: 50%;

    z-index: 300;

    width:
        min(380px, calc(100% - 30px));

    transform:
        translateX(-50%);

    display: flex;

    flex-direction: column;

    gap: 8px;

}

.toast {

    padding:
        12px 15px;

    color:
        var(--white);

    background:
        rgba(20,10,13,.96);

    border:
        1px solid var(--border-gold);

    border-radius:
        var(--radius-sm);

    box-shadow:
        0 12px 35px rgba(0,0,0,.5);

    backdrop-filter:
        blur(15px);

    font-size: 11px;

    animation:
        toastIn .35s ease both;

}

@keyframes toastIn {

    from {
        opacity: 0;
        transform:
            translateY(-12px) scale(.96);
    }

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

}


/* ==========================================================================
   27 — LOADING
   ========================================================================== */

.ai-loading-overlay {

    position: fixed;

    inset: 0;

    z-index: 500;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    background:
        rgba(0,0,0,.88);

    backdrop-filter:
        blur(12px);

}

.loading-orb {

    position: relative;

    width: 90px;
    height: 90px;

    display: flex;

    align-items: center;
    justify-content: center;

}

.loading-ring {

    position: absolute;

    inset: 0;

    border:
        2px solid transparent;

    border-top-color:
        var(--gold-3);

    border-right-color:
        var(--burgundy-3);

    border-radius: 50%;

    animation:
        loadingSpin 1s linear infinite;

}

@keyframes loadingSpin {

    to {
        transform:
            rotate(360deg);
    }

}

.loading-icon {

    width: 55px;
    height: 55px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color:
        var(--gold-4);

    background:
        radial-gradient(
            circle,
            rgba(212,175,55,.15),
            #080808
        );

    border:
        1px solid var(--gold-2);

}

.loading-text {

    margin-top:
        15px;

    color:
        var(--gold-4);

    font-size: 11px;

}


/* ==========================================================================
   28 — EMPTY / HIDDEN
   ========================================================================== */

[hidden] {

    display: none !important;

}


/* ==========================================================================
   29 — TABLET / DESKTOP
   ========================================================================== */

@media (min-width: 700px) {

    .ai-assistant-app {

        padding:
            20px;

    }

    .chat-shell {

        min-height:
            calc(100vh - 40px);

        max-height:
            calc(100vh - 40px);

        border:
            1px solid var(--border-gold-soft);

        border-radius:
            32px;

    }

    .chat-composer-wrapper {

        bottom:
            calc(20px + 69px);

        width:
            538px;

    }

    .bottom-navigation {

        bottom:
            20px;

        width:
            538px;

        border:
            1px solid var(--border-gold-soft);

        border-radius:
            25px;

    }

}


/* ==========================================================================
   30 — SMALL MOBILE
   ========================================================================== */

@media (max-width: 360px) {

    .brand-logo {

        font-size:
            29px;

    }

    .brand-subtitle {

        font-size:
            9px;

    }

    .header-action {

        width:
            45px;

        height:
            45px;

        flex-basis:
            45px;

    }

    .ai-status-bar {

        padding:
            7px 9px;

    }

    .ai-security-status {

        font-size:
            9px;

    }

    .product-card {

        flex-basis:
            165px;

    }

    .nav-label {

        font-size:
            7px;

    }

}


/* ==========================================================================
   31 — REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;

        transition-duration:
            .01ms !important;

    }

}


/* ==========================================================================
   V4 AI AGENT — Smart Commerce Cards
   ========================================================================== */
.ai-comparison-card{
    margin:14px 0;
    padding:16px;
    border:1px solid rgba(212,175,55,.22);
    border-radius:22px;
    background:linear-gradient(145deg,rgba(20,9,14,.94),rgba(7,7,10,.96));
    box-shadow:0 14px 50px rgba(0,0,0,.28);
}
.ai-comparison-card h3{margin:0 0 12px;font-size:15px}
.comparison-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.comparison-item{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.025)}
.comparison-item img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:12px}
.comparison-item strong{font-size:13px;line-height:1.5}
.comparison-item span{color:#f1df9a;font-weight:800}
.comparison-item small{opacity:.65}
.ai-welcome.has-conversation{opacity:.35;transform:scale(.98);max-height:220px;overflow:hidden;transition:.35s ease}
@media(max-width:520px){
  .comparison-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* ==========================================================================
   99 — FLOATING BUBBLE LAUNCHER (chat_bubble_launcher.php - كل صفحات المتجر)
   -------------------------------------------------------------------------
   [مضاف] هذه الكلاسات كانت مفقودة تمامًا من هذا الملف رغم أن
   chat_bubble_launcher.php يعتمد عليها (ورغم أن INTEGRATION_NOTES.md
   يذكر أنها أُضيفت) - هذا هو السبب الفعلي المؤكد لاختفاء الأيقونة
   العائمة من كل صفحات المتجر: الرابط <a> كان يُطبع فعليًا بالـ HTML
   لكن بلا أي تنسيق إطلاقًا (بلا position: fixed، بلا حجم، بلا خلفية)
   فيظهر كنص عادي مدفون بمكانه بالصفحة ولا يبدو كأيقونة عائمة.
   ========================================================================== */

.ai-chat-bubble-launcher {
    position: fixed;
    bottom: 90px;
    inset-inline-end: 18px;
    z-index: 9999;
    display: block;
    text-decoration: none;
}

.ai-chat-bubble-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: linear-gradient(135deg, var(--burgundy-2), var(--black-2));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-gold), 0 6px 20px rgba(0, 0, 0, .5);
    transition: var(--transition);
}

.ai-chat-bubble-launcher:hover .ai-chat-bubble-btn {
    transform: translateY(-3px);
    box-shadow: var(--shadow-red), 0 10px 26px rgba(0, 0, 0, .55);
    border-color: var(--gold-3);
}

.ai-chat-bubble-btn img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-3);
    flex-shrink: 0;
}

.ai-bubble-icon-label {
    color: var(--white);
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* على الجوال: نلصقها فوق شريط التنقل السفلي، ونقلّص الشكل لدائرة بلا نص
   حتى لا تتزاحم مع الشريط أو تحجب المحتوى */
@media (max-width: 480px) {
    .ai-chat-bubble-launcher {
        bottom: 78px;
        inset-inline-end: 12px;
    }

    .ai-bubble-icon-label {
        display: none;
    }

    .ai-chat-bubble-btn {
        padding: 8px;
        border-radius: 50%;
    }
}
