/* =========================================================
   Mashaer Portal — "Clean Canvas" Theme Proposal (v3 / flat)
   Direction: light, flat, minimal, editorial — with select dark strips.
   Scope: QoderPortal2/index-flat.html only.
   Namespace: .mvf-*   (mashaer-flat)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..400,0..1,-50..200');

:root {
  --mvf-bg:        #f7f7f8;        /* neutral light gray canvas */
  --mvf-surface:   #eeeeef;        /* soft gray surface */
  --mvf-sand:      #e2e2e4;        /* mid-light gray section (legacy name) */
  --mvf-ink:       #121214;        /* near-black, cool neutral */
  --mvf-ink-soft:  #1c1c1e;
  --mvf-text:      #222225;        /* neutral dark body text */
  --mvf-muted:     #737378;        /* mid neutral gray */
  --mvf-line:      #d9d9dc;        /* hairline */
  --mvf-line-strong:#b5b5b8;
  --mvf-accent:    #3d3d40;        /* charcoal accent — monochrome */
  --mvf-accent-strong: #1f1f21;
  --mvf-success:   #5a7c4a;
  --mvf-danger:    #9e4a3f;
}

html, body { background: var(--mvf-bg); }

body.mvf {
  font-family: 'Tajawal', 'Inter', sans-serif;
  color: var(--mvf-text);
  background: var(--mvf-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mvf ::selection { background: var(--mvf-ink); color: #fff; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  display: inline-block; line-height: 1; direction: ltr;
}

/* ---------------- Typography helpers ---------------- */
.mvf-display { font-family: 'Tajawal','Inter',sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.mvf-heading { font-family: 'Tajawal','Inter',sans-serif; font-weight: 700; letter-spacing: -0.01em; }
.mvf-en      { font-family: 'Inter','Tajawal',sans-serif; font-weight: 500; letter-spacing: 0.02em; }
.mvf-label   { font-family: 'Inter','Tajawal',sans-serif; font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mvf-muted); }
.mvf-num     { font-family: 'Inter',sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------- Layout ---------------- */
.mvf-container { max-width: 1280px; margin-inline: auto; padding-inline: 20px !important; }
@media (min-width: 768px){ .mvf-container { padding-inline: 40px !important; } }

.mvf-rule { height: 1px; background: var(--mvf-line); border: 0; }
.mvf-rule-ink { height: 1px; background: rgba(255,255,255,.12); border: 0; }

.mvf-dot { width: 5px; height: 5px; background: var(--mvf-accent); display: inline-block; }

/* ---------------- Buttons (flat, no shadow) ---------------- */
.mvf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; border-radius: 0; transition: all .25s ease;
  border: 1px solid transparent; cursor: pointer; line-height: 1;
}
.mvf-btn-ink    { background: var(--mvf-ink); color: #fff; }
.mvf-btn-ink:hover { background: #000; }
.mvf-btn-ghost  { background: transparent; color: var(--mvf-ink); border-color: var(--mvf-ink); }
.mvf-btn-ghost:hover { background: var(--mvf-ink); color: #fff; }
.mvf-btn-outline{ background: transparent; color: var(--mvf-text); border-color: var(--mvf-line-strong); }
.mvf-btn-outline:hover { border-color: var(--mvf-ink); color: var(--mvf-ink); }
.mvf-btn-light  { background: #fff; color: var(--mvf-ink); border-color: var(--mvf-line); }
.mvf-btn-light:hover { border-color: var(--mvf-ink); }
.mvf-btn-invert { background: #fff; color: var(--mvf-ink); }
.mvf-btn-invert:hover { background: var(--mvf-sand); }
.mvf-btn-sm { padding: 10px 14px; font-size: 11px; letter-spacing: .16em; }
.mvf-btn-block { width: 100%; }

/* underline link */
.mvf-ulink {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mvf-ink); padding-bottom: 2px;
}
.mvf-ulink::after {
  content:''; position:absolute; inset-inline:0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(1); transform-origin: right; transition: transform .35s ease;
}
.mvf-ulink:hover::after { transform: scaleX(0); transform-origin: left; }

/* ---------------- Header ---------------- */
.mvf-announce {
  background: var(--mvf-surface); color: var(--mvf-muted);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  text-align: center; padding: 10px 16px;
  border-bottom: 1px solid var(--mvf-line);
}
.mvf-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--mvf-bg);
  border-bottom: 1px solid var(--mvf-line);
}
.mvf-nav-link {
  position: relative; font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mvf-text); padding: 6px 0;
}
.mvf-nav-link::after {
  content:''; position:absolute; inset-inline:0; bottom: -4px; height:1px; background: var(--mvf-ink);
  transform: scaleX(0); transform-origin: right; transition: transform .35s ease;
}
.mvf-nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.mvf-icon {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent;
  color: var(--mvf-text); transition: all .2s ease;
}
.mvf-icon:hover { border-color: var(--mvf-ink); color: var(--mvf-ink); }

.mvf-badge {
  position: absolute; top: 2px; inset-inline-end: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--mvf-ink); color: #fff;
  font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Inter',sans-serif;
}

/* ---------------- Sections ---------------- */
.mvf-section        { padding-block: 88px; }
.mvf-section-tight  { padding-block: 48px; }
.mvf-section-dark   { background: var(--mvf-ink); color: #fff; }
.mvf-section-sand   { background: var(--mvf-sand); color: var(--mvf-text); }
.mvf-section-dark a { color: inherit; }

.mvf-eyebrow-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.mvf-eyebrow-row .mvf-dot { background: var(--mvf-accent); }

/* ---------------- Product cards (flat) ---------------- */
.mvf-card {
  position: relative; background: #fff; border: 1px solid var(--mvf-line);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .25s ease;
}
.mvf-card:hover { border-color: var(--mvf-ink); }
.mvf-card-media {
  position: relative; aspect-ratio: 1; background: var(--mvf-surface);
  overflow: hidden; border-bottom: 1px solid var(--mvf-line);
}
.mvf-card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  padding: 0px; transition: transform .7s ease;
}
.mvf-card:hover .mvf-card-media img { transform: scale(1.04); }

.mvf-card-actions {
  position: absolute; top: 12px; inset-inline-end: 12px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transition: opacity .3s ease;
}
.mvf-card:hover .mvf-card-actions { opacity: 1; }
.mvf-card-act {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--mvf-ink); border: 1px solid var(--mvf-line);
  transition: all .2s ease;
}
.mvf-card-act:hover { background: var(--mvf-ink); color: #fff; border-color: var(--mvf-ink); }
.mvf-card-act.active { color: var(--mvf-accent-strong); border-color: var(--mvf-accent-strong); }

.mvf-card-body { padding: 16px 18px 20px; text-align: right; display: flex; flex-direction: column; gap: 6px; }

.mvf-price {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-family: 'Inter',sans-serif; font-weight: 600;
  font-size: 17px; color: var(--mvf-ink);
}
.mvf-price small { font-size: 10px; color: var(--mvf-muted); font-weight: 500; letter-spacing: .06em; }

.mvf-tag {
  position: absolute; top: 12px; inset-inline-start: 12px;
  padding: 4px 8px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  background: var(--mvf-ink); color: #fff; font-weight: 500;
}
.mvf-tag-light { background: #fff; color: var(--mvf-ink); border: 1px solid var(--mvf-line); }

/* ---------------- Filter pills (flat rectangular) ---------------- */
.mvf-filter {
  padding: 12px 18px; font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  background: transparent; color: var(--mvf-muted);
  border: 1px solid var(--mvf-line);
  transition: all .2s ease; cursor: pointer;
}
.mvf-filter:hover { border-color: var(--mvf-ink); color: var(--mvf-ink); }
.mvf-filter.active { background: var(--mvf-ink); color: #fff; border-color: var(--mvf-ink); }

/* ---------------- Category tile (flat) ---------------- */
.mvf-tile {
  position: relative; overflow: hidden; border: 1px solid var(--mvf-line);
  aspect-ratio: 4/5; background: var(--mvf-surface); display: block;
  transition: transform .35s ease, border-color .25s ease;
}
.mvf-tile:hover { border-color: var(--mvf-ink); }
.mvf-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.mvf-tile:hover img { transform: scale(1.05); }
.mvf-tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 40%, rgba(10,10,10,.7) 100%);
}
.mvf-tile-body {
  position: absolute; inset-inline: 20px; bottom: 20px; color: #fff; text-align: right;
}

/* ---------------- Drawers / panels ---------------- */
.mvf-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,10,10,.4);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.mvf-overlay.open { opacity: 1; pointer-events: auto; }

.mvf-panel {
  position: fixed; z-index: 90; background: #fff; color: var(--mvf-ink);
  border: 1px solid var(--mvf-line);
  display: flex; flex-direction: column;
  transition: transform .4s ease;
}
.mvf-panel-right {
  top: 0; bottom: 0; inset-inline-end: 0;
  width: min(440px, 92vw);
  transform: translateX(110%);
  border-top: 0; border-bottom: 0;
}
[dir="rtl"] .mvf-panel-right { transform: translateX(-110%); }
.mvf-panel-right.open { transform: translateX(0) !important; }

.mvf-panel-full {
  inset: 0; transform: translateY(-8px); opacity: 0; pointer-events: none;
  background: #fff;
}
.mvf-panel-full.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.mvf-panel-bottom {
  left: 0; right: 0; bottom: 0;
  transform: translateY(100%);
}
.mvf-panel-bottom.open { transform: translateY(0); }

.mvf-close {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--mvf-ink); border: 1px solid var(--mvf-line);
  transition: all .2s ease;
}
.mvf-close:hover { background: var(--mvf-ink); color: #fff; border-color: var(--mvf-ink); }

.mvf-lang-shell {
  width: min(100%, 420px);
  margin-inline: auto;
  padding: 26px 22px 28px;
}

.mvf-country-btn,
.mvf-lang-btn {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--mvf-line);
  color: var(--mvf-ink);
  font-size: 13px;
  text-align: right;
  transition: border-color .2s ease, background-color .2s ease;
}

