/* FIXALL storefront v2 — header + category nav, hero slider, trust strip, category tiles, product sections */
:root {
  color-scheme: light;
  /* FIXALL identity: Midnight Navy #14283D · Premium Red #C62828 · Steel Gray #A6AFB8 · Light Gray #F5F6F8
     (--orange keeps its old name but now carries the brand red accent, so every accent follows the identity) */
  --ink: #14283d; --ink-soft: #5b6b80; --navy: #14283d; --navy-deep: #0e1c2c;
  --blue: #2b4a6b; --orange: #c62828; --orange-hover: #a61f1f; --on-navy-accent: #ff6b6b;
  --steel: #a6afb8; --paper: #f5f6f8; --white: #fff; --line: #e3e8ee;
  --green: #16835e; --red: #c62828; --shadow: 0 14px 40px rgba(20,40,61,.08);
  font-family: 'Noto Kufi Arabic', 'Manrope', 'Segoe UI', Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 150px; overflow-x: clip; }
body { margin: 0; overflow-x: clip; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.7; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #c62828; outline-offset: 2px; }
.container { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* announcement + header */
.announcement-bar { background: var(--navy-deep); color: #eef5fb; font-size: 13px; }
.announcement-inner { min-height: 38px; display: flex; justify-content: center; align-items: center; gap: 18px; text-align: center; }
.announcement-inner a { color: var(--on-navy-accent); font-weight: 700; text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 2px 10px rgba(16,40,68,.06); }
.header-main { min-height: 84px; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; align-items: center; gap: 32px; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; }
.brand img { width: auto; height: 56px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.35; }
.brand-copy strong, .footer-brand { font-family: 'Manrope', 'Noto Kufi Arabic', sans-serif; font-size: 24px; font-weight: 900; letter-spacing: -.7px; }
.brand-copy strong span { color: var(--orange); }
.brand .brand-copy { padding-inline-start: 11px; border-inline-start: 2px solid var(--orange); }
.brand .brand-copy small { color: var(--navy); font-size: 12px; font-weight: 800; }
.brand-copy small { color: #728094; font-size: 11px; }
.header-search { height: 48px; display: flex; border: 2px solid var(--navy); border-radius: 10px; background: var(--white); overflow: hidden; }
.header-search select { max-width: 150px; padding: 0 12px; border: 0; border-inline-end: 1px solid var(--line); background: #f4f6f8; color: var(--ink); font-size: 13px; cursor: pointer; }
.header-search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 0 15px; color: var(--ink); background: transparent; font-size: 14px; }
.header-search button { min-width: 84px; border: 0; background: var(--navy); color: white; font-weight: 800; cursor: pointer; }
.header-search button:hover { background: var(--blue); }
.cart-button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; color: white; background: var(--orange); border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; }
.cart-button:hover { background: #a61f1f; }
.cart-button b { min-width: 24px; padding: 0 6px; line-height: 24px; color: white; background: var(--navy); border-radius: 99px; font-size: 12px; text-align: center; }
.main-nav { background: var(--navy); }
.main-nav-inner { display: flex; align-items: stretch; gap: 2px; min-height: 46px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav a { display: inline-flex; align-items: center; padding: 0 15px; color: #dbe7f1; text-decoration: none; font-size: 14px; font-weight: 700; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: white; border-bottom-color: var(--orange); background: rgba(255,255,255,.06); }
.main-nav .nav-accent { color: var(--on-navy-accent); }
.nav-gap { flex: 1; }

/* hero slider */
.hero { padding-top: 22px; }
.slider { position: relative; min-height: 380px; border-radius: 18px; overflow: hidden; color: white; }
.slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 40px 56px 64px; opacity: 0; visibility: hidden; transition: opacity .5s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-a { background: linear-gradient(115deg, #0e1c2c, #14283d 55%, #2b4a6b); }
.slide-b { background: linear-gradient(115deg, #7f1717, #c62828); }
.slide-c { background: linear-gradient(115deg, #2b3642, #5f6b78); }
/* first slide: the brand banner itself (light artwork, so no white text / dark controls on it) */
/* the banner is 3:1 and must never be cropped (logo on one side, slogan on the other): fit it whole on a matching backdrop */
.slide-banner { padding: 0; background: linear-gradient(180deg, #f3f6fb, #dfe7f2); }
.slide-banner a { display: block; width: 100%; height: 100%; }
.slide-banner img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.slide-copy { max-width: 560px; }
.slide-tag { display: inline-block; padding: 3px 12px; background: rgba(255,255,255,.16); border-radius: 99px; font-size: 13px; font-weight: 700; }
.slide h1, .slide h2 { margin: 14px 0 10px; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.35; font-weight: 900; }
.slide p { margin: 0 0 22px; color: rgba(255,255,255,.86); font-size: 16px; }
.slide-mark { font-size: clamp(90px, 14vw, 180px); line-height: 1; opacity: .9; filter: drop-shadow(0 16px 30px rgba(0,0,0,.3)); }
.slider-controls { position: absolute; bottom: 16px; inset-inline: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.slider-controls > button { width: 34px; height: 34px; color: white; background: rgba(0,0,0,.28); border: 0; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.slider-controls > button:hover { background: rgba(0,0,0,.5); }
#slide-pause { font-size: 11px; }
.slider-dots { display: flex; gap: 7px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; background: rgba(255,255,255,.45); border: 0; border-radius: 50%; cursor: pointer; }
.slider-dots button.is-active { width: 26px; border-radius: 99px; background: white; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 26px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: 15px; transition: transform .18s, background .18s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #ffffff; background: var(--orange); }
.button-primary:hover { background: #a61f1f; }

/* trust strip */
.trust-strip { padding-top: 18px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trust { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.trust > span { display: grid; flex: none; width: 46px; height: 46px; place-items: center; background: #fdecec; border-radius: 50%; font-size: 22px; }
.trust strong { display: block; font-size: 15px; }
.trust small { color: var(--ink-soft); font-size: 13px; }

/* sections */
.section { padding-top: 44px; }
#shop { padding-bottom: 60px; }
.section-heading { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.section-heading h2, .section-heading .listing-title { margin: 0; font-size: 24px; line-height: 1.5; }
.listing-intro { max-width: 720px; margin: 4px 0 0; color: #5b6472; font-size: 14px; line-height: 1.8; }
.section-heading::after { position: absolute; bottom: -2px; inset-inline-start: 0; width: 64px; height: 3px; content: ''; background: var(--orange); }
.section-heading p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.section-kicker { color: var(--blue); font-size: 13px; font-weight: 900; }
.view-all { flex: none; color: var(--blue); font-size: 14px; font-weight: 800; text-decoration: none; }
.view-all:hover { text-decoration: underline; }

/* category tiles */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.category-tile { display: grid; gap: 2px; padding: 12px 12px 14px; text-align: center; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.category-tile:hover { transform: translateY(-4px); border-color: var(--orange); box-shadow: var(--shadow); }
.category-art { position: relative; display: grid; aspect-ratio: 1 / 1; margin-bottom: 8px; place-items: center; overflow: hidden; background: #fff; border-radius: 10px; }
.category-art img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.category-icon { font-size: 54px; }
.category-tile strong { font-size: 15px; }
.category-tile small { color: var(--blue); font-size: 12px; font-weight: 700; }

/* brand filter pills */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill-link { min-height: 36px; display: inline-flex; align-items: center; padding: 3px 16px; color: var(--ink-soft); background: var(--white); border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: 13px; font-weight: 700; }
.pill-link:hover { color: var(--blue); border-color: var(--blue); }
.pill-link.active { color: white; background: var(--navy); border-color: var(--navy); }

/* product cards */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.product-card:hover { transform: translateY(-4px); border-color: #cfdbe6; box-shadow: 0 15px 28px rgba(21,48,72,.1); }
.product-visual { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; background: var(--white); border-bottom: 1px solid var(--line); }
.product-visual img { width: 86%; height: 86%; object-fit: contain; transition: transform .25s; }
.product-visual video { width: 100%; height: 100%; object-fit: contain; background: #101820; }
.product-card:hover .product-visual img:not(.image-fallback) { transform: scale(1.06); }
.product-visual img.image-fallback { width: 90px; height: 90px; opacity: .6; }
.badge { position: absolute; top: 10px; z-index: 2; padding: 3px 10px; border-radius: 6px; font: 800 12px 'Manrope', 'Noto Kufi Arabic', sans-serif; }
.badge-brand { inset-inline-start: 10px; color: var(--navy); background: #fdecec; border: 1px solid #f3c4c4; }
.badge-soldout { inset-inline-end: 10px; color: white; background: #4b5563; }
.product-thumbs { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; }
.thumb { flex: none; width: 44px; height: 44px; padding: 2px; background: var(--white); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.thumb.is-active, .thumb:hover { border-color: var(--orange); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-info { flex: 1; padding: 12px 14px 10px; }
.product-meta { display: flex; justify-content: space-between; gap: 8px; color: #8492a3; font-size: 12px; }
.product-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-info h3 { display: -webkit-box; min-height: 52px; margin: 6px 0 8px; overflow: hidden; font-size: 15px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.price-block { color: var(--red); }
.price-block strong { font: 900 21px 'Manrope', 'Noto Kufi Arabic', sans-serif; }
.price-block span { font-size: 13px; font-weight: 700; }
.price-block small { color: #8492a3; font-size: 12px; }
.add-button { min-height: 44px; margin: 0 12px 12px; color: white; background: var(--navy); border: 0; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 800; transition: background .15s; }
.add-button:hover { background: var(--blue); }
a.add-button { display: grid; place-items: center; text-decoration: none; }
.product-info h3 a { color: inherit; text-decoration: none; }
.product-info h3 a:hover { color: var(--blue); }
.size-range { margin: -4px 0 6px; color: #5b6b7d; font-size: 12px; font-weight: 700; }
.add-button.is-disabled { color: #7b8794; background: #e9edf1; cursor: not-allowed; }
.empty-state { display: grid; justify-items: center; padding: 55px 20px; background: white; border: 1px dashed #cbd6df; border-radius: 14px; text-align: center; }
.empty-state > span { color: #91a5b7; font-size: 48px; }
.empty-state h3 { margin: 8px 0 0; }
.empty-state p { margin: 3px 0 17px; color: var(--ink-soft); font-size: 14px; }

/* smart search */
.smart-search { padding: 50px 0; background: #e9f0f6; }
.smart-search-inner { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 45px; }
.smart-copy h2 { margin: 3px 0 4px; color: var(--ink); font-size: 26px; line-height: 1.5; }
.smart-copy h2 span { color: var(--blue); }
.smart-copy p { max-width: 420px; margin: 0; color: var(--ink-soft); font-size: 14px; }
.smart-form-card { padding: 22px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.smart-form-card label { display: block; margin-bottom: 8px; color: #4f6175; font-size: 14px; font-weight: 800; }
.smart-input-row { display: flex; gap: 8px; }
.smart-input-row input { min-width: 0; flex: 1; height: 48px; padding: 0 12px; border: 1px solid #d5dee6; border-radius: 9px; color: var(--ink); background: #fbfcfd; font-size: 14px; }
.smart-input-row button { min-width: 140px; padding: 0 14px; color: white; background: var(--blue); border: 0; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 800; }
.smart-input-row button:hover { background: #10588f; }
.problem-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.problem-chip { text-decoration: none; padding: 6px 12px; color: #54708a; background: #f4f8fa; border: 1px solid #e0e9ef; border-radius: 99px; cursor: pointer; font-size: 13px; }
.problem-chip:hover { color: var(--blue); border-color: var(--blue); }
.htmx-indicator { display: none; margin-top: 10px; color: #738398; font-size: 13px; }
.htmx-indicator.is-visible { display: block; }
#ai-results-container:empty { display: none; }
#ai-results-container { min-width: 0; max-width: 100%; margin-top: 12px; overflow-x: clip; color: var(--ink); }

/* track order */
.track-section { padding: 48px 0; }
.track-section h2 { margin: 6px 0; }
.track-card { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.track-form { display: flex; flex-direction: column; gap: 8px; }
.track-form label { font-size: 14px; font-weight: 700; }
.track-form input { padding: 11px 12px; border: 1px solid #cfd8e3; border-radius: 10px; font: inherit; }
#track-result { grid-column: 1 / -1; white-space: pre-line; }

/* footer */
.site-footer { color: #c9d6e2; background: var(--navy-deep); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-block: 44px 30px; }
.footer-brand { color: white; text-decoration: none; }
.footer-brand span { color: var(--on-navy-accent); }
.footer-grid p { margin: 8px 0 0; font-size: 14px; }
.footer-grid h3 { margin: 0 0 10px; color: white; font-size: 15px; }
.footer-grid div > a:not(.footer-brand) { display: block; padding: 3px 0; color: #c9d6e2; font-size: 14px; text-decoration: none; }
.footer-grid div > a:not(.footer-brand):hover { color: var(--on-navy-accent); }
.footer-bottom { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; text-align: center; }


@media (max-width: 980px) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-gap { display: none; }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 24px); }
  .announcement-bar { font-size: 12px; }
  .header-main { min-height: 0; grid-template-columns: 1fr auto; gap: 10px; padding-block: 10px; }
  .brand img { height: 44px; }
  .brand .brand-copy small { font-size: 11px; }
  .slide-banner { background: #f1f4fa; }
  .slide-banner img { object-fit: cover; }
  .brand-copy strong { font-size: 20px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; height: 44px; }
  .header-search select { max-width: 104px; padding: 0 6px; font-size: 12px; }
  .cart-button { min-height: 42px; padding: 0 12px; }
  .main-nav a { padding: 0 12px; font-size: 13px; }
  .hero { padding-top: 12px; }
  .slider { min-height: 330px; border-radius: 14px; }
  .slide { padding: 26px 22px 60px; }
  .slide p { font-size: 14px; }
  .slide-mark { position: absolute; inset-inline-end: 8px; bottom: 44px; font-size: 84px; opacity: .22; }
  .trust-grid { grid-template-columns: 1fr; gap: 8px; }
  .trust { padding: 11px 14px; }
  .section { padding-top: 32px; }
  .section-heading h2, .section-heading .listing-title { font-size: 20px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info { padding: 10px 10px 8px; }
  .product-info h3 { min-height: 46px; font-size: 13px; }
  .product-meta { font-size: 11px; }
  .price-block strong { font-size: 18px; }
  .add-button { min-height: 42px; margin: 0 8px 8px; font-size: 13px; }
  .smart-search { padding: 36px 0; }
  .smart-search-inner { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .smart-search-inner > *, .smart-form-card, #ai-results-container, #ai-results-container .ai-result-card { width: 100%; min-width: 0; max-width: 100%; }
  .smart-form-card { padding: 15px; overflow: hidden; }
  .smart-input-row { flex-direction: column; }
  .smart-input-row button { min-height: 46px; }
  #ai-results-container [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .track-card { grid-template-columns: 1fr; padding: 20px; }
  .footer-grid { gap: 22px; padding-block: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* المجموعات (شتوي، جزم، عروض…) بترتيب المدير: بطاقة صورة عريضة + شريط الاسم */
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.collection-tile { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.collection-tile:hover { transform: translateY(-4px); border-color: var(--orange); box-shadow: var(--shadow); }
.collection-art { position: relative; aspect-ratio: 16 / 7; background: linear-gradient(135deg, var(--navy), var(--blue)); display: grid; place-items: center; }
.collection-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.collection-art span { color: #fff; font-size: 22px; font-weight: 800; padding: 0 12px; text-align: center; }
.collection-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: #c8ad8a; color: #fff; }
.collection-label strong { font-size: 15px; }
.collection-label small { font-size: 12px; opacity: .9; white-space: nowrap; }
@media (max-width: 640px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .collection-art { aspect-ratio: 1 / 1; }
  .collection-label { padding: 8px 10px; justify-content: center; }
  .collection-label strong { font-size: 13.5px; text-align: center; }
  .collection-label small { display: none; }
}