/* ==========================================================================
   Alia Trading – Products page (Option A, Showroom Gallery)
   Uses the tokens and buttons from alia-v2.css. All classes prefixed "av-".
   ========================================================================== */

.av-products { padding-top: 100px; font-family: Montserrat, Arial, sans-serif; color: var(--av-ink); letter-spacing: normal; line-height: 1.5; }
[dir="rtl"] .av-products, [dir="rtl"] .av-products h1, [dir="rtl"] .av-products h2, [dir="rtl"] .av-products h3,
[dir="rtl"] .av-products p, [dir="rtl"] .av-products a, [dir="rtl"] .av-products span, [dir="rtl"] .av-products button,
[dir="rtl"] .av-products input, [dir="rtl"] .av-products select, [dir="rtl"] .av-products label, [dir="rtl"] .av-products li { font-family: 'Cairo Regular', Cairo, Arial, sans-serif; letter-spacing: 0; }
.av-products *, .av-products *::before, .av-products *::after { box-sizing: border-box; }
.av-products img { width: auto; height: auto; }
.av-products p { margin: 0; letter-spacing: 0; }
.av-products a { text-decoration: none; }

/* ---------- title band ---------- */
.av-band { background: var(--av-band); }
.av-band .av-wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 48px; }
.av-crumb { font-size: 13px; line-height: 1.5; color: var(--av-muted); }
.av-crumb a { color: var(--av-muted); }
.av-crumb a:hover { color: var(--av-ink); }
.av-products h1.av-title { margin: 12px 0; font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -0.5px; color: var(--av-ink); }
[dir="rtl"] .av-products h1.av-title { letter-spacing: 0; }
.av-products p.av-lead { font-size: 16px; line-height: 1.6; color: var(--av-muted); max-width: 560px; }
.av-search { display: flex; flex-direction: column; gap: 6px; width: 340px; max-width: 100%; flex: 0 0 auto; }
.av-search label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--av-muted); }
[dir="rtl"] .av-search label { letter-spacing: 0; }
.av-search input { height: 48px; padding: 0 16px; border: 1px solid var(--av-field); border-radius: 4px; font-size: 15px; background: #fff; color: var(--av-ink); }
.av-search input:focus { outline: 2px solid var(--av-gold); outline-offset: 1px; border-color: var(--av-gold); }

/* ---------- category chips ---------- */
.av-chips { border-bottom: 1px solid var(--av-line); }
.av-chips .av-wrap { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
.av-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--av-field); color: var(--av-ink) !important; font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.av-chip span { color: var(--av-muted); }
.av-chip:hover { border-color: var(--av-ink); }
.av-chip[aria-current] { background: var(--av-ink); border-color: var(--av-ink); color: #fff !important; font-weight: 600; }
.av-chip[aria-current] span { color: var(--av-gold); }

/* ---------- toolbar ---------- */
.av-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 8px; }
.av-products p.av-count { font-size: 14px; line-height: 1.5; color: var(--av-muted); }
.av-count strong { color: var(--av-ink); }
.av-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.av-seg { display: flex; border: 1px solid var(--av-field); border-radius: 4px; overflow: hidden; }
.av-seg button { min-height: 44px; padding: 0 16px; border: 0; background: #fff; color: var(--av-ink); font-size: 13px; cursor: pointer; }
.av-seg button + button { border-inline-start: 1px solid var(--av-field); }
.av-seg button:hover { background: var(--av-band); }
.av-seg button[aria-pressed="true"] { background: var(--av-ink); color: #fff; font-weight: 600; }
.av-tools label { margin: 0; font-size: 13px; color: var(--av-muted); }
.av-tools select { min-height: 44px; padding: 0 12px; border: 1px solid var(--av-field); border-radius: 4px; font-size: 13px; background: #fff; color: var(--av-ink); }

/* ---------- product grid ---------- */
.av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; padding-top: 20px; }
.av-card { display: flex; flex-direction: column; gap: 14px; color: var(--av-ink) !important; cursor: pointer; }
.av-tile { position: relative; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: var(--av-tile); border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 36px; transition: background .2s ease; }
.av-products .av-tile img.av-photo { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.av-products .av-tile img.av-logo { position: absolute; top: 16px; inset-inline-start: 16px; height: 14px; width: auto; max-width: 84px; object-fit: contain; }
.av-card:hover .av-tile, .av-card:focus-visible .av-tile { background: #ece7df; }
.av-card:hover .av-more, .av-card:focus-visible .av-more { text-decoration: underline; }
.av-card:focus-visible { outline: 2px solid var(--av-gold); outline-offset: 4px; border-radius: 6px; }
.av-meta { display: flex; flex-direction: column; gap: 6px; }
.av-cat { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.4; color: var(--av-gold-text); }
[dir="rtl"] .av-cat { letter-spacing: 0; font-size: 12px; }
.av-name { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--av-ink); }
.av-model { font-size: 13px; line-height: 1.4; color: var(--av-muted); }
.av-more { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--av-gold-text); }
.av-empty { grid-column: 1 / -1; padding: 48px 24px; text-align: center; border: 1px dashed var(--av-field); border-radius: 6px; }
.av-products .av-empty p { font-size: 15px; color: var(--av-muted); }
.av-empty button { margin-top: 16px; }

/* ---------- pagination ---------- */
.av-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 56px 0 8px; }
.av-pager button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 22px; background: transparent; color: var(--av-ink); font-size: 14px; cursor: pointer; }
.av-pager button:hover { background: var(--av-band); }
.av-pager button[aria-current] { background: var(--av-ink); color: #fff; font-weight: 600; }
.av-pager button.av-step { padding: 0 16px; border: 1px solid var(--av-field); font-weight: 600; }
.av-pager button:disabled { opacity: .4; cursor: default; background: transparent; }
.av-pager .av-gap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--av-muted); }