.mvf-country-btn:hover,
.mvf-lang-btn:hover {
  border-color: var(--mvf-line-strong);
}

.mvf-country-btn[aria-pressed="true"],
.mvf-lang-btn[aria-pressed="true"] {
  border-color: var(--mvf-ink);
  background: var(--mvf-surface);
}

.mvf-country-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mvf-country-currency {
  font-family: 'Inter','Tajawal',sans-serif;
  font-size: 10px;
  color: var(--mvf-muted);
  letter-spacing: .04em;
  direction: ltr;
}

.mvf-flag {
  width: 28px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
  border: 1px solid var(--mvf-line);
}

/* ---------------- Form fields ---------------- */
.mvf-field {
  width: 100%; height: 48px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--mvf-line);
  color: var(--mvf-ink); font-size: 14px;
  border-radius: 0;
  transition: border-color .2s ease;
}
.mvf-field:focus { outline: none; border-color: var(--mvf-ink); }
.mvf-field::placeholder { color: var(--mvf-muted); }

/* ---------------- Scrollbar ---------------- */
.mvf ::-webkit-scrollbar { width: 8px; height: 8px; }
.mvf ::-webkit-scrollbar-track { background: transparent; }
.mvf ::-webkit-scrollbar-thumb { background: var(--mvf-line-strong); }
.mvf ::-webkit-scrollbar-thumb:hover { background: var(--mvf-muted); }

.mvf-scroll-hide::-webkit-scrollbar { display: none; }
.mvf-scroll-hide { scrollbar-width: none; -ms-overflow-style: none; }

/* ---------------- Utility ---------------- */
#tailwind-cdn-warning { display: none !important; }
.mvf-line-clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.mvf-line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ---------------- Animations ---------------- */
@keyframes mvf-fade { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: translateY(0);} }
.mvf-fade { animation: mvf-fade .7s ease both; }
.mvf-fade-2 { animation-delay: .08s; }
.mvf-fade-3 { animation-delay: .16s; }
