.serif { font-family: var(--serif); }
.announce { background: var(--brand); color: var(--brand-ink); text-align: center; font-size: 13px; padding: 7px 16px; font-weight: 500; letter-spacing: .2px; }

/* الشريط العلوي */
.top { background: rgba(248, 242, 238, .9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.store-name { font-weight: 600; font-size: 30px; line-height: 1; color: var(--brand); }
.tagline { color: var(--muted); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; font-family: var(--serif); font-weight: 600; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.hello { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--ink); font-size: 13.5px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hello:hover { background: var(--brand-soft); }
.hello:empty { display: none; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; }
.cart-btn .count { position: absolute; top: -6px; left: -6px; background: var(--accent); color: #fff; min-width: 22px; height: 22px; border-radius: 11px; font-size: 12px; display: grid; place-items: center; padding: 0 6px; border: 2px solid var(--bg); }

/* البانر الرئيسي */
.hero { padding-top: 18px; }
.hero-img { border-radius: 22px; overflow: hidden; aspect-ratio: 2.3 / 1; background: #efe3dc; box-shadow: var(--shadow); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; }

/* العروض */
.offers { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; padding: 20px 0 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.offers::-webkit-scrollbar { display: none; }
.offer { scroll-snap-align: start; position: relative; border-radius: var(--radius); overflow: hidden; min-height: 140px; padding: 20px 22px; color: #fff; background: linear-gradient(135deg, #8a6656, #b48c78); display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; }
.offer:nth-child(3n+2) { background: linear-gradient(135deg, #9c6a6a, #c79a93); }
.offer:nth-child(3n+3) { background: linear-gradient(135deg, #94744a, #c2a173); }
.offer.has-img { background-size: cover; background-position: center; }
.offer.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(40,25,20,.7), rgba(40,25,20,.1)); }
.offer > * { position: relative; }
.offer .amt { font-size: 28px; font-weight: 700; line-height: 1.15; }
.offer h4 { margin: 4px 0 2px; font-size: 17px; }
.offer p { margin: 0; font-size: 13px; opacity: .92; }
.offer .until { font-size: 12px; opacity: .85; margin-top: 6px; }

.toolbar { padding: 22px 0 10px; }
.toolbar input { padding: 12px 18px; border-radius: 999px; font-size: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 18px; cursor: pointer; font-weight: 500; font-size: 14px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.hot { color: var(--accent); border-color: #ecc9c3; }
.chip.hot.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* المنتجات */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; padding: 18px 0 44px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .media { position: relative; aspect-ratio: 1; background: #f1e6df; cursor: pointer; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .media .badge { position: absolute; top: 10px; right: 10px; }
.card .media .feat { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); color: var(--gold); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: #cdb5a8; font-family: var(--serif); font-size: 44px; font-style: italic; }
.card .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { font-weight: 600; font-size: 15px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.card .btn { margin-top: 8px; border-radius: 999px; }

/* تفاصيل المنتج */
.gallery-main { aspect-ratio: 1; background: #f1e6df; border-radius: 12px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; flex: none; }
.thumbs img.on { border-color: var(--brand); }
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pd h2 { margin: 0 0 6px; font-size: 21px; }
.pd .desc { color: var(--muted); white-space: pre-line; margin: 10px 0 16px; }
.pd .prices { display: flex; align-items: baseline; gap: 10px; }
.pd .prices .price { font-size: 24px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: #f5ece6; cursor: pointer; font-size: 18px; }
.qty span { min-width: 38px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .pd { grid-template-columns: 1fr; } }

/* السلة */
.drawer { position: fixed; inset: 0; z-index: 40; background: rgba(40, 28, 24, .45); animation: fade .15s; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 100%); background: var(--surface); display: flex; flex-direction: column; }
.cart-items { flex: 1; overflow: auto; padding: 8px 20px; }
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci img, .ci .noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f1e6df; font-size: 22px; }
.ci .nm { font-weight: 600; font-size: 14px; }
.ci .rm { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; }
.cart-foot { border-top: 1px solid var(--line); padding: 16px 20px; }
.sum { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.sum.total { font-weight: 700; font-size: 17px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.sum.disc { color: var(--accent); }
.coupon { display: flex; gap: 8px; margin: 10px 0; }
.coupon input { flex: 1; text-transform: uppercase; }
.coupon-msg { font-size: 13px; margin-top: -4px; margin-bottom: 8px; }
.coupon-msg.err { color: var(--accent); }
.coupon-msg.ok { color: var(--brand); }

/* بيانات التوصيل في الطلب */
.ship-box { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.ship-box .hd { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 4px; }
.ship-box .hd button { background: none; border: 0; color: var(--brand); cursor: pointer; font-weight: 600; text-decoration: underline; }
.ship-box div { color: var(--ink); }

/* طرق الدفع */
.pay-sec { margin-bottom: 14px; }
.pay-title { font-weight: 600; margin-bottom: 8px; }
.pay-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.pay-opt { position: relative; cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt span { display: block; text-align: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 8px; font-weight: 600; font-size: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.pay-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.pay-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.pay-box { margin-top: 10px; background: #faf5f1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.wallet { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; cursor: pointer; }
.wallet input { accent-color: var(--brand); width: 18px; height: 18px; }
.wallet .w-info b { display: block; }
.wallet .w-info small { color: var(--muted); }
.wallet .w-num { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.t-details { white-space: pre-line; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.muted-sm { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.wa-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }

.success { text-align: center; padding: 10px 0; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 32px; margin: 0 auto 12px; }
.success h3 { margin: 0 0 6px; }
.success p { color: var(--muted); margin: 0 0 18px; }

.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 16px 40px; border-top: 1px solid var(--line); }
.foot-name { font-size: 26px; color: var(--brand); font-weight: 600; }

/* شاشة الترحيب */
.welcome { position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow: auto; display: flex; align-items: center; justify-content: center; padding: 20px; }
.welcome-card { width: 100%; max-width: 540px; background: var(--surface); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); margin: auto; }
.welcome-img { background: #efe3dc; aspect-ratio: 2 / 1; }
.welcome-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.welcome-form { padding: 34px 34px 30px; }
.welcome-form h1 { margin: 0; font-size: 24px; font-weight: 700; }
.welcome-form h1 .serif { font-size: 36px; color: var(--brand); font-weight: 600; }
.welcome-form .sub { color: var(--muted); margin: 4px 0 22px; font-size: 14px; }
.welcome-form .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.welcome-form .lbl small { font-weight: 400; }
.btn.lg { padding: 13px 18px; font-size: 16px; border-radius: 999px; margin-top: 6px; }
.loc-status { font-size: 13px; margin-top: 6px; color: var(--brand); }
.loc-status.err { color: var(--accent); }
.form-err { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin-bottom: 10px; }
.field.invalid input { border-color: var(--accent); }

@media (max-width: 760px) {
  .welcome { padding: 0; align-items: stretch; }
  .welcome-card { border-radius: 0; box-shadow: none; max-width: none; }
  .welcome-img { aspect-ratio: 16 / 9; }
  .welcome-form { padding: 22px 18px 30px; }
  .hero-img { aspect-ratio: 3 / 2; border-radius: 16px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .info { padding: 10px; }
  .card .name { font-size: 14px; }
  .cart-btn span { display: none; }
  .cart-btn { padding: 9px 13px; }
  .store-name { font-size: 26px; }
  .tagline { font-size: 9.5px; letter-spacing: 1.8px; }
  .hello { max-width: 110px; padding: 6px 10px; font-size: 12.5px; }
}
