:root{
  --cream:#FBF3E1;
  --comb:#F3E0AE;
  --amber:#C97C0C;
  --amber-dark:#8A5308;
  --bark:#3A2411;
  --bark-soft:#6E5237;
  --leaf:#4B7A4E;
  --leaf-bg:#E6EFDE;
  --line: rgba(58,36,17,0.14);
  --danger:#9B3B24;
  --danger-bg:#F6E4DE;
}
*{box-sizing:border-box; margin:0; padding:0;}
[hidden]{ display:none !important; }
body{
  background: var(--cream);
  color: var(--bark);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height:1.6;
  min-height:100vh;
}
/* صفحة القطفة: عمود مركزي ضيّق */
.page{
  width:100%; max-width: 480px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* Hero */
.hero{ text-align:center; padding: 8px 0 26px; }
.comb-icon{ width:56px; height:56px; margin:0 auto 14px; display:block; }
.brand{
  font-family:'Zain', 'Cairo', sans-serif;
  font-weight:800;
  font-size: 30px;
  color: var(--bark);
  letter-spacing: 0.5px;
}
.tagline{ color: var(--bark-soft); font-size: 14.5px; margin-top: 4px; }

/* ---- معرض الصور ---- */
.gallery{ margin: 0 0 18px; }
.gal-stage{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
  background: var(--comb);
  /* مربّع: بيشيل الصور الطولية والعرضية من غير ما يقص أي حاجة */
  aspect-ratio: 1 / 1;
  max-height: 68vh;
}
/* نسخة مكبّرة ومضبّبة من نفس الصورة بتملا الفراغ بدل الشرايط الفاضية */
.gal-bg{
  position:absolute; inset:-8%;
  background-size:cover; background-position:center;
  filter: blur(26px) saturate(1.15) brightness(.86);
  transform: scale(1.08);
  transition: background-image .15s linear;
}
.gal-stage::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(30,18,8,.10), rgba(30,18,8,.22));
}
.gal-stage img{
  position:relative; z-index:1;
  display:block;
  width:100%; height:100%;
  object-fit: contain;      /* الصورة كاملة، مفيش قص */
  cursor: zoom-in;
}
/* أيقونة تكبير صغيرة توضّح إن الصورة بتتفتح */
.gal-zoom{
  position:absolute; z-index:2; inset-block-start:10px; inset-inline-start:10px;
  width:30px; height:30px; border-radius:50%;
  background: rgba(30,18,8,.55); color:#fff;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none;
}
.gal-zoom svg{ width:17px; height:17px; }
@media (min-width: 620px){
  .gal-stage{ aspect-ratio: 4 / 3; }
}
.gal-nav{
  position:absolute; z-index:3; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:50%;
  border:none; cursor:pointer;
  background: rgba(255,255,255,.88); color: var(--bark);
  font-size:22px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 1px 6px rgba(58,36,17,.22);
}
.gal-prev{ right:10px; }
.gal-next{ left:10px; }
.gal-count{
  position:absolute; z-index:3; inset-block-end:10px; inset-inline-end:10px;
  background: rgba(30,18,8,.62); color:#fff;
  font-size:12px; border-radius:999px; padding:3px 10px;
  backdrop-filter: blur(4px);
}
.gal-thumbs{
  display:flex; gap:8px; margin-top:10px;
  overflow-x:auto; padding-bottom:4px;
  scrollbar-width:thin;
  scroll-snap-type:x proximity;
}
.gal-thumb{
  flex:0 0 auto; width:64px; height:64px; padding:0;
  border:2px solid transparent; border-radius:10px; overflow:hidden;
  background:var(--comb); cursor:pointer; opacity:.6;
  scroll-snap-align:start; transition: opacity .15s, border-color .15s;
}
.gal-thumb:hover{ opacity:.85; }
.gal-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.gal-thumb.on{ border-color: var(--amber); opacity:1; }