/* ---------- help strip ---------- */
.av-help { margin-top: 56px; background: var(--av-ink); color: #fff; }
.av-help .av-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 44px; padding-bottom: 44px; }
.av-help strong { display: block; margin-bottom: 8px; font-size: 22px; font-weight: 600; line-height: 1.3; color: #fff; }
.av-help span { font-size: 15px; line-height: 1.6; color: #d6d2cc; }
/* the shared footer adds its own top margin; the help strip already separates it */
.av-products + .av-footer, .av-products ~ .av-footer { margin-top: 0; }

/* ---------- details modal ---------- */
.av-modal { position: fixed; inset: 0; z-index: 1050; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20, 19, 18, .55); }
.av-modal.av-open { display: flex; }
.av-modal-box { position: relative; width: 100%; max-width: 920px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 10px; border-top: 4px solid var(--av-gold); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); overflow: hidden; font-family: Montserrat, Arial, sans-serif; letter-spacing: normal; color: var(--av-ink); }
[dir="rtl"] .av-modal-box, [dir="rtl"] .av-modal-box h2, [dir="rtl"] .av-modal-box h3, [dir="rtl"] .av-modal-box li,
[dir="rtl"] .av-modal-box td, [dir="rtl"] .av-modal-box button, [dir="rtl"] .av-modal-box span { font-family: 'Cairo Regular', Cairo, Arial, sans-serif; }
.av-modal-box *, .av-modal-box *::before, .av-modal-box *::after { box-sizing: border-box; }
.av-modal-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--av-band); color: var(--av-ink); font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
.av-modal-close:hover { background: var(--av-gold); }
.av-modal-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; padding: 40px; overflow-y: auto; }
.av-modal-img { align-self: start; position: sticky; top: 0; aspect-ratio: 1 / 1; background: var(--av-tile); border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 28px; }
.av-modal-img img { width: 100% !important; height: 100% !important; object-fit: contain; mix-blend-mode: multiply; }
.av-modal-box h2 { margin: 0 0 6px; padding-inline-end: 40px; font-size: 24px; line-height: 1.3; font-weight: 600; color: var(--av-ink); }
.av-modal-box h3 { margin: 24px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--av-gold-text); }
[dir="rtl"] .av-modal-box h3 { letter-spacing: 0; font-size: 15px; }
.av-specs { margin: 0; padding: 0; }
.av-specs li { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: #3f3c38; list-style: none; letter-spacing: 0; }
.av-specs li::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 3px; background: var(--av-gold); transform: translateY(-2px); }
.av-info { width: 100%; border-collapse: collapse; font-size: 14px; }
.av-info td { padding: 10px 0; border-top: 1px solid var(--av-line); color: var(--av-muted); vertical-align: middle; }
.av-info tr:last-child td { border-bottom: 1px solid var(--av-line); }
.av-info td + td { text-align: end; color: var(--av-ink); font-weight: 600; }
.av-info img { height: 16px !important; width: auto !important; max-width: 100px; }
.av-modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding: 16px 40px; border-top: 1px solid var(--av-line); background: var(--av-band); }
.av-modal-foot .av-btn { border: 0; cursor: pointer; }
body.av-modal-lock { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .av-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .av-products { padding-top: 80px; }
    .av-band .av-wrap { flex-direction: column; align-items: stretch; padding-top: 36px; padding-bottom: 32px; gap: 20px; }
    .av-products h1.av-title { font-size: 32px; }
    .av-search { width: 100%; }
    .av-chips .av-wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .av-chips .av-wrap::-webkit-scrollbar { display: none; }
    .av-toolbar { align-items: flex-start; flex-direction: column; }
    .av-tools { width: 100%; }
    .av-seg { width: 100%; }
    .av-seg button { flex: 1 1 auto; padding: 0 8px; }
    .av-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
    .av-tile { padding: 20px; }
    .av-name { font-size: 15px; }
    .av-modal { padding: 0; align-items: stretch; }
    .av-modal-box { max-height: 100vh; border-radius: 0; }
    .av-modal-body { grid-template-columns: 1fr; padding: 56px 20px 24px; gap: 20px; }
    .av-modal-img { position: static; max-width: 320px; width: 100%; margin: 0 auto; }
    .av-modal-foot { padding: 12px 20px; }
}
