:root {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6560;
  --faint: #9a958f;
  --line: #e6e2dc;
  --soft: #faf8f5;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Naskh Arabic", "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.wrap { width: min(1080px, calc(100% - 56px)); margin: 0 auto; }

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #fff;
  border-bottom: 1px solid #eee;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.bar { background: #feee00; }

.bar-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.logo {
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.logo .g, .wordmark .g { color: #385623; }
.logo .r, .wordmark .r { color: #ff0000; }

.search input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 0 16px;
}

.field input,
.buy input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 0.55rem 0.1rem;
}

.tools { display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: 0.92rem; }

.dest { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dest select { border: 0; background: transparent; font-weight: 800; max-width: 9rem; }

.user, .logout, .cart-link { font-weight: 700; }
.logout { white-space: nowrap; }
.cart-link b {
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  margin-inline-start: 0.2rem;
  border-radius: 999px;
  background: #111;
  color: #feee00;
  font-size: 0.72rem;
}

.menu {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  overflow: auto;
}
.menu a {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}
.menu a:hover { color: #000; }

.front {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 16px auto 0;
  border-radius: 18px;
  overflow: hidden;
  min-height: 340px;
  background: #f6f3ee;
}
.front img { width: 100%; height: 420px; object-fit: cover; display: block; }
.front-copy {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(48%, 520px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 32px;
  background: linear-gradient(90deg, rgba(255,252,247,0.94) 0%, rgba(255,252,247,0.78) 62%, rgba(255,252,247,0) 100%);
}
.front-copy .ar { display: block; margin-top: 0.85rem; font-size: 1.2rem; font-weight: 700; }
.front-copy .promise { margin: 0.8rem 0 0; font-size: 1.35rem; font-weight: 700; }
.front-copy .reach { margin: 0.15rem 0 0; color: var(--muted); }
.ad-slider {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  height: 230px;
  margin: 14px auto 28px;
  border-radius: 16px;
  overflow: hidden;
  background: #f6f3ee;
}
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.ad-slide.on { opacity: 1; z-index: 1; }
.ad-slide img { width: 100%; height: 230px; object-fit: cover; display: block; }
.ad-slide.on img { animation: ad-drift 7s ease-out; }
@keyframes ad-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.ad-slide span {
  position: absolute;
  right: 16px;
  bottom: 14px;
  background: rgba(255,255,255,0.94);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 700;
}
.ad-dots { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; gap: 6px; }
.ad-dots button { width: 9px; height: 9px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.75); cursor: pointer; }
.ad-dots button.on { background: #111; }
.ads-editor h2 { margin: 0.4rem 0 0.8rem; font-size: 1.1rem; }
.ad-edit { display: grid; grid-template-columns: 140px 1fr 1fr auto auto; gap: 10px; align-items: center; margin-bottom: 12px; }
.ad-edit img { width: 140px; height: 72px; object-fit: cover; border-radius: 8px; }
.ad-edit input { width: 100%; border: 1px solid #e1e5eb; border-radius: 8px; padding: 0.45rem 0.6rem; }
.brand {
  text-align: center;
  padding: 3.2rem 0 1.4rem;
}
.wordmark-wrap { display: inline-block; text-align: left; }
.wordmark {
  margin: 0;
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 6.2vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.pantry {
  margin: 0.95rem 0 0;
  color: #000;
  font-family: Arial, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand .ar { display: block; margin-top: 0.85rem; font-size: 1.25rem; font-weight: 600; }
.brand .rule { width: 9rem; height: 1px; background: var(--line); border: 0; margin: 1.4rem auto; }
.brand .promise { margin: 0; font-size: 1.45rem; font-weight: 700; }
.brand .reach { margin: 0.2rem 0 0; color: var(--muted); }

.home-auth {
  width: min(24rem, 100%);
  margin: 0 auto 2.4rem;
  text-align: center;
}
.home-auth h2 { margin: 0 0 0.9rem; font-size: 1.25rem; }
.home-auth form { display: grid; gap: 0.75rem; text-align: start; }
.home-auth .btn { width: 100%; }
.home-auth .who { margin: 0 0 0.8rem; font-size: 1.15rem; }
.seller-note { margin: 0.85rem 0 0; font-size: 0.95rem; }
.seller-note a { text-decoration: underline; }

.sell-hero { padding: 2.5rem 0 1rem; }
.sell-hero h1 { margin: 0.4rem 0; font-size: clamp(2rem, 4vw, 3rem); }
.sell-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 1.4rem 0 2rem; }
.sell-grid article, .sell-needs, .sell-form { background: var(--soft); border: 1px solid var(--line); padding: 1rem 1.1rem; }
.sell-grid h2, .sell-needs h2, .sell-form h2 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.sell-needs { margin-bottom: 1.2rem; }
.sell-needs li { margin: 0.2rem 0; }
.sell-form { display: grid; gap: 0.7rem; }
.sell-login { margin-top: 1.4rem; }

.page { padding: 0.4rem 0 3.5rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.4rem 0 0.8rem;
}
.section-head h1, .section-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.section-head a { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 16px;
}

.pcard { color: inherit; }
.pimg {
  height: 150px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.8rem;
  overflow: hidden;
}
.pimg img { width: 100%; height: 150px; object-fit: cover; display: block; }
.pshop { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.82rem; }
.pcard h3 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.45; }
.pprice {
  margin: 0.15rem 0 0;
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 1.45rem;
  font-weight: 500;
}
.pship { margin: 0; color: var(--muted); font-size: 0.85rem; }

h1 { margin: 0 0 0.35rem; font-weight: 700; font-size: 1.8rem; line-height: 1.35; }
h2 { margin: 0 0 0.4rem; font-size: 1.25rem; }

.meta, .muted { color: var(--muted); }
.crumb { color: var(--muted); }
.crumb a { border-bottom: 1px solid var(--line); }

.product {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  padding: 2rem 0 3rem;
}
.mark {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--soft);
  font-family: "Cormorant Garamond", Palatino, serif;
}
.mark strong { display: block; font-size: 2.6rem; font-weight: 500; color: var(--ink); }
.price {
  font-family: "Cormorant Garamond", Palatino, serif;
  font-size: 2.4rem;
  font-weight: 500;
  margin: 0.2rem 0;
}

.buy { display: flex; gap: 12px; align-items: center; margin-top: 1.1rem; }
.buy input { width: 4rem; text-align: center; }

.btn, .btn-ghost {
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  font-weight: 700;
  display: inline-block;
  border-radius: 0;
}
.btn { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.note { border-top: 1px solid var(--line); padding-top: 0.8rem; color: #3c3834; }

.cart-layout, .check-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  padding: 1.6rem 0 3rem;
}
.panel { padding: 0 0 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }

.rate {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  cursor: pointer;
}
.rate:has(input:checked) { color: var(--ink); }
.rate small { color: var(--muted); }
.tag { color: var(--muted); font-size: 0.82rem; }

.field { display: block; margin: 0 0 0.8rem; }
.field span { display: block; }

.total { font-family: "Cormorant Garamond", Palatino, serif; font-size: 2rem; font-weight: 500; }
.split { width: 100%; border-collapse: collapse; }
.split td, .split th { padding: 0.45rem 0.35rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.split th { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.line { display: flex; align-items: center; gap: 10px; }
.line a { flex: 1; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 1.7rem; height: 1.7rem; border: 1px solid var(--line); background: #fff; cursor: pointer; }

.label { border: 1px solid var(--line); padding: 1rem; margin-bottom: 1rem; }
.awb { font-family: "Cormorant Garamond", Palatino, serif; font-size: 2rem; font-weight: 500; margin: 0; }

.account { max-width: 28rem; padding-top: 2rem; }
.account b { font-size: 1.6rem; }
.auth { max-width: 28rem; display: grid; gap: 0.8rem; }
.auth-shortcuts { display: grid; gap: 0.5rem; max-width: 28rem; margin-top: 1rem; }
.auth-shortcuts button, .actions { margin-top: 0.6rem; }
.auth-shortcuts button {
  border: 1px solid var(--ink);
  background: #fff;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
}
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.foot { color: var(--faint); padding: 1rem 0 2rem; text-align: center; }
.foot-inner { width: min(1080px, calc(100% - 56px)); margin: 0 auto; font-family: "Cormorant Garamond", Palatino, serif; font-size: 1.05rem; }

.empty { padding: 3rem 0; text-align: center; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .product, .cart-layout, .check-layout, .sell-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .bar-inner { grid-template-columns: auto 1fr; min-height: 0; padding: 8px 0; }
  .search { grid-column: 1 / -1; padding-bottom: 8px; }
  .logo { font-size: 0.95rem; }
  .tools { gap: 10px; justify-content: flex-end; }
  .dest { font-size: 0; }
  .dest select { font-size: 0.85rem; }
}

body.seller-body { background: #f3f5f8; font-family: "Segoe UI", Tahoma, sans-serif; font-size: 0.95rem; line-height: 1.5; }
body.seller-body .wrap { width: auto; max-width: none; margin: 0; }
body.seller-body .top, body.seller-body .foot { display: none; }
.seller-app { min-height: 100vh; }
.seller-top {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e6e9ee;
  display: grid;
  grid-template-columns: auto minmax(180px, 460px) auto;
  gap: 16px;
  align-items: center;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 6;
}
.seller-search input {
  width: 100%;
  height: 38px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f7f8fa;
  padding: 0 16px;
}
.seller-who { display: flex; gap: 14px; align-items: center; justify-content: flex-end; font-size: 0.9rem; }
.seller-who a { color: #667; }
.seller-shell { display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.seller-side {
  background: #fff;
  border-left: 1px solid #e6e9ee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
}
.seller-side button, .seller-side a {
  width: 78px;
  border: 0;
  background: transparent;
  color: #66717c;
  border-radius: 12px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.3;
}
.seller-side i { display: block; font-style: normal; font-size: 1.05rem; margin-bottom: 2px; }
.seller-side .active, .seller-side button:hover, .seller-side a:hover { background: #f2f4f7; color: #111; }
.seller-main { padding: 28px 28px 64px; }
.seller-head h1 { margin: 0; font-size: 1.55rem; }
.seller-head p { margin: 0.2rem 0 1rem; color: #7b8490; }
.seller-modes { display: flex; gap: 8px; background: #e9edf2; border-radius: 14px; padding: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.seller-modes button { border: 0; background: transparent; border-radius: 10px; padding: 0.55rem 0.9rem; cursor: pointer; color: #4d5660; }
.seller-modes .on { background: #fff; color: #111; font-weight: 700; }
.seller-card {
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 18px;
  padding: 22px;
}
.seller-card h1, .seller-card h2 { margin-top: 0; }
.seller-help, .seller-card small { color: #7b8490; font-size: 0.82rem; }
.seller-error { color: #9d1c1c; margin: 0 0 0.8rem; }
.seller-note-ok { background: #eef8ef; color: #1d5c32; border-radius: 12px; padding: 0.7rem 1rem; margin: 0 0 12px; }
.seller-field { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0 0 16px; }
.seller-field > span { padding-top: 0.45rem; }
.seller-field b { color: #c0392b; font-weight: 700; }
.seller-field input, .seller-field select, .seller-field textarea {
  width: 100%;
  border: 1px solid #e1e5eb;
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}
.seller-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.seller-photos figure { position: relative; margin: 0; width: 92px; height: 92px; }
.seller-photos img, .photo-add {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px dashed #cfd6df;
  background: #f7f8fa;
}
.photo-add { display: grid; place-items: center; color: #5c6772; cursor: pointer; font-size: 0.78rem; text-align: center; }
.seller-photos figure button {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.sku-row, .dim-row { display: flex; gap: 8px; }
.sku-row button, .seller-actions button {
  border: 1px solid #d7dde5;
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}
.seller-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.seller-go {
  background: linear-gradient(90deg, #6d4aff, #8a5cff) !important;
  color: #fff !important;
  border: 0 !important;
  min-width: 180px;
  font-weight: 700;
}
.wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
.seller-steps { list-style: none; margin: 0; padding: 16px; background: #fff; border-radius: 16px; border: 1px solid #e7ebf0; }
.seller-steps li { display: flex; gap: 8px; align-items: center; color: #8b949e; margin: 0.35rem 0; }
.seller-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #eef1f5; font-size: 0.75rem; }
.seller-steps .on { color: #111; font-weight: 700; }
.seller-steps .on b { background: #3b82f6; color: #fff; }
.seller-table { width: 100%; border-collapse: collapse; }
.seller-table th, .seller-table td { text-align: right; padding: 0.7rem 0.4rem; border-bottom: 1px solid #eef1f4; vertical-align: middle; }
.seller-table button { border: 0; background: transparent; color: #9d1c1c; cursor: pointer; }
.mini { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; background: #f3f4f6; display: inline-block; }
.mini.ph { display: inline-block; }
.count { display: block; text-align: left; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-login .seller-card { width: min(420px, 100%); }
.admin-login .field input { border: 1px solid #e1e5eb; border-radius: 10px; padding: 0.65rem 0.8rem; background: #fff; }
.admin-main { max-width: 980px; margin: 0 auto; }
.admin-main .seller-head { margin-top: 1.4rem; }
body.console-body { background: #eef1f5; }
.console { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.console-side { background: #121c2e; color: #d7dee8; display: flex; flex-direction: column; padding: 14px 0 12px; }
.console-brand { margin: 0 14px 16px; background: #fff; border-radius: 12px; text-align: center; padding: 12px 8px; font-size: 1.05rem !important; }
.console-side nav { display: flex; flex-direction: column; }
.console-side button, .console-side > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
  padding: 0.78rem 1.05rem;
  cursor: pointer;
}
.console-side button.on { background: #f5c400; color: #1a1a1a; font-weight: 700; }
.console-side button:hover, .console-side > a:hover { background: rgba(255,255,255,0.06); }
.console-gap { flex: 1; }
.console-main { padding: 22px 20px 40px; }
.console-main h1 { margin: 0 0 18px; font-size: 1.65rem; }
.stat-row { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; }
.stat-label { width: 78px; display: grid; place-items: center; color: #98a2b3; font-size: 0.82rem; text-align: center; }
.stat-cards { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.stat-card {
  background: #fff;
  border-radius: 12px;
  min-height: 78px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.stat-card small { display: block; color: #667085; font-size: 0.78rem; }
.stat-card strong { font-size: 1.35rem; font-weight: 700; }
.stat-ico, .month-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.stat-ico svg, .month-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tone-blue { background: #e7f3ff; } .tone-blue .stat-ico { background: #2f6fed; color: #fff; }
.tone-green { background: #e5f8ee; } .tone-green .stat-ico { background: #1f9d55; color: #fff; }
.tone-yellow { background: #fff6d8; } .tone-yellow .stat-ico { background: #e0a100; color: #fff; }
.tone-gray { background: #eef1f4; } .tone-gray .stat-ico { background: #8b95a1; color: #fff; }
.tone-pink { background: #fdecef; } .tone-pink .stat-ico { background: #e15b6a; color: #fff; }
.tone-purple { background: #f3e9ff; } .tone-purple .stat-ico { background: #8b5cf6; color: #fff; }
.tone-mint { background: #e7fbf3; } .tone-mint .stat-ico { background: #12b981; color: #fff; }
.month-band { margin-top: 18px; background: #163a63; color: #fff; border-radius: 16px; padding: 16px; }
.month-band h2 { margin: 0 0 12px; font-size: 1.2rem; }
.month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.month-card { background: #1d4d86; border-radius: 12px; min-height: 84px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-card small { display: block; color: #d5e4f5; }
.month-card strong { font-size: 1.35rem; }
.month-ico { background: #f5c400; color: #1a1a1a; }
.console-panel { background: #fff; border-radius: 14px; padding: 16px 18px; }
.console-panel a { color: #1d4d86; }
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .console-side { position: sticky; top: 0; z-index: 4; }
  .console-side nav { flex-direction: row; overflow: auto; }
  .console-gap { display: none; }
  .stat-cards, .month-grid { grid-auto-flow: row; grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .seller-top, .seller-field, .wizard-layout, .seller-shell { grid-template-columns: 1fr; }
  .seller-side { flex-direction: row; overflow: auto; border-left: 0; border-bottom: 1px solid #e6e9ee; }
  .seller-main { padding: 16px; }
}

@media (max-width: 800px) {
  .front img, .front { height: auto; min-height: 0; }
  .front img { height: 280px; }
  .front-copy { position: static; width: auto; background: #fff; }
  .ad-slider, .ad-slide img { height: 170px; }
  .ad-edit { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-slide, .ad-slide img { animation: none; transition: none; }
}
@media print {
  .top, .foot, .no-print { display: none !important; }
  .label { break-after: page; }
}
