/* ============================================================
   components.css — بنرات، منتجات، بوب أب، سلة، طلب، فوتر
   ============================================================ */

/* ── Banner ── */
.banner-wrap  { padding: 10px 16px 0; }
.banner-track { border-radius: var(--radius); overflow: hidden; height: 140px; cursor: grab; position: relative; }
.banner-slides { display: flex; height: 100%; transition: transform .38s cubic-bezier(.4,0,.2,1); }
.banner-slide  { min-width: 100%; height: 140px; position: relative; display: flex; align-items: flex-end; padding: 12px 14px; flex-shrink: 0; }
.slide-bg    { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-ov    { position: absolute; inset: 0; }
.slide-txt   { position: relative; z-index: 1; flex: 1; }
.slide-tag   { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; margin-bottom: 5px; }
.slide-title { font-size: 16px; font-weight: 900; line-height: 1.2; }
.slide-sub   { font-size: 11px; margin-top: 2px; opacity: .85; }
.slide-cta   { position: relative; z-index: 1; padding: 7px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; align-self: flex-end; flex-shrink: 0; margin-right: 8px; cursor: pointer; border: none; }
.banner-dots { display: flex; gap: 5px; justify-content: center; margin-top: 7px; }
.bdot { width: 6px; height: 6px; border-radius: 3px; background: rgba(184,150,74,.3); transition: .3s; cursor: pointer; }
.bdot.on { background: var(--gold); width: 20px; }

/* ── Products ── */
.prods-section { padding: 12px 16px 60px; }
.sec-title { font-size: 16px; font-weight: 800; margin: 14px 0 10px; }
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media(min-width: 480px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media(min-width: 768px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }

.prod-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: .18s;
  box-shadow: var(--shadow);
}
.prod-card:active { transform: scale(.97); }
.prod-img {
  padding-top: 72%;
  position: relative;
  background: linear-gradient(135deg, #2A241D, var(--gold));
  overflow: hidden;
}
.prod-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.prod-card:hover .prod-img img { transform: scale(1.05); }
.prod-img-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.prod-badge { position: absolute; top: 8px; right: 8px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.prod-body  { padding: 10px; }
.prod-name  { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.prod-price { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.prod-price strong { color: var(--gold); font-size: 14px; }
.prod-btn {
  width: 100%; padding: 8px;
  border-radius: 8px;
  background: var(--dark); color: var(--cream);
  font-size: 12px; font-weight: 700;
  text-align: center; transition: .15s;
}
.prod-btn:hover { background: var(--gold); color: #fff; }

/* ── Product Popup ── */
.popup-ov {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: flex-end;
  background: rgba(28,24,20,0);
  transition: background .25s;
}
.popup-ov.on { display: flex; background: rgba(28,24,20,.55); }
.popup-sheet {
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  width: 100%; max-height: 92vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  touch-action: pan-y;
}
.popup-ov.on .popup-sheet { transform: translateY(0); }
@media(min-width: 600px) {
  .popup-ov    { align-items: center; }
  .popup-sheet { border-radius: 22px; max-width: 520px; max-height: 88vh; margin: auto; }
}
.popup-drag {
  width: 40px; height: 4px;
  background: rgba(184,150,74,.3);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.popup-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.popup-img { height: 220px; background: linear-gradient(135deg, #2A241D, var(--gold)); position: relative; overflow: hidden; }
.popup-img img { width: 100%; height: 100%; object-fit: cover; }
.popup-img-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; }
.popup-close {
  position: absolute; top: 12px; left: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(28,24,20,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; z-index: 2; transition: .2s;
}
.popup-close:hover { background: rgba(28,24,20,.85); }
.popup-body  { padding: 16px 18px 10px; }
.popup-name  { font-size: 20px; font-weight: 900; color: var(--text); }
.popup-desc  { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.popup-sec   { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: .5px; text-transform: uppercase; margin: 16px 0 8px; }

.var-list, .ext-list { display: flex; flex-direction: column; gap: 6px; }
.var-opt, .ext-opt {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card);
  cursor: pointer; transition: .15s;
}
.var-opt:hover, .var-opt.on { border-color: var(--gold); background: var(--cream); }
.ext-opt.on  { border-color: #25D366; background: #F0FDF4; }
.var-lbl, .ext-lbl { font-size: 14px; font-weight: 500; }
.var-price   { font-size: 15px; font-weight: 700; color: var(--gold); }
.ext-left    { display: flex; align-items: center; gap: 10px; }
.ext-chk {
  width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid #ccc;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: .2s; flex-shrink: 0;
}
.ext-chk.on  { background: #1E7A4A; border-color: #1E7A4A; color: #fff; }
.ext-price   { font-size: 14px; font-weight: 700; color: #1E7A4A; }

.popup-total {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cream); border-radius: 12px;
  padding: 12px 16px; margin: 16px 0 10px;
}
.total-lbl   { font-size: 13px; color: var(--muted); font-weight: 600; }
.total-val   { display: flex; align-items: baseline; gap: 4px; }
.total-val strong { font-size: 26px; font-weight: 900; color: var(--gold); }
.total-val span   { font-size: 13px; color: var(--muted); }
.qty-ctrl    { display: flex; align-items: center; gap: 12px; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.qty-num { font-size: 18px; font-weight: 800; min-width: 24px; text-align: center; }

.popup-actions {
  display: flex; gap: 8px; padding: 10px 18px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 22px 22px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
@media(min-width: 600px) { .popup-actions { border-radius: 0 0 22px 22px; } }
.pop-btn { flex: 1; padding: 13px 8px; border-radius: 12px; font-size: 14px; font-weight: 700; text-align: center; transition: .15s; }
.pop-btn-cart { background: var(--dark); color: var(--cream); }
.pop-btn-cart:hover { background: #000; }
.pop-btn-wa   { background: #25D366; color: #fff; }
.pop-btn-wa:hover { background: #128C7E; }

/* ── Order Type Modal ── */
.order-ov {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: flex-end;
  background: rgba(28,24,20,0); transition: background .25s;
}
.order-ov.on { display: flex; background: rgba(28,24,20,.6); }
.order-sheet {
  background: #fff; border-radius: 22px 22px 0 0;
  width: 100%; transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.order-ov.on .order-sheet { transform: translateY(0); }
@media(min-width: 600px) { .order-ov { align-items: center; } .order-sheet { border-radius: 22px; max-width: 460px; margin: auto; } }
.order-drag { width: 40px; height: 4px; background: #e0d8c8; border-radius: 2px; margin: 10px auto 0; }
.order-hdr  { padding: 18px 20px 14px; text-align: center; border-bottom: 1px solid #f0ebe0; }
.order-hdr h3 { font-size: 18px; font-weight: 800; color: var(--text); }
.order-hdr p  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.order-types  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 20px; }
.order-type-btn {
  padding: 18px 12px; border-radius: 14px;
  border: 2px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: .2s; background: #fff;
}
.order-type-btn:hover, .order-type-btn.on { border-color: var(--gold); background: var(--cream); }
.order-type-ico  { font-size: 32px; }
.order-type-lbl  { font-size: 14px; font-weight: 700; color: var(--text); }
.order-type-desc { font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }
.order-form  { padding: 0 20px 16px; }
.order-field { margin-bottom: 12px; }
.order-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.order-field input, .order-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: 'Tajawal', sans-serif;
  outline: none; transition: .2s; background: #fff;
}
.order-field input:focus, .order-field textarea:focus { border-color: var(--gold); }
.order-field textarea { resize: none; min-height: 80px; }
.order-submit {
  width: 100%; padding: 14px; border-radius: 12px;
  background: #25D366; color: #fff;
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 4px 0; cursor: pointer; transition: .15s; border: none;
  font-family: 'Tajawal', sans-serif;
}
.order-submit:hover { background: #128C7E; }
.order-back {
  width: 100%; padding: 11px; border-radius: 12px;
  background: #f5f0e8; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 6px;
  border: none; font-family: 'Tajawal', sans-serif;
}

/* ── Cart ── */
.cart-ov {
  position: fixed; inset: 0; z-index: 400;
  display: none; align-items: flex-end;
  background: rgba(28,24,20,0);
}
.cart-ov.on { display: flex; background: rgba(28,24,20,.55); }
.cart-sheet {
  background: #fff; border-radius: 22px 22px 0 0;
  width: 100%; max-height: 85vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-ov.on .cart-sheet { transform: translateY(0); }
@media(min-width: 600px) { .cart-ov { align-items: center; } .cart-sheet { border-radius: 22px; max-width: 500px; max-height: 80vh; margin: auto; } }
.cart-hdr { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cart-hdr h2 { font-size: 18px; font-weight: 800; }
.cart-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--muted); cursor: pointer; }
.cart-body  { flex: 1; overflow-y: auto; padding: 12px 20px; overscroll-behavior: contain; }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.cart-empty-ico { font-size: 48px; margin-bottom: 10px; }
.cart-item  { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.ci-img { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg,#2A241D,var(--gold)); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; }
.ci-name    { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-details { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.ci-row     { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ci-price   { font-size: 15px; font-weight: 800; color: var(--gold); }
.ci-qty     { display: flex; align-items: center; gap: 8px; }
.ci-qty-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s; }
.ci-qty-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.ci-qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.ci-rm { color: var(--red); font-size: 18px; cursor: pointer; padding: 4px; flex-shrink: 0; }
.cart-footer { padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.cart-total  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cart-total-lbl { font-size: 15px; color: var(--muted); font-weight: 600; }
.cart-total-val { font-size: 22px; font-weight: 900; color: var(--gold); }
.cart-wa-btn {
  width: 100%; padding: 13px; background: #25D366; color: #fff;
  border-radius: 12px; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px; cursor: pointer; transition: .15s; border: none;
  font-family: 'Tajawal', sans-serif;
}
.cart-wa-btn:hover { background: #128C7E; }
.cart-more-btn {
  width: 100%; padding: 11px; background: var(--bg);
  border: 1.5px solid var(--border); color: var(--text);
  border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .15s; border: 1.5px solid var(--border);
  font-family: 'Tajawal', sans-serif;
}
.cart-more-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Footer ── */
.site-footer { background: var(--dark); border-top: 2px solid var(--gold); padding: 24px 20px 32px; text-align: center; }
.footer-follow { color: rgba(239,230,211,.5); font-size: 11px; font-weight: 700; letter-spacing: .8px; margin-bottom: 14px; }
.footer-socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.soc-btn {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06); transition: .25s;
  overflow: hidden; padding: 11px;
}
.soc-btn img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); transition: filter .2s; }
.soc-btn:hover { transform: translateY(-3px); border-color: var(--gold); background: rgba(184,150,74,.15); }
.soc-btn:hover img { filter: brightness(0) saturate(100%) invert(70%) sepia(60%) saturate(400%) hue-rotate(5deg); }
.footer-divider { width: 60px; height: 1px; background: rgba(184,150,74,.3); margin: 0 auto 14px; }
.footer-copy { color: rgba(239,230,211,.35); font-size: 11px; line-height: 1.9; }
.footer-copy a { color: var(--gold); font-weight: 700; }
.footer-copy a:hover { text-decoration: underline; }

/* ── Desktop ── */
@media(min-width: 900px) {
  body { background: linear-gradient(135deg, var(--dark) 0%, #2A241D 100%); background-attachment: fixed; }
  .site-wrap { max-width: 1080px; margin: 0 auto; background: var(--bg); min-height: 100vh; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .banner-track { height: 200px; }
  .banner-slide { height: 200px; }
  .hdr-inner, .cats-wrap, .banner-wrap, .prods-section { padding-right: 24px; padding-left: 24px; }
  .prods-section { padding-bottom: 80px; }
  .prod-grid { grid-template-columns: repeat(4,1fr); gap: 14px; }
}