/* ---- عارض ملء الشاشة ---- */
.lightbox{
  position:fixed; inset:0; z-index:60;
  background: rgba(30,18,8,.94);
  display:flex; align-items:center; justify-content:center;
  padding: 24px 16px;
}
.lightbox img{ max-width:100%; max-height:86vh; border-radius:8px; }
.lb-close{
  position:absolute; inset-block-start: calc(12px + env(safe-area-inset-top, 0px));
  inset-inline-end:14px;
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background: rgba(255,255,255,.14); color:#fff; font-size:24px; line-height:1;
}
.lb-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border-radius:50%; border:none; cursor:pointer;
  background: rgba(255,255,255,.14); color:#fff; font-size:26px; line-height:1;
}
.lb-prev{ right:12px; }
.lb-next{ left:12px; }
.lb-count{
  position:absolute; inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
  inset-inline-start:50%; transform:translateX(50%);
  unicode-bidi:isolate;
  color:#fff; font-size:12.5px; opacity:.85;
}

/* Status strip */
.status{
  display:flex; align-items:center; gap:8px;
  background: var(--leaf-bg);
  color: var(--leaf);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight:600;
  margin-bottom: 22px;
}
.status svg{ flex-shrink:0; }
.status.is-warning{ background: var(--danger-bg); color: var(--danger); }

/* Data card */
.card{
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow:hidden;
  margin-bottom: 18px;
}
.row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.row:last-child{ border-bottom:none; }
.row .label{ color: var(--bark-soft); }
.row .value{ font-weight:600; text-align:left; }

/* Beekeeper */
.keeper{
  display:flex; align-items:center; gap:12px;
  background: var(--comb);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.avatar{
  width:44px; height:44px; border-radius:50%;
  background: var(--amber);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:'Zain','Cairo',sans-serif; font-weight:700; font-size:17px;
  flex-shrink:0;
}
.keeper .name{ font-weight:600; font-size:14.5px; }
.keeper .meta{ font-size:12.5px; color: var(--bark-soft); }

/* Story */
.story{ font-size: 14.5px; color: var(--bark-soft); padding: 0 4px 22px; }
.story strong{ color: var(--bark); font-weight:600; }

/* Actions */
.actions{ display:flex; flex-direction:column; gap:10px; }
.btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  border-radius: 10px;
  padding: 13px;
  font-family:'Cairo', sans-serif; font-size:14.5px; font-weight:600;
  border:none; cursor:pointer;
  text-decoration:none;
  color: var(--bark);
}
.btn-primary{ background: var(--leaf); color:#fff; }
.btn-secondary{ background:#fff; border:1px solid var(--line); color: var(--bark); }
.btn:focus-visible{ outline: 2px solid var(--amber-dark); outline-offset:2px; }

/* Rating */
.rating{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; margin-top:10px; text-align:center;
}
.rating p{ font-size:13.5px; color:var(--bark-soft); margin-bottom:8px; }
.stars{ display:flex; justify-content:center; gap:6px; }
.star{
  background:none; border:none; cursor:pointer; padding:2px;
  font-size:26px; line-height:1; color:#D9CDB6;
}
.star.on{ color: var(--amber); }
.rating-note{ font-size:12.5px; color:var(--bark-soft); margin-top:8px; min-height:18px; }

.footer-note{ text-align:center; font-size:12px; color: var(--bark-soft); margin-top: 26px; }
.footer-note a{ color: var(--amber-dark); }
.batch-code{
  display:inline-block; margin-top:6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:11.5px; letter-spacing:.5px; color:var(--bark-soft);
  background:#fff; border:1px solid var(--line);
  border-radius:6px; padding:2px 8px;
}

/* States */
.state{ text-align:center; padding: 40px 10px; }
.state h1{ font-family:'Zain','Cairo',sans-serif; font-size:24px; margin-bottom:8px; }
.state p{ color: var(--bark-soft); font-size:14.5px; }
.state .btn{ margin-top:18px; }

@media (prefers-reduced-motion:no-preference){
  .card, .keeper, .status{ animation: rise .5s ease both; }
  .card{ animation-delay:.05s; }
  .keeper{ animation-delay:.1s; }
}
@keyframes rise{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);} }
