/* ============================================================
   جمعية رياديات دير السودان — Design System v3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&family=Reem+Kufi:wght@400;500;600;700&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F5F0;
  --surface: #FFFFFF;
  --red: #CE2029;
  --red-hover: #A91A22;
  --red-bg: #FFF0F0;
  --green: #1B7A2B;
  --green-hover: #146120;
  --green-bg: #EDFAEF;
  --green-dark: #0D4D18;
  --earth: #9B6B3D;
  --earth-bg: #FDF6EE;
  --black: #111111;
  --text: #222222;
  --text-mid: #555555;
  --text-light: #888888;
  --border: #E2E0DB;
  --border-light: #F0EEEA;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --font-h: 'Reem Kufi', sans-serif;
  --font-b: 'Readex Pro', sans-serif;
  --ease: .2s ease;
}

[data-theme="dark"] {
  --bg: #0E0E0D;
  --bg-alt: #161614;
  --surface: #1C1B19;
  --red-bg: #2A1012;
  --green-bg: #0E1F11;
  --earth-bg: #1F1710;
  --text: #EDEDED;
  --text-mid: #AAAAAA;
  --text-light: #777777;
  --border: #2A2926;
  --border-light: #1F1E1C;
  --shadow: 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 4px 20px rgba(0,0,0,.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; font-size: clamp(15px, 0.9vw + 12px, 17px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-b); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
  transition: background var(--ease), color var(--ease); overflow-x: hidden;
}
[dir="ltr"] body { direction: ltr; text-align: left; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity var(--ease); }
a:hover { opacity: .85; }
.container { width: min(1100px, 90%); margin-inline: auto; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; padding: 8px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600; z-index: 999;
}
.skip-link:focus { top: 0; }

/* ---- Tatreez ---- */
.tatreez {
  height: 52px;
  background: url('../assets/images/ta2.jpg') repeat-x center;
  background-size: auto 100%;
}
.tatreez-sm {
  height: 28px;
  background: url('../assets/images/ta.jpg') repeat-x center;
  background-size: auto 100%;
}

/* ---- Header ---- */
.site-header {
  background: var(--bg); position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 95px; height: 95px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--font-h); font-weight: 700; font-size: clamp(.88rem, 1.8vw, 1rem); color: var(--text); }

.nav-center { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; }
.nav-center a {
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: clamp(.82rem, 1.4vw, .9rem); font-weight: 500; color: var(--text-mid);
  transition: all var(--ease); white-space: nowrap;
}
.nav-center a:hover { background: var(--green-bg); color: var(--green); opacity: 1; }
.nav-center a[aria-current="page"] { background: var(--green-bg); color: var(--green); font-weight: 600; }
[data-theme="dark"] .nav-center a:hover,
[data-theme="dark"] .nav-center a[aria-current="page"] { color: #6CD97E; }

.controls { display: flex; gap: 5px; align-items: center; }
.btn-icon {
  min-width: 36px; height: 36px; padding: 0 10px; line-height: 1; white-space: nowrap;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: none; color: var(--text-mid); cursor: pointer;
  transition: all var(--ease);
}
.btn-icon:hover { background: var(--bg-alt); color: var(--text); }
#langToggle { min-width: 56px; font-size: .8rem; font-weight: 700; font-family: var(--font-b); }

/* Hamburger */
.hamburger {
  display: none; width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0;
}
.hamburger span {
  display: block; width: 16px; height: 2px; background: var(--text);
  border-radius: 1px; transition: all var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-center {
    display: none; flex-direction: column; width: 100%;
    padding: 10px 0; gap: 2px;
    border-top: 1px solid var(--border); margin-top: 6px;
  }
  .nav-center.open { display: flex; }
  .nav-center a { width: 100%; padding: 10px 14px; }
  .nav-wrap { flex-wrap: wrap; }
  .brand { flex: 1; }
}

/* ---- Hero ---- */
.hero { padding: clamp(44px, 7vw, 80px) 0 clamp(36px, 5vw, 56px); text-align: center; }
.hero h1 {
  font-family: var(--font-h); font-size: clamp(1.5rem, 3.8vw, 2.6rem);
  font-weight: 700; line-height: 1.35; margin-bottom: 14px; color: var(--text);
}
.hero .tagline {
  font-size: clamp(.92rem, 1.6vw, 1.1rem); color: var(--text-mid);
  max-width: 620px; margin: 0 auto 24px; line-height: 1.8;
}
.cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px;
  font-family: var(--font-b); font-weight: 600; font-size: clamp(.84rem, 1.4vw, .92rem);
  border: none; cursor: pointer; transition: all var(--ease);
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); opacity: 1; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); opacity: 1; }
.btn-outline { background: none; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg-alt); opacity: 1; }

