/* حلواني نور الدين — the approved design (design-source/), made static (D-101). The page keeps the design's own inline
   styles; this sheet carries what the design tool applied at run time: hover and focus states, the header's switch at
   960px, and the pieces the script draws (product cards, filters, the special-order form's states). */
html { scroll-behavior: smooth; }
body { margin: 0; direction: rtl; background: #f8f0ea; color: #3b2521; font-family: 'Tajawal', sans-serif; text-wrap: pretty; }
a { color: #3b2521; text-decoration: none; }
a:hover { color: #b8545f; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label:focus-within { outline: 2px solid #d4707a; outline-offset: 3px; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── buttons (the design's pink pill) */
.btn { display: flex; align-items: center; gap: 14px; background: #d4707a; color: #fff; padding: 15px 28px; border-radius: 999px; font-weight: 700; font-size: 17px; white-space: nowrap; border: 0; font-family: inherit; cursor: pointer; }
.btn:hover { background: #b8545f !important; color: #fff !important; }
.btn.on-dark:hover { background: #e8959c !important; color: #2a1915 !important; }
.btn-header { flex: none; gap: 10px; padding: 12px 22px; font-size: 15px; }
.btn-dark { background: #3b2521; padding: 12px 22px; font-size: 15px; }
.btn-dark:hover { background: #2a1915 !important; }
.btn[disabled] { opacity: .7; cursor: wait; }

/* ── header: wide above 960px, a menu button below (as designed) */
.site-header { position: relative; z-index: 20; font-family: 'Tajawal', sans-serif; color: #3b2521; }
.header-wide { max-width: 1440px; margin: 0 auto; padding: 18px clamp(20px, 4vw, 56px); display: flex; align-items: center; gap: 24px; }
.header-narrow { padding: 12px 20px; display: none; align-items: center; justify-content: space-between; gap: 16px; }
.logo-link { display: flex; flex: none; }
.logo-wide { height: 96px; width: auto; display: block; }
.logo-narrow { height: 68px; width: auto; display: block; }
.nav-wide { display: flex; gap: clamp(16px, 2.2vw, 32px); margin: 0 auto; font-size: 16px; font-weight: 500; }
.nav-link { padding-bottom: 4px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-link.is-current { color: #3b2521; font-weight: 700; border-bottom-color: #d4707a; }
.menu-toggle { width: 48px; height: 48px; border-radius: 50%; border: 1px solid #d9b9ad; background: rgba(253, 248, 244, .9); color: #3b2521; display: grid; place-items: center; cursor: pointer; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-narrow { position: absolute; top: 100%; right: 12px; left: 12px; background: #fdf8f4; border: 1px solid #f0e2d9; border-radius: 16px; box-shadow: 0 18px 40px -18px rgba(59, 37, 33, .45); padding: 8px; display: flex; flex-direction: column; }
.menu-link { min-height: 48px; display: flex; align-items: center; padding: 0 16px; border-radius: 12px; font-weight: 500; font-size: 17px; }
.menu-link:hover { background: #f8f0ea; }
.menu-link.is-current { background: #f6e3e1; color: #b8545f; font-weight: 700; }
.menu-cta { margin: 8px 8px 6px; min-height: 48px; justify-content: center; gap: 10px; padding: 0 16px; font-size: 16px; }
@media (max-width: 960px) {
  .header-wide { display: none; }
  .header-narrow { display: flex; }
}
@media (min-width: 961px) { .menu-narrow { display: none !important; } }

/* ── footer */
.site-footer { background: #d4707a; color: #fff; font-family: 'Tajawal', sans-serif; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 16px clamp(20px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.footer-social { display: flex; gap: 8px; align-items: center; }
.footer-icon { color: #fff; display: grid; place-items: center; width: 40px; height: 40px; }
.footer-icon:hover { color: #2a1915; }
.footer-tagline { display: flex; align-items: center; gap: 8px; }

/* ── the home carousel's arrows, the catalogue filters */
.nr-scroller::-webkit-scrollbar { display: none; }
.round-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #3b2521; box-shadow: 0 6px 18px -6px rgba(59, 37, 33, .35); display: grid; place-items: center; cursor: pointer; }
.round-btn:hover { background: #d4707a; color: #fff; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { min-height: 44px; padding: 0 20px; white-space: nowrap; flex: none; border-radius: 999px; border: 1px solid #e3cfc4; background: #fff; color: #3b2521; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.chip:hover { border-color: #d4707a; color: #b8545f; }
.chip[aria-pressed="true"] { border-color: #d4707a; background: #d4707a; color: #fff; font-weight: 700; }
.state-line { margin: 0; padding: 48px 0; text-align: center; font-size: 16px; color: #6b544c; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 24px; }

/* ── the product card (design-source/components/Product Card) */
.card { height: 100%; box-sizing: border-box; background: #fff; border: 1px solid #f0e2d9; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 30px -20px rgba(59, 37, 33, .4); color: #3b2521; scroll-snap-align: start; }
.card-media { position: relative; aspect-ratio: 1/0.85; background: #efe0d6; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #8a6f66; font-size: 14px; font-weight: 500; }
.card-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 22px 24px; flex: 1; }
.card-title { margin: 0; font-family: 'Aref Ruqaa', serif; font-weight: 700; font-size: 26px; line-height: 1.3; }
.card-desc { margin: 0; font-size: 15px; line-height: 1.7; color: #6b544c; flex: 1; }
.card-price { font-size: 15px; font-weight: 700; margin-top: 4px; }
.card-cta { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 700; color: #b8545f; }

/* ── the special-order form */
.field { font-family: inherit; font-size: 16px; font-weight: 400; color: #3b2521; background: #fdf8f4; border: 1px solid #e3cfc4; border-radius: 12px; padding: 13px 16px; min-height: 48px; box-sizing: border-box; width: 100%; }
.field:focus { border-color: #d4707a; background: #fff; outline: none; }
.field[aria-invalid="true"] { border-color: #a8434e; }
.field-label { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 700; }
.field-error { font-size: 14px; font-weight: 500; color: #a8434e; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border: 1.5px dashed #d9b9ad; border-radius: 12px; background: #fdf8f4; padding: 24px 16px; cursor: pointer; }
.dropzone:hover { border-color: #d4707a; background: #fff; }
.file-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #f0e2d9; border-radius: 12px; padding: 8px 10px; }
.file-thumb { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; }
.file-pdf { width: 44px; height: 44px; flex: none; border-radius: 8px; background: #f6e3e1; color: #b8545f; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.file-remove { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: #6b544c; display: grid; place-items: center; cursor: pointer; }
.file-remove:hover { background: #f6e3e1; color: #a8434e; }
.notice { border-radius: 12px; padding: 16px 18px; font-size: 15px; line-height: 1.7; }
.notice-offline { background: #f8f0ea; border: 1px dashed #b8545f; display: flex; flex-direction: column; gap: 12px; }
.notice-sent { background: #eef6ee; border: 1px solid #9cc59c; font-weight: 700; }
.notice-error { background: #fbecec; border: 1px solid #e0a3a8; font-weight: 700; color: #8c3440; }

/* ── the contact cards */
.contact-card { background: #fff; border: 1px solid #f0e2d9; border-radius: 16px; box-shadow: 0 12px 30px -20px rgba(59, 37, 33, .4); padding: 28px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.contact-icon { width: 60px; height: 60px; border-radius: 50%; border: 1px solid #d9b9ad; background: #f8f0ea; display: grid; place-items: center; color: #b8545f; }
.contact-value { font-size: 15px; color: #6b544c; word-break: break-all; }
.contact-cta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; background: #d4707a; color: #fff; border-radius: 999px; font-weight: 700; font-size: 15px; }
.contact-cta:hover { background: #b8545f; color: #fff; }
.contact-missing { font-size: 15px; color: #6b544c; border: 1px dashed #d9b9ad; border-radius: 999px; padding: 10px 18px; }

/* The design's carousel arrows sit 22px outside their row; on a phone that widened the page by a few pixels. */
#products { overflow-x: clip; }

/* ── GATE 3 (D-104 · UX-WEB-2) — customer commerce, in the approved visual language (palette, radii, type) */
.cart-count { font-weight: 700; color: #b8545f; }
.location-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid #f0e2d9; border-radius: 16px; padding: 14px 18px; }
.location-text { font-size: 15px; line-height: 1.7; color: #5e4740; flex: 1 1 260px; }
.location-dialog { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); color: #3b2521; background: #fdf8f4; box-shadow: 0 30px 80px -30px rgba(42, 25, 21, .55); }
.location-dialog::backdrop { background: rgba(42, 25, 21, .45); }
.location-form { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.location-title { margin: 0; font-family: 'El Messiri', serif; font-size: 26px; }
.location-hint { margin: 0; font-size: 15px; line-height: 1.7; color: #6b544c; }
.location-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.location-result { background: #fff; border: 1px solid #f0e2d9; border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.7; }
.location-result p { margin: 0; }
.suggestions { list-style: none; margin: 0; padding: 0; border: 1px solid #e3cfc4; border-radius: 12px; background: #fff; overflow: hidden; }
.suggestion { display: block; width: 100%; min-height: 44px; text-align: right; padding: 10px 14px; background: none; border: 0; border-bottom: 1px solid #f3e6de; font-family: inherit; font-size: 15px; color: #3b2521; cursor: pointer; }
.suggestion:hover, .suggestion:focus { background: #fdf1ec; outline: none; }
.buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
.buy-qty { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #6b544c; }
.qty { width: 92px; min-height: 44px; padding: 8px 10px; text-align: center; }
.card-cta { background: none; border: 0; font-family: inherit; cursor: pointer; }
.card-unavailable { display: inline-block; margin-top: 6px; padding: 8px 14px; border-radius: 999px; background: #f3e6de; color: #6b544c; font-size: 14px; font-weight: 700; }
.card-note { width: 100%; font-size: 13px; color: #6b544c; min-height: 1em; }
.commerce-main { display: flex; flex-direction: column; flex: 1; gap: 24px; max-width: 960px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: clamp(16px, 3vw, 40px) clamp(16px, 4vw, 40px) 56px; }
.commerce-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.commerce-kicker { font-family: 'Aref Ruqaa', serif; font-size: 22px; color: #b8545f; }
.commerce-title { margin: 0; font-family: 'El Messiri', serif; font-weight: 700; font-size: clamp(36px, 5vw, 56px); line-height: 1.2; }
.commerce-intro { margin: 0; font-size: 16px; line-height: 1.8; color: #5e4740; max-width: 52ch; }
.panel { background: #fff; border: 1px solid #f0e2d9; border-radius: 18px; padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.panel-title { margin: 0; font-family: 'El Messiri', serif; font-size: 24px; }
.account-form, .checkout-form { display: flex; flex-direction: column; gap: 14px; }
.cart-lines, .address-list, .order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-line, .address-row, .order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid #f0e2d9; border-radius: 12px; background: #fdf8f4; font-size: 15px; }
.cart-name { font-weight: 700; flex: 1 1 160px; }
.cart-estimate { font-weight: 700; }
.cart-subtotal { margin: 0; font-weight: 700; font-size: 17px; }
.link-button { background: none; border: 0; color: #a8434e; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 44px; }
.mode-choice { border: 1px solid #e3cfc4; border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.mode-choice .check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.checkout-review p, .note { margin: 0; font-size: 14px; line-height: 1.7; color: #6b544c; }
.badge-ok, .badge-warn { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-ok { background: #e6f2e7; color: #2f6b36; }
.badge-warn { background: #fbeee0; color: #8a5a1c; }
@media (max-width: 520px) { .location-bar .btn { width: 100%; justify-content: center; } }
