:root {
  --ink: #00143f;
  --ink-soft: #33435f;
  --muted: #5b6b86;
  --line: #dce8f5;
  --canvas: #f7fcff;
  --white: #fff;
  --brand: #075bff;
  --brand-dark: #0048cc;
  --cyan: #08dce9;
  --ice: #dff7ff;
  --ice-light: #eef7ff;
  --gold: #edc488;
  --danger: #b84d4d;
  --shadow: 0 18px 55px rgba(0, 20, 63, .08);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font-family: "Segoe UI", Tahoma, Arial, sans-serif; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
svg { width: 1em; height: 1em; flex: 0 0 auto; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #5bcdff; outline-offset: 3px; }
[hidden], .icon-library { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.content-width { width: min(100% - 64px, 1240px); margin-inline: auto; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.screen { display: none; }
.screen.active, .screen.is-active { display: block; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(0, 20, 63, .075); background: rgba(255,255,255,.95); backdrop-filter: blur(20px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 42px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 11px; background: var(--ink); transform: rotate(-8deg); }
.brand-mark span { position: absolute; width: 7px; border-radius: 8px; background: var(--ice); transform: rotate(32deg); }
.brand-mark span:nth-child(1) { height: 19px; right: 8px; bottom: 5px; }
.brand-mark span:nth-child(2) { height: 23px; right: 15px; bottom: 8px; background: var(--cyan); }
.brand-mark span:nth-child(3) { height: 18px; right: 22px; bottom: 12px; }
.brand-copy { display: flex; align-items: baseline; gap: 7px; letter-spacing: -.03em; }
.brand-copy strong { font-family: Arial, sans-serif; font-size: 21px; letter-spacing: -.055em; font-weight: 900; }
.brand-copy small { font-size: 13px; font-weight: 800; }
.primary-nav { display: flex; align-items: stretch; gap: 6px; align-self: stretch; margin-inline-start: 26px; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 15px; border: 0; background: transparent; color: #5b6b86; font-size: 14px; font-weight: 700; white-space: nowrap; }
.nav-link::after { position: absolute; right: 15px; left: 15px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand); content: ""; opacity: 0; transform: scaleX(.5); transition: .2s; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after { opacity: 1; transform: scaleX(1); }
.nav-link .icon { font-size: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-link .icon-spark { fill: currentColor; stroke: none; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 20px; }
.demo-badge { color: var(--muted); border: 1px solid #dce8f5; background: #f3f8ff; border-radius: 999px; padding: 5px 10px; font-size: 11px; white-space: nowrap; }
.cart-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 7px 0; border: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 800; }
.cart-trigger .icon { font-size: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.cart-count { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--ink); color: white; font-size: 11px; font-family: Arial, sans-serif; line-height: 1; }

/* Shared controls */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--brand-dark); font-size: 12px; font-weight: 800; letter-spacing: .01em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(8,220,233,.15); }
.btn { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 12px; padding: 10px 17px; font-size: 13px; font-weight: 800; line-height: 1.3; text-decoration: none; transition: transform .18s, box-shadow .18s, background .18s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn .icon { font-size: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn .icon-spark { fill: currentColor; stroke: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: white; box-shadow: 0 9px 22px rgba(7,91,255,.20); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--brand-dark), #003bab); box-shadow: 0 12px 28px rgba(7,91,255,.28); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover:not(:disabled) { background: #0b2552; }
.btn-ghost { border-color: #cfdfef; color: var(--ink); background: white; }
.btn-ghost:hover:not(:disabled) { background: var(--ice-light); border-color: #94c8f7; }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--brand-dark); background: none; font-weight: 800; }
.text-link .icon { font-size: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Entry */
.is-home .primary-nav, .is-home .cart-trigger { display: none; }
#entry-screen { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 0, rgba(193,230,255,.5), transparent 34%), var(--canvas); }
.entry-content { padding-top: clamp(35px, 4vw, 58px); padding-bottom: 54px; }
.entry-intro { max-width: 850px; margin-inline: auto; text-align: center; }
.entry-intro .eyebrow { justify-content: center; }
.entry-intro h1 { margin: 8px 0 10px; font-size: clamp(42px, 4.6vw, 63px); line-height: 1.2; letter-spacing: -.055em; font-weight: 900; }
.entry-intro h1 span { color: var(--brand); }
.entry-intro p { margin: 0; color: var(--ink-soft); font-size: clamp(14px, 1.35vw, 17px); line-height: 1.75; }
.route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
.route-card { min-height: 366px; display: flex; flex-direction: column; align-items: stretch; overflow: hidden; text-align: right; border: 1px solid #cbdff3; border-radius: 25px; padding: 26px; color: var(--ink); background: white; box-shadow: 0 18px 38px rgba(0,20,63,.06); transition: transform .22s, box-shadow .22s, border-color .22s; }
.route-card:hover { transform: translateY(-4px); border-color: #80baff; box-shadow: 0 24px 50px rgba(0,20,63,.13); }
.route-card-ai { border-color: #0b2552; color: white; background: linear-gradient(130deg, #00143f 0%, #0b2552 62%, #075bff 100%); }
.route-card-ai:hover { border-color: #08dce9; }
.route-card-browse { background: linear-gradient(150deg, #fff 36%, #eef7ff 100%); }
.route-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.route-icon { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; background: var(--ice-light); color: var(--brand); }
.route-icon .icon { font-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.route-card-ai .route-icon { color: #e0f7fb; background: rgba(255,255,255,.14); }
.route-card-ai .route-icon .icon { fill: currentColor; stroke: none; }
.route-number { color: #536b94; font-size: 12px; font-weight: 800; }
.route-card-ai .route-number { color: #c8eaff; }
.route-text { display: flex; flex-direction: column; margin-top: 17px; }
.route-text strong { font-size: clamp(25px, 2.4vw, 31px); font-weight: 900; letter-spacing: -.04em; line-height: 1.45; }
.route-text > span:last-child { max-width: 465px; margin-top: 5px; color: #5b6b86; font-size: 14px; line-height: 1.75; }
.route-card-ai .route-text > span:last-child { color: #dbeeff; }
.route-preview { min-height: 85px; display: flex; margin-top: 16px; }
.route-preview-ai { flex-direction: column; align-items: flex-start; gap: 7px; }
.preview-question, .preview-answer { display: inline-flex; align-items: center; gap: 6px; border-radius: 11px; padding: 7px 11px; font-size: 12px; font-weight: 700; }
.preview-question { color: #e8f7fd; background: rgba(255,255,255,.13); }
.preview-answer { align-self: flex-end; color: #00143f; background: #def4fc; }
.preview-answer .icon { fill: currentColor; }
.route-preview-browse { align-items: center; gap: 7px; }
.preview-phone { width: 74px; height: 76px; display: grid; place-items: center; border-radius: 11px; background: #e8f2ff; }
.preview-phone img { width: 70px; height: 70px; object-fit: contain; }
.preview-stock { margin-inline-start: auto; color: #334b72; font-size: 13px; font-weight: 800; line-height: 1.55; }
.route-cta { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; border-radius: 13px; padding: 11px 16px; color: white; background: var(--ink); font-size: 15px; font-weight: 900; }
.route-card-ai .route-cta { color: #00143f; background: white; }
.route-cta .icon { font-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.route-card:hover .route-cta .icon { transform: translateX(-4px); }

/* Store */
.store-content { padding-top: 50px; padding-bottom: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.section-heading h2, .assistant-heading h2 { margin: 8px 0 6px; font-size: clamp(29px, 3.1vw, 40px); line-height: 1.3; letter-spacing: -.04em; font-weight: 900; }
.section-heading p, .assistant-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.arrow-inline { margin-inline-start: 12px; }
.catalog-toolbar { display: flex; align-items: center; gap: 13px; margin-top: 32px; margin-bottom: 23px; }
.search-field { min-height: 51px; flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 17px; border: 1px solid var(--line); border-radius: 13px; background: white; color: #8194ad; transition: border-color .18s, box-shadow .18s; }
.search-field:focus-within { border-color: #559bff; box-shadow: 0 0 0 3px rgba(7,91,255,.11); }
.search-field .icon { font-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-field input { width: 100%; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 13px; }
.search-field input::placeholder { color: var(--muted); }
.sort-field { min-height: 51px; display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: white; white-space: nowrap; font-size: 12px; color: var(--muted); }
.sort-field select { max-width: 170px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.catalog-grid:empty::before { content: "جارٍ تجهيز المنتجات..."; grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--muted); }
.product-card { min-width: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e2ebf6; border-radius: 18px; background: white; box-shadow: 0 6px 20px rgba(0,20,63,.025); transition: transform .2s, box-shadow .2s, border-color .2s; }
.product-card:hover { transform: translateY(-4px); border-color: #9ec5f5; box-shadow: 0 16px 33px rgba(0,20,63,.09); }
.product-art { min-height: 226px; position: relative; display: grid; place-items: center; overflow: hidden; padding: 22px; background: #edf5fd; }
.product-card:nth-child(4n+2) .product-art { background: #eef3fa; }
.product-card:nth-child(4n+3) .product-art { background: #f1f7fc; }
.product-card:nth-child(4n+4) .product-art { background: #e8f4fc; }
.product-art img { display: block; width: 100%; height: 180px; object-fit: contain; filter: drop-shadow(7px 11px 12px rgba(0,20,63,.14)); transition: transform .3s; }
.product-card:hover .product-art img { transform: scale(1.05); }
.product-meta { flex: 1; display: grid; grid-template-columns: 1fr auto; align-content: start; align-items: start; gap: 0 6px; min-width: 0; padding: 15px 17px 0; }
.product-meta .eyebrow { color: var(--brand-dark); font-size: 10px; }
.product-meta .product-tag { justify-self: start; }
.stock-dot { color: #007e6b; font-size: 10px; white-space: nowrap; }
.stock-dot::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-inline-end: 4px; border-radius: 50%; background: #00a98f; vertical-align: middle; }
.product-title { grid-column: 1 / -1; margin: 11px 0 0; font-size: 17px; font-weight: 900; line-height: 1.5; }
.product-meta > p { grid-column: 1 / -1; min-height: 38px; margin: 3px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.product-price { grid-column: 1 / -1; display: block; margin: 0; color: var(--brand-dark); font-size: 19px; font-weight: 900; line-height: 1.4; }
.product-price small { font-size: 12px; font-weight: 700; }
.product-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; min-height: 30px; margin-top: 10px; padding: 0; }
.product-tags span, .product-tag, .availability-tag { display: inline-block; padding: 4px 7px; border-radius: 6px; background: #edf5ff; color: #4e6890; font-size: 10px; font-weight: 700; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; padding: 10px 17px 17px; }
.product-actions .btn { min-height: 36px; padding: 7px; font-size: 10px; border-radius: 8px; }
.product-actions button { min-width: 0; }
.store-note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 35px; color: #647894; font-size: 13px; }
.store-note > .icon { margin-inline-end: 4px; color: var(--brand); font-size: 16px; fill: currentColor; }

/* Assistant */
.assistant-content { padding-top: 35px; padding-bottom: 50px; }
.assistant-heading { margin-bottom: 23px; }
.assistant-heading h2 { font-size: clamp(25px, 2.5vw, 33px); margin-top: 6px; }
.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr) 278px; gap: 19px; align-items: start; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; height: min(740px, calc(100vh - 226px)); min-height: 555px; overflow: hidden; border: 1px solid #dce8f5; border-radius: 20px; background: white; box-shadow: var(--shadow); }
.chat-header { min-height: 71px; display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid #e6eff8; background: #fff; }
.assistant-avatar { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 13px; color: #effaff; background: linear-gradient(135deg, var(--ink), var(--brand)); }
.assistant-avatar .icon { font-size: 22px; fill: currentColor; }
.chat-header-copy { display: flex; flex-direction: column; gap: 0; }
.chat-header-copy strong { font-size: 14px; font-weight: 900; }
.chat-header-copy span { color: var(--muted); font-size: 11px; }
.online-dot { display: inline-block; width: 6px; height: 6px; margin-inline-end: 3px; border-radius: 50%; background: #00a98f; }
.chat-demo-tag { margin-inline-start: auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 10px; }
.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding: 22px 22px 30px; overscroll-behavior: contain; background: radial-gradient(circle at 11% 19%, rgba(212,239,255,.38), transparent 32%), #f8fcff; scrollbar-color: #c7d9ee transparent; scrollbar-width: thin; }
.chat-messages > .chat-bubble:first-child { margin-top: auto; }
.chat-bubble { width: fit-content; max-width: min(85%, 620px); padding: 12px 16px; border-radius: 15px; font-size: 13px; line-height: 1.85; word-break: break-word; }
.chat-bubble p { margin: 0; }
.chat-bubble p + p { margin-top: 6px; }
.chat-bubble.assistant { align-self: flex-start; border: 1px solid #e2ebf6; border-top-right-radius: 5px; color: #233752; background: white; box-shadow: 0 4px 15px rgba(0,20,63,.035); }
.chat-bubble.assistant:has(.chat-product-list), .chat-bubble.assistant:has(.compare-scroll) { width: min(100%, 910px); max-width: 100%; }
.chat-bubble.user { align-self: flex-end; border-top-left-radius: 5px; color: white; background: #075bff; }
.chat-bubble.user img { max-width: 250px; border-radius: 8px; }
.message-image { max-width: min(100%, 280px); max-height: 250px; display: block; border-radius: 9px; object-fit: cover; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; }
.chat-chip { min-height: 31px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid #dce8f5; border-radius: 999px; color: #174a99; background: #f3f8ff; font-size: 11px; font-weight: 700; line-height: 1.4; transition: background .18s, border-color .18s; }
.chat-chip:hover { border-color: #8dbfff; background: #e8f5ff; }
.chat-composer-area { flex: 0 0 auto; padding-top: 12px; border-top: 1px solid #e6eff8; background: white; }
.chat-composer { display: flex; align-items: end; gap: 8px; min-height: 55px; margin: 0 15px; padding: 6px 6px 6px 12px; border: 1px solid #cfdfef; border-radius: 13px; background: #f9fcff; transition: border-color .18s, box-shadow .18s; }
.chat-composer:focus-within { border-color: #72afff; box-shadow: 0 0 0 3px rgba(7,91,255,.09); }
.chat-composer textarea { flex: 1; max-height: 130px; min-height: 40px; resize: none; padding: 8px 5px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; line-height: 1.6; }
.chat-composer textarea::placeholder { color: var(--muted); }
.composer-actions { display: flex; align-items: center; gap: 3px; }
.composer-icon-button { width: 34px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #7083a1; background: transparent; transition: background .18s, color .18s; }
.composer-icon-button:hover, .composer-icon-button.recording { color: var(--brand-dark); background: var(--ice-light); }
.composer-icon-button.listening { color: #b04242; background: #fde9e7; box-shadow: 0 0 0 4px rgba(176,66,66,.1); }
.composer-icon-button .icon { font-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.send-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; color: white; background: var(--brand); transition: background .18s, transform .18s; }
.send-button:hover { background: var(--brand-dark); transform: translateY(-2px); }
.send-button .icon { font-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.composer-caption { padding: 8px 15px 10px; text-align: center; color: var(--muted); font-size: 10px; }
.assistant-aside { display: flex; flex-direction: column; gap: 13px; }
.is-assistant .app-shell { height: 100dvh; min-height: 0; }
.is-assistant main { min-height: 0; }
.is-assistant #assistant-screen { height: 100%; overflow: hidden; }
.is-assistant .assistant-content { height: 100%; display: flex; flex-direction: column; padding-top: 16px; padding-bottom: 16px; }
.is-assistant .assistant-heading { margin-bottom: 12px; }
.is-assistant .assistant-heading .eyebrow, .is-assistant .assistant-heading p { display: none; }
.is-assistant .assistant-heading h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.is-assistant .assistant-layout { flex: 1; min-height: 0; align-items: stretch; }
.is-assistant .chat-panel { height: 100%; min-height: 0; }
.is-assistant .assistant-aside { min-height: 0; overflow-y: auto; }
.is-assistant .site-footer { display: none; }
.aside-card { border: 1px solid var(--line); border-radius: 16px; background: white; }
.aside-intro { padding: 21px; }
.aside-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--brand); background: #e8f5ff; }
.aside-icon .icon { font-size: 21px; fill: currentColor; }
.aside-intro h3 { margin: 13px 0 2px; font-size: 16px; font-weight: 900; }
.aside-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.aside-divider { height: 1px; margin: 18px 0; background: #e2ebf6; }
.capability-list { display: flex; flex-direction: column; gap: 14px; padding: 0; margin: 0; list-style: none; }
.capability-list li { display: flex; align-items: center; gap: 8px; color: #33435f; font-size: 12px; font-weight: 700; }
.capability-list li span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: #e8f5ff; }
.capability-list li .icon { font-size: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.aside-tip { display: flex; gap: 11px; padding: 17px; color: #4b6285; background: #eef7ff; border-color: #dce8f5; }
.aside-tip > .icon { margin-top: 3px; color: #075bff; font-size: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.aside-tip strong { display: block; color: #0b4bb8; font-size: 12px; }
.aside-tip p { margin: 3px 0 0; font-size: 11px; line-height: 1.75; }

/* Dynamic chat components */
.chat-product-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; width: 100%; margin-top: 10px; }
.chat-product-card { min-width: 0; width: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dce8f5; border-radius: 12px; background: white; }
.chat-product-card img { width: 100%; height: 120px; object-fit: contain; padding: 13px; background: #edf5fd; }
.chat-product-card > div, .chat-product-card .chat-product-info { padding: 10px; }
.chat-product-card strong { display: block; font-size: 12px; line-height: 1.5; }
.chat-product-card p { margin: 3px 0; color: var(--muted); font-size: 11px; }
.chat-product-card small { display: block; min-height: 30px; color: var(--muted); font-size: 10px; }
.chat-product-card b { display: block; color: var(--brand-dark); font-size: 13px; }
.chat-product-card span { display: block; color: #557099; font-size: 10px; }
.chat-product-card .product-price { font-size: 14px; }
.chat-product-card .chat-actions { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-actions .btn, .chat-product-card .btn { min-height: 32px; padding: 6px 9px; border-radius: 7px; font-size: 10px; }
.compare-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.compare-table { width: 100%; min-width: 490px; border-collapse: collapse; background: white; font-size: 12px; }
.compare-table th, .compare-table td { padding: 10px 12px; border-bottom: 1px solid #e2ebf6; text-align: right; vertical-align: top; }
.compare-table th { background: #eef7ff; color: #334b72; font-weight: 900; }
.compare-table tr:last-child td { border-bottom: 0; }
.detail-card, .checkout-card { width: min(100%, 570px); padding: 16px; border: 1px solid #dce8f5; border-radius: 13px; background: white; box-shadow: 0 7px 19px rgba(0,20,63,.04); font-size: 12px; }
.detail-card:has(.product-art) { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 17px; align-items: start; }
.detail-card .product-art { min-height: 190px; border-radius: 11px; }
.detail-card .product-art img { height: 150px; }
.detail-card .product-price { margin: 6px 0; }
.spec-list { display: grid; gap: 0; margin: 12px 0; border-top: 1px solid var(--line); }
.spec-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 800; text-align: left; }
.detail-card h3, .checkout-card h3 { margin: 0 0 9px; font-size: 16px; }
.detail-card p, .checkout-card p { margin: 0 0 10px; color: #5b6b86; }
.detail-card ul, .checkout-card ul { margin: 7px 0; padding-inline-start: 18px; }
.checkout-card label { display: block; margin-top: 10px; font-weight: 800; }
.checkout-card input, .checkout-card select, .checkout-card textarea { width: 100%; margin-top: 5px; padding: 10px 11px; border: 1px solid #dce8f5; border-radius: 8px; color: var(--ink); background: white; }
.checkout-card .btn { margin-top: 12px; }
.demo-note { margin: 8px 0 0 !important; color: var(--muted) !important; font-size: 10px !important; line-height: 1.7; }
.empty-state { padding: 35px 15px; color: var(--muted); text-align: center; font-size: 13px; }
.catalog-grid > .empty-state { grid-column: 1 / -1; }

/* Cart, overlays, feedback */
.cart-drawer { position: fixed; z-index: 100; inset: 0; visibility: hidden; pointer-events: none; }
.cart-drawer.open, .cart-drawer.active, .cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.cart-scrim { position: absolute; inset: 0; background: rgba(0,20,63,.37); opacity: 0; transition: opacity .25s; }
.cart-drawer.open .cart-scrim, .cart-drawer.active .cart-scrim, .cart-drawer.is-open .cart-scrim { opacity: 1; }
.cart-panel { position: absolute; inset-block: 0; left: 0; width: min(100%, 440px); display: flex; flex-direction: column; background: white; box-shadow: 15px 0 45px rgba(0,20,63,.12); transform: translateX(-105%); transition: transform .28s ease; }
.cart-drawer.open .cart-panel, .cart-drawer.active .cart-panel, .cart-drawer.is-open .cart-panel { transform: translateX(0); }
.cart-head { display: flex; align-items: start; justify-content: space-between; padding: 24px 25px 19px; border-bottom: 1px solid var(--line); }
.panel-kicker { color: var(--brand); font-size: 11px; font-weight: 800; }
.cart-head h2 { display: flex; align-items: center; gap: 7px; margin: 2px 0 0; font-size: 22px; }
.cart-head h2 .icon { font-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dce8f5; border-radius: 9px; background: #f7fcff; color: #667b99; }
.icon-close .icon { font-size: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.cart-items { flex: 1; overflow-y: auto; padding: 15px 24px; }
.cart-items:empty::before { content: "سلتك فاضية للحين. اختر الجوال اللي يناسبك."; display: block; padding: 55px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #e6eff8; font-size: 12px; }
.cart-item > div:first-child { flex: 1; min-width: 0; }
.cart-item img { width: 64px; height: 64px; object-fit: contain; padding: 6px; border-radius: 10px; background: #edf5fd; }
.cart-item strong { display: block; font-size: 13px; }
.cart-item p { margin: 2px 0; color: var(--muted); }
.cart-item small { display: block; margin-top: 4px; color: var(--brand-dark); font-size: 11px; font-weight: 800; }
.cart-item-actions { display: flex; align-items: center; gap: 4px; }
.cart-item-actions .btn { min-width: 26px; min-height: 27px; padding: 3px 5px; font-size: 11px; border-radius: 6px; }
.cart-item-actions .btn:last-child { color: var(--danger); }
.cart-item-actions span { min-width: 14px; text-align: center; font-weight: 800; }
.cart-bottom { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.subtotal-row { display: flex; justify-content: space-between; font-size: 14px; }
.subtotal-row strong { font-size: 20px; }
.cart-bottom p { margin: 6px 0 16px; color: var(--muted); font-size: 11px; }
.cart-checkout { width: 100%; }
.toast-root { position: fixed; z-index: 130; left: 22px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; max-width: min(390px, calc(100vw - 44px)); pointer-events: none; }
.toast { padding: 12px 16px; border: 1px solid #c8e1f9; border-radius: 11px; color: #0b4bb8; background: white; box-shadow: 0 10px 30px rgba(0,20,63,.12); font-size: 12px; font-weight: 700; pointer-events: auto; }
.toast.error { color: #8c3e3e; border-color: #f0d1d1; }
#modal-root:empty { display: none; }
#modal-root:not(:empty) { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(0,20,63,.42); }
#modal-root > * { max-width: min(100%, 700px); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 17px; background: white; box-shadow: 0 25px 75px rgba(0,20,63,.19); }
.modal-panel { width: min(100%, 660px); padding: 21px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.modal-head .btn { min-width: 31px; min-height: 31px; padding: 3px; font-size: 19px; line-height: 1; }
.modal-panel > .detail-card, .modal-panel > .checkout-card { width: 100%; border: 0; padding: 0; box-shadow: none; }
.modal-panel > .compare-scroll { margin: 4px 0 10px; }

/* Footer */
.site-footer { border-top: 1px solid #dce8f5; background: #fff; }
.site-footer .content-width { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; }

@media (max-width: 1050px) {
  .header-inner { gap: 20px; }
  .primary-nav { margin-inline-start: 0; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .content-width { width: min(100% - 32px, 1240px); }
  .header-inner { min-height: 65px; gap: 14px; }
  .brand-copy strong { font-size: 19px; }
  .brand-copy small, .demo-badge, .cart-label { display: none; }
  .primary-nav { gap: 0; }
  .nav-link { padding: 0 10px; font-size: 12px; }
  .header-actions { gap: 8px; }
  .route-grid { gap: 14px; }
  .route-card { min-height: 350px; padding: 22px; }
  .route-preview { min-height: 75px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assistant-layout { grid-template-columns: 1fr; }
  .assistant-aside { display: none; }
  .chat-panel { height: min(740px, calc(100vh - 205px)); }
}
@media (max-width: 600px) {
  .content-width { width: min(100% - 28px, 1240px); }
  .site-header { position: sticky; }
  .header-inner { min-height: 60px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy strong { font-size: 17px; }
  .primary-nav { margin-inline-start: auto; }
  .nav-link { padding: 0 7px; font-size: 11px; }
  .nav-link-home { display: none; }
  .nav-link .icon { display: none; }
  .cart-trigger .icon { font-size: 20px; }
  .cart-count { min-width: 18px; height: 18px; font-size: 10px; }
  .entry-content { padding-top: 25px; padding-bottom: 27px; }
  .entry-intro h1 { font-size: clamp(31px, 8vw, 40px); }
  .entry-intro p { font-size: 12px; line-height: 1.65; }
  .route-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 19px; }
  .route-card { min-height: 222px; padding: 17px; border-radius: 20px; }
  .route-icon { width: 34px; height: 34px; border-radius: 10px; }
  .route-icon .icon { font-size: 19px; }
  .route-number { font-size: 11px; }
  .route-text { margin-top: 9px; }
  .route-text strong { font-size: 22px; }
  .route-text > span:last-child { margin-top: 3px; font-size: 12px; line-height: 1.55; }
  .route-preview { display: none; }
  .route-cta { min-height: 42px; margin-top: 14px; padding: 9px 12px; font-size: 13px; }
  .route-cta .icon { font-size: 17px; }
  .store-content { padding-top: 33px; }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; }
  .section-heading h2 { font-size: 29px; }
  .section-heading .btn { width: 100%; }
  .catalog-toolbar { flex-wrap: wrap; margin-top: 22px; }
  .search-field { flex-basis: 100%; }
  .sort-field { width: 100%; justify-content: space-between; }
  .catalog-grid { gap: 9px; }
  .product-art { min-height: 155px; padding: 12px; }
  .product-art img { height: 138px; }
  .product-meta { padding: 11px 10px 5px; }
  .product-title { margin: 7px 0 0; font-size: 13px; }
  .product-meta p { min-height: 46px; font-size: 10px; }
  .product-price { margin: 0; font-size: 15px; }
  .product-price small { font-size: 10px; }
  .product-tags { gap: 3px; min-height: 30px; padding: 0; }
  .product-tags span { font-size: 9px; }
  .product-actions { gap: 5px; padding: 8px 10px 10px; }
  .product-actions .btn { width: 100%; }
  .assistant-content { padding-top: 23px; padding-bottom: 22px; }
  .assistant-heading { margin-bottom: 14px; }
  .assistant-heading h2 { font-size: 24px; }
  .assistant-heading p { font-size: 12px; }
  .chat-panel { height: calc(100dvh - 195px); min-height: 460px; border-radius: 15px; }
  .chat-header { min-height: 60px; padding: 9px 13px; }
  .chat-demo-tag { display: none; }
  .chat-messages { padding: 16px 12px 20px; gap: 11px; }
  .chat-bubble { max-width: 93%; padding: 10px 12px; font-size: 12px; }
  .chat-bubble.assistant:has(.chat-product-list), .chat-bubble.assistant:has(.compare-scroll) { width: 100%; }
  .chat-product-list { grid-template-columns: 1fr; }
  .chat-product-card { display: grid; grid-template-columns: 78px minmax(0,1fr); }
  .chat-product-card img { width: 78px; height: 100%; min-height: 110px; grid-row: span 2; }
  .chat-product-card .chat-actions { grid-column: 2; margin: 0; }
  .chat-suggestions { flex-wrap: nowrap; overflow-x: auto; padding: 0 10px 9px; scrollbar-width: none; }
  .chat-suggestions::-webkit-scrollbar { display: none; }
  .chat-chip { white-space: nowrap; }
  .chat-composer { margin: 0 8px; padding-inline-start: 8px; }
  .chat-composer textarea { font-size: 12px; }
  .composer-icon-button { width: 30px; }
  .composer-caption { font-size: 9px; }
  .site-footer .content-width { justify-content: center; flex-wrap: wrap; min-height: 48px; padding: 8px 0; text-align: center; }
  .detail-card:has(.product-art) { grid-template-columns: 1fr; }
  .detail-card .product-art { min-height: 145px; }
  .detail-card .product-art img { height: 130px; }
  .modal-panel { padding: 16px; }
  .cart-item { align-items: start; flex-direction: column; }
  .cart-item-actions { align-self: flex-start; }
}
@media (max-width: 390px) {
  .brand { gap: 5px; }
  .brand-copy strong { font-size: 15px; }
  .nav-link { padding: 0 5px; font-size: 10px; }
  .route-number { font-size: 10px; }
  .route-text strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
