:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #69756e;
  --paper: #f7f8f4;
  --white: #fff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: var(--blue);
  --green-dark: var(--blue-dark);
  --mint: #dbeafe;
  --line: #e7ebe6;
  --coral: #f2a07c;
  font-family: system-ui, "Noto Sans Arabic", Tahoma, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }

.announcement {
  padding: 9px 16px;
  background: var(--blue);
  color: white;
  text-align: center;
  font-size: .88rem;
}
.site-header, main, .site-footer, .topbar-inner { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.topbar { background: #eff6ff; color: #334155; font-size: .78rem; }
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-inner p { margin: 0; }
.topbar-inner a { color: var(--blue-dark); font-weight: 700; direction: ltr; }
.site-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; background: var(--blue); color: white; }
.store-logo { width: 37px; height: 37px; object-fit: contain; border-radius: 8px; }
.main-navigation { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 17px; color: #475569; font-size: .79rem; }
.main-navigation > a:hover, .footer-links a:hover { color: var(--blue); }
.cart-link { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: white; color: var(--blue-dark); font-weight: 700; }
.cart-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-size: .7rem; }

.hero {
  min-height: 390px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 26px;
  padding: 42px clamp(24px, 7vw, 82px);
  background: linear-gradient(115deg, #eff6ff 0%, #dbeafe 62%, #bfdbfe 100%);
  isolation: isolate;
}
.hero.has-image { background-position: center; background-size: cover; }
.hero.has-image::before { position: absolute; content: ""; inset: 0; background: linear-gradient(90deg, rgba(15, 39, 86, .78), rgba(15, 39, 86, .12)); z-index: -1; }
.hero-copy { position: relative; z-index: 2; max-width: 520px; }
.eyebrow { color: var(--blue-dark); font-weight: 700; font-size: .82rem; margin: 0 0 9px; }
.hero.has-image .eyebrow, .hero.has-image h1, .hero.has-image #hero-description { color: white; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.28; margin: 0 0 12px; letter-spacing: -.04em; }
.hero-copy > p:not(.eyebrow) { max-width: 410px; margin: 0; color: #50645a; line-height: 1.9; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; padding: 0 22px; font-weight: 600; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border: 1px solid #bfdbfe; background: #eff6ff; color: var(--blue-dark); }
.button-secondary:hover { background: #dbeafe; }
.hero-button { margin-top: 24px; }
.hero-art { width: 310px; height: 300px; position: absolute; left: 6%; top: 50%; transform: translateY(-50%); }
.hero-orbit { position: absolute; display: block; border: 1px solid rgba(37, 99, 235, .24); border-radius: 50%; transform: rotate(-26deg); }
.orbit-one { width: 235px; height: 235px; left: 30px; top: 35px; }
.orbit-two { width: 180px; height: 280px; left: 55px; top: 12px; transform: rotate(36deg); }
.hero-star { position: absolute; left: 108px; top: 55px; color: var(--blue); font-size: 9rem; line-height: 1; }
.hero-badge { position: absolute; left: 0; bottom: 32px; display: grid; gap: 2px; padding: 13px 18px; border-radius: 15px; background: var(--white); box-shadow: 0 10px 35px #19362619; transform: rotate(-5deg); }
.hero-badge span { color: var(--muted); font-size: .75rem; }
.hero-badge strong { color: var(--blue-dark); font-size: .96rem; }
.slider-controls { position: absolute; bottom: 16px; right: 50%; transform: translateX(50%); display: flex; align-items: center; gap: 9px; z-index: 3; }
.slider-arrow { width: 30px; height: 30px; border: 1px solid #ffffff77; border-radius: 50%; background: #ffffff70; color: var(--ink); }
.slider-dots { display: flex; align-items: center; gap: 6px; }
.slider-dot { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #69756e88; padding: 0; }
.slider-dot[aria-current="true"] { width: 19px; border-radius: 9px; background: var(--blue); }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 25px 0 42px; }
.benefits > div { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.benefit-icon { display: grid; flex: 0 0 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--mint); color: var(--blue-dark); font-weight: 700; }
.benefits strong, .benefits small { display: block; }
.benefits strong { font-size: .89rem; }
.benefits small { color: var(--muted); font-size: .76rem; margin-top: 3px; }
.products-section { padding: 10px 0 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .bottom-callout h2 { margin: 0; font-size: 1.8rem; }
.section-note { margin: 0 0 5px; color: var(--muted); font-size: .9rem; }
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { display: flex; height: 100%; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px #1936260d; }
.product-image-wrap { height: 200px; flex: 0 0 200px; overflow: hidden; background: #f8fafc; }
.product-image { width: 100%; height: 100%; object-fit: contain; }
.image-unavailable { display: grid; place-items: center; background: #f0f2f3; }
.image-unavailable::after { color: var(--muted); content: "الصورة غير متوفرة"; font-size: .78rem; }
.product-content { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.product-content h3 { margin: 0; font-size: 1.05rem; }
.product-category-label { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.product-description { display: -webkit-box; min-height: calc(1.6em * 2); margin: 8px 0 15px; overflow: hidden; color: var(--muted); font-size: .85rem; line-height: 1.6; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-footer { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px; margin-top: auto; }
.price { color: var(--blue-dark); font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.price small { font-size: .7rem; font-weight: 500; }
.product-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.order-button, .cart-button { width: 100%; min-height: 40px; border-radius: 9px; padding: 4px 6px; font-size: .76rem; line-height: 1.3; }
.order-button:disabled, .cart-button:disabled { opacity: .6; cursor: not-allowed; }
.status-message { min-height: 24px; color: var(--muted); font-size: .9rem; }
.status-message:empty { display: none; }
.status-message.error { color: #a3362d; }
.about-section { padding: 8px 0 42px; max-width: 690px; }
.about-section h2 { margin: 0 0 8px; font-size: 1.45rem; }
.about-section > p:last-child { margin: 0; color: var(--muted); line-height: 1.9; }
.bottom-callout { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 45px; padding: 30px clamp(20px, 5vw, 48px); background: var(--blue); color: white; border-radius: 20px; }
.bottom-callout .eyebrow { color: #dbeafe; }
.bottom-callout h2 { font-size: 1.45rem; }
.button-light { background: white; color: var(--blue-dark); white-space: nowrap; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-brand { color: var(--ink); font-size: .95rem; }
.footer-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 16px; }

.order-dialog { width: min(440px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 0; border-radius: 20px; background: var(--white); color: var(--ink); box-shadow: 0 24px 80px #0c211652; }
.order-dialog::backdrop { background: #13231c99; backdrop-filter: blur(3px); }
.order-form { position: relative; display: grid; gap: 9px; padding: 28px; }
.dialog-close { position: absolute; left: 18px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2f4f1; color: var(--ink); font-size: 1.5rem; }
.order-form h2 { margin: 0; font-size: 1.4rem; }
.selected-product { margin: 0 0 6px; color: var(--blue-dark); font-weight: 600; }
.cart-items { display: grid; gap: 8px; max-height: 190px; overflow: auto; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) 32px 26px 32px auto; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; font-size: .8rem; }
.cart-line-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-quantity-button, .cart-remove-button { min-height: 30px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.cart-remove-button { padding: 0 6px; color: #a3362d; }
.cart-total { margin: 0; color: var(--blue-dark); font-weight: 700; }
.order-form label:not(.honeypot) { margin-top: 5px; font-size: .86rem; font-weight: 600; }
.order-form input:not([name="website"]) { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #dce2dc; border-radius: 10px; outline: 0; background: #fcfdfb; }
.order-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2563eb1a; }
.submit-order { width: 100%; margin-top: 3px; }
.submit-order:disabled { opacity: .65; cursor: wait; }
.form-message { min-height: 19px; margin: 2px 0 0; color: #a3362d; font-size: .83rem; }
.form-message.success { color: var(--blue-dark); }
.privacy-note { color: var(--muted); text-align: center; line-height: 1.6; }
.honeypot { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.legal-content { width: min(760px, calc(100% - 36px)); min-height: 62vh; margin-inline: auto; padding: 48px 0 72px; }
.legal-content h1 { margin: 0 0 12px; font-size: 2rem; }
.legal-lead { margin: 0 0 32px; color: var(--muted); font-size: 1rem; line-height: 1.9; }
.legal-content section { padding: 18px 0; border-top: 1px solid var(--line); }
.legal-content section h2 { margin: 0 0 8px; font-size: 1.08rem; }
.legal-content section p { margin: 0; color: #475569; line-height: 1.9; }
.legal-contact { margin-top: 26px; color: var(--muted); }
.legal-contact a, .contact-phone { color: var(--blue-dark); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.contact-action { margin-top: 8px; }

@media (min-width: 760px) {
  .hero-art { left: 13%; }
}
@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px 0; }
  .main-navigation { justify-content: flex-start; gap: 10px 14px; font-size: .76rem; }
  .topbar-inner { min-height: 42px; }
  .hero { min-height: 360px; padding: 35px 24px 62px; }
  .hero-art { left: -105px; opacity: .45; }
  .hero-copy { max-width: 88%; }
  .hero.has-image::before { background: linear-gradient(90deg, rgba(15, 39, 86, .82), rgba(15, 39, 86, .3)); }
  .benefits { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 32px; }
  .benefits > div { padding: 11px 13px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-image-wrap { height: 180px; flex-basis: 180px; }
  .product-content { padding: 13px; }
  .product-footer { grid-template-columns: 1fr; align-items: stretch; }
  .cart-button { padding-inline: 2px; font-size: .62rem; white-space: nowrap; }
}
@media (max-width: 430px) {
  .site-header, main, .site-footer, .topbar-inner { width: min(100% - 24px, 1120px); }
  .legal-content { width: min(100% - 24px, 760px); padding: 34px 0 52px; }
  .topbar-inner { align-items: flex-start; flex-direction: column; gap: 3px; padding: 7px 0; font-size: .72rem; }
  .site-header { min-height: 68px; }
  .hero { min-height: 335px; border-radius: 20px; }
  .hero h1 { font-size: 2rem; }
  .hero-copy > p:not(.eyebrow) { font-size: .9rem; }
  .section-heading { align-items: start; flex-direction: column; gap: 4px; }
  .section-heading h2 { font-size: 1.55rem; }
  .section-note { font-size: .83rem; }
  .product-image-wrap { height: 145px; flex-basis: 145px; }
  .product-content h3 { font-size: .94rem; }
  .product-description { min-height: calc(1.6em * 2); font-size: .78rem; }
  .price { font-size: 1rem; }
  .bottom-callout { align-items: start; flex-direction: column; }
  .site-footer { flex-wrap: wrap; }
  .footer-links { width: 100%; order: 3; }
}
@media (max-width: 360px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-image-wrap { height: 200px; flex-basis: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