.hero-image.has-image { border: none; min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.hero-image.has-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image {
  margin: 32px auto 0; max-width: 700px; border-radius: var(--radius);
  background: var(--bg-alt); min-height: 200px; display: grid; place-items: center;
  color: var(--text-light); font-size: .88rem; border: 1px dashed var(--border);
}

/* ---- Sections ---- */
.section { padding: clamp(36px, 5vw, 56px) 0; }
.section.alt { background: var(--bg-alt); }
.section-header { margin-bottom: 24px; }
.section-header h2 {
  font-family: var(--font-h); font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem); color: var(--text); margin-bottom: 6px;
}
.section-header p { color: var(--text-mid); font-size: clamp(.88rem, 1.4vw, .98rem); max-width: 620px; }

.content-body { color: var(--text-mid); font-size: clamp(.88rem, 1.4vw, .98rem); line-height: 1.8; max-width: 700px; }
.content-body p { margin-bottom: 10px; }
.content-body ul { list-style: none; padding: 0; margin: 14px 0; }
.content-body li { position: relative; padding-inline-start: 22px; margin-bottom: 8px; }
.content-body li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 10px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
}

/* Quote */
.quote {
  font-family: var(--font-h); font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600; color: var(--red); text-align: center;
  padding: clamp(28px, 4vw, 44px) 0; max-width: 560px; margin: 0 auto; line-height: 1.5;
}

/* Vision */
.vision-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.vision-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.vision-item:hover { box-shadow: var(--shadow-md); }
.vision-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--green-bg); display: grid; place-items: center; font-size: 1.1rem;
}
.vision-item p { font-size: clamp(.84rem, 1.3vw, .92rem); color: var(--text-mid); }

/* Flow */
.flow-chain {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; padding: 18px 0;
  font-family: var(--font-h); font-weight: 500; font-size: clamp(.8rem, 1.3vw, .9rem);
}
.flow-chain .step {
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.flow-chain .arrow { color: var(--red); font-size: 1.1rem; }
[dir="ltr"] .flow-chain .arrow { transform: scaleX(-1); }

/* ---- Garden Hero ---- */
.garden-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff; padding: clamp(44px, 7vw, 72px) 0; text-align: center;
}
.garden-hero h1 { font-family: var(--font-h); font-weight: 700; font-size: clamp(1.5rem, 3.8vw, 2.4rem); margin-bottom: 10px; }
.garden-hero p { max-width: 560px; margin: 0 auto; opacity: .92; font-size: clamp(.88rem, 1.5vw, 1rem); }

/* Tabs */
.tabs { display: flex; gap: 6px; justify-content: center; margin: 10px 0 28px; flex-wrap: wrap; }
.tab {
  padding: 9px 20px; border-radius: 999px; border: 2px solid var(--green);
  background: none; color: var(--green); cursor: pointer;
  font-family: var(--font-b); font-weight: 600; font-size: clamp(.8rem, 1.3vw, .88rem);
  transition: all var(--ease);
}
[data-theme="dark"] .tab { color: #6CD97E; border-color: #4CAF5C; }
.tab[aria-selected="true"] { background: var(--green); color: #fff; }
[data-theme="dark"] .tab[aria-selected="true"] { background: var(--green); color: #fff; border-color: var(--green); }

/* Products */
.products-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.product-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.product-image {
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt);
  display: grid; place-items: center; color: var(--text-light); font-size: .84rem;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.kind-badge {
  display: inline-block; font-size: .73rem; padding: 3px 10px; margin-bottom: 6px; width: fit-content;
  border-radius: 999px; font-weight: 600; background: var(--earth-bg); color: var(--earth);
}
.meta-date { display: block; font-size: .76rem; color: var(--text-light); margin-bottom: 4px; }
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-family: var(--font-h); font-weight: 600; font-size: clamp(.9rem, 1.4vw, 1rem); margin-bottom: 4px; }
.product-body .desc { color: var(--text-mid); font-size: clamp(.8rem, 1.2vw, .88rem); margin-bottom: 10px; flex: 1; }

.season-badge {
  display: inline-block; font-size: .73rem; padding: 3px 10px;
  border-radius: 999px; font-weight: 600; margin-bottom: 6px; width: fit-content;
}
.season-badge.winter { background: #E8F4FD; color: #1565A0; }
.season-badge.summer { background: #FFF3E0; color: #A05600; }
.season-badge.year_round { background: var(--green-bg); color: var(--green); }
[data-theme="dark"] .season-badge.winter { background: #0D2540; color: #64B5F6; }
[data-theme="dark"] .season-badge.summer { background: #332200; color: #FFB74D; }
[data-theme="dark"] .season-badge.year_round { background: #0E1F11; color: #81C784; }

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  background: #25D366; color: #fff; font-weight: 600;
  font-size: clamp(.8rem, 1.2vw, .86rem);
  border: none; cursor: pointer; width: 100%; justify-content: center;
  transition: all var(--ease);
}
.btn-whatsapp:hover { background: #1EBE57; opacity: 1; }
.btn-whatsapp svg { width: 16px; height: 16px; }

/* Contact */
.contact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: flex-start; gap: 12px;
  transition: box-shadow var(--ease);
}
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-card .icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: 1.2rem;
}
.contact-card .icon.wa { background: #DCF8E5; color: #25D366; }
.contact-card .icon.fb { background: #E7F0FE; color: #1877F2; }
[data-theme="dark"] .contact-card .icon.wa { background: #0E2D16; }
[data-theme="dark"] .contact-card .icon.fb { background: #0E1E3A; }
.contact-card h3 { font-size: clamp(.88rem, 1.3vw, .92rem); font-weight: 600; margin-bottom: 2px; }
.contact-card p { font-size: clamp(.8rem, 1.2vw, .88rem); color: var(--text-mid); }

/* Footer */
.site-footer { padding: 24px 0; text-align: center; color: var(--text-light); font-size: .84rem; }
.flagline { height: 4px; max-width: 100px; margin: 0 auto 12px; border-radius: 2px; overflow: hidden; display: flex; }
.flagline span { flex: 1; }
.flagline .fl-black { background: #111; }
.flagline .fl-white { background: #DDD; }
.flagline .fl-green { background: var(--green); }
.flagline .fl-red { background: var(--red); }
[data-theme="dark"] .flagline .fl-black { background: #EEE; }
[data-theme="dark"] .flagline .fl-white { background: #444; }

/* Floating WA */
.wa-float {
  position: fixed; bottom: 20px; left: 20px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 3px 12px rgba(37,211,102,.4);
  transition: transform var(--ease);
}
[dir="ltr"] .wa-float { left: auto; right: 20px; }
.wa-float:hover { transform: scale(1.1); opacity: 1; }

/* Placeholder */
.img-placeholder {
  background: var(--bg-alt); border-radius: var(--radius); display: grid; place-items: center;
  min-height: 150px; color: var(--text-light); font-size: .84rem; border: 1px dashed var(--border);
}

/* Skeleton */
.skeleton { background: var(--bg-alt); border-radius: var(--radius-sm); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* Responsive */
@media (max-width: 480px) {
  .container { width: 94%; }
  .products-grid { grid-template-columns: 1fr; }
  .wa-float { width: 46px; height: 46px; bottom: 14px; left: 14px; font-size: 1.2rem; }
  [dir="ltr"] .wa-float { left: auto; right: 14px; }
}

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-layout {
  display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
}
@media (max-width: 768px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-sidebar {
  background: var(--surface); border-inline-end: 1px solid var(--border);
  padding: 20px 16px; display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar h2 { font-family: var(--font-h); font-size: 1rem; margin-bottom: 16px; color: var(--green); }
.admin-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text-mid); font-size: .88rem;
  font-weight: 500; cursor: pointer; transition: all var(--ease);
  border: none; background: none; width: 100%; text-align: inherit;
}
.admin-nav-item:hover { background: var(--bg-alt); color: var(--text); }
.admin-nav-item.active { background: var(--green-bg); color: var(--green); font-weight: 600; }

.admin-main { padding: 24px; overflow-y: auto; }
.admin-main h1 { font-family: var(--font-h); font-size: 1.4rem; margin-bottom: 20px; }

.admin-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.admin-card h3 { font-family: var(--font-h); font-size: 1rem; margin-bottom: 12px; }

.admin-field { margin-bottom: 14px; }
.admin-field label { display: block; font-size: .84rem; font-weight: 600; color: var(--text-mid); margin-bottom: 4px; }
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-b); font-size: .9rem; background: var(--bg);
  color: var(--text); transition: border-color var(--ease);
}
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus { outline: none; border-color: var(--green); }
.admin-field textarea { min-height: 100px; resize: vertical; }

.admin-btn {
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  font-family: var(--font-b); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all var(--ease);
}
.admin-btn-primary { background: var(--green); color: #fff; }
.admin-btn-primary:hover { background: var(--green-hover); }
.admin-btn-danger { background: var(--red); color: #fff; }
.admin-btn-danger:hover { background: var(--red-hover); }
.admin-btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.admin-btn-outline:hover { background: var(--bg-alt); }

.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: inherit; padding: 10px 12px; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--text-mid); font-size: .82rem; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
.admin-table tr:hover td { background: var(--bg-alt); }

.admin-img-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-alt); }

.admin-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.admin-status.active { background: var(--green-bg); color: var(--green); }
.admin-status.inactive { background: var(--red-bg); color: var(--red); }

.admin-actions { display: flex; gap: 6px; }
.admin-action-btn {
  padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: none; cursor: pointer; font-size: .8rem; color: var(--text-mid);
  transition: all var(--ease);
}
.admin-action-btn:hover { background: var(--bg-alt); color: var(--text); }

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px;
  text-align: center; color: var(--text-light); cursor: pointer;
  transition: all var(--ease);
}
.upload-zone:hover { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.upload-zone p { font-size: .88rem; }

@media (max-width: 768px) {
  .admin-sidebar {
    flex-direction: row; overflow-x: auto; gap: 2px; padding: 12px;
    border-inline-end: none; border-bottom: 1px solid var(--border);
  }
  .admin-sidebar h2 { display: none; }
  .admin-nav-item { white-space: nowrap; padding: 8px 14px; }
  .admin-main { padding: 16px; }
}

/* ---- Slider (عرض الصور) ---- */
.slider { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; touch-action: pan-y; outline: none; }
.slider:focus-visible { box-shadow: 0 0 0 3px var(--green); }
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease; user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
}
.slide.is-active { opacity: 1; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.4); color: #fff; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; transition: background var(--ease), opacity var(--ease);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.slider-btn:hover { background: rgba(0,0,0,.65); }
.slider-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slider-btn.prev { inset-inline-start: 10px; }
.slider-btn.next { inset-inline-end: 10px; }
.slider-btn.prev::before { content: '\2039'; }
.slider-btn.next::before { content: '\203A'; }
[dir="rtl"] .slider-btn.prev::before { content: '\203A'; }
[dir="rtl"] .slider-btn.next::before { content: '\2039'; }
.slider-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; gap: 6px; padding: 5px 9px; border-radius: 999px; background: rgba(0,0,0,.3);
}
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width var(--ease), background var(--ease);
}
.slider-dots button[aria-current="true"] { width: 22px; background: #fff; }
.slider-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) {
  .slider .slider-btn { opacity: 0; }
  .slider:hover .slider-btn, .slider:focus-within .slider-btn { opacity: 1; }
}
@media (max-width: 480px) { .slider-btn { width: 34px; height: 34px; font-size: 1.3rem; } }
.hero-image.has-image { position: relative; }

/* ---- Achievement cards ---- */
.ach-card { color: inherit; cursor: pointer; text-align: start; }
.ach-card:hover { opacity: 1; }
.ach-card:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.ach-card .product-image { position: relative; }
.photo-count {
  position: absolute; bottom: 8px; inset-inline-end: 8px; padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: .72rem;
}
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { color: var(--green); font-weight: 600; font-size: .84rem; margin-top: auto; }
[data-theme="dark"] .read-more { color: #6CD97E; }

/* ---- Achievement modal ---- */
html.modal-open { overflow: hidden; }
.ach-modal {
  margin: auto; inset: 0; position: fixed;
  width: min(760px, 94vw); max-height: 90vh; max-height: 90dvh; padding: 0; overflow-y: auto;
  border: none; border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.ach-modal::backdrop { background: rgba(0,0,0,.6); }
.ach-modal[open] { animation: modal-in .25s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-media { position: relative; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.modal-body { padding: clamp(18px, 3vw, 28px); }
.modal-body h2 { font-family: var(--font-h); font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin: 4px 0 12px; }
.modal-close {
  position: sticky; top: 10px; float: left; float: inline-end; margin: 10px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font-size: 1rem; display: grid; place-items: center;
}
.modal-close:hover { background: rgba(0,0,0,.75); }
@media (max-width: 480px) {
  .ach-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
}
.admin-gallery-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* متصفحات قديمة بدون aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .hero-image.has-image { height: 50vw; max-height: 394px; }
  .modal-media { height: 60vw; max-height: 475px; }
  .product-image { height: 170px; }
}

/* ---- عرض المزيد / عرض أقل للإنجازات ---- */
.ach-toggle-row { display: none; justify-content: center; margin-top: 22px; }
@media (max-width: 640px) {
  .ach-list.is-collapsed > .ach-card:nth-child(n+4) { display: none; }
  .ach-list.more-mobile + .ach-toggle-row { display: flex; }
}
@media (min-width: 641px) {
  .ach-list.is-collapsed > .ach-card:nth-child(n+7) { display: none; }
  .ach-list.more-desktop + .ach-toggle-row { display: flex; }
}

/* ---- أسعار المنتج حسب الوحدة ---- */
.price-list { list-style: none; padding: 0; margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.price-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; font-size: .86rem; }
.price-list li + li { border-top: 1px solid var(--border-light); }
.price-list span { color: var(--text-mid); }
.price-list strong { color: var(--green); font-weight: 700; white-space: nowrap; }
[data-theme="dark"] .price-list strong { color: #6CD97E; }
