@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Readex+Pro:wght@500;700&display=swap");
/* ==========================================================================
   DEMMAH layer — sits on top of the scaffold base (src/base.css).
   Build: run build.ps1 → writes theme/style.css = fonts + base + this file.
   Palette: navy ink (trust) · signal orange (anything that sells) · green (COD / savings)
   ========================================================================== */

:root {
  --dm-ink: #0E1B2C;
  --dm-ink-2: #16273D;
  --dm-accent: #FF7A1A;
  --dm-accent-ink: #FFFFFF;
  --dm-accent-hover: #E96A0C;
  --dm-money: #0F8A4B;
  --dm-money-soft: #E7F5EC;
  --dm-bg: #F5F6F8;
  --dm-surface: #FFFFFF;
  --dm-line: #DDE2E8;
  --dm-muted: #5B6878;
  --dm-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --dm-body: "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --dm-r: 14px;
  --dm-wrap: 1200px;

  /* feed the platform palette variables so built-in parts follow the brand */
  --ann-bg: var(--dm-ink);
  --ann-text: #FFFFFF;
  --hd-bg: var(--dm-surface);
  --hd-text: var(--dm-ink);
  --body-bg: var(--dm-bg);
  --body-text: var(--dm-ink);
  --product-name-text: var(--dm-ink);
  --product-price-text: var(--dm-ink);
  --buy-btn-bg: var(--dm-accent);
  --buy-btn-text: var(--dm-accent-ink);
  --buy-btn-border: var(--dm-accent);
  --checkout-heading-text: var(--dm-ink);
}

body {
  background: var(--dm-bg);
  color: var(--dm-ink);
  font-family: var(--dm-body);
}
body,
body *:not(svg):not(path) {
  font-family: var(--dm-body);
}
h1, h2, h3,
.ab-pd-name,
.dm-sec-title,
.dm-hero__title,
.dm-price,
.dm-pd-price {
  font-family: var(--dm-display);
}
:focus-visible {
  outline: 3px solid var(--dm-accent);
  outline-offset: 2px;
}

/* ---------- shared ---------- */
.dm-wrap {
  max-width: var(--dm-wrap);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.dm-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dm-accent);
}
.dm-sec-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.dm-sec-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--dm-ink);
  text-wrap: balance;
}
.dm-sec-sub {
  margin: 0;
  color: var(--dm-muted);
  font-size: 15px;
}
.dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dm-btn--accent {
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
}
.dm-btn--accent:hover {
  background: var(--dm-accent-hover);
  transform: translateY(-1px);
}
.dm-btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #FFFFFF;
}
.dm-btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- announcement + header ---------- */
.ab-announce {
  background: var(--dm-ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  height: 34px;
  letter-spacing: 0;
}
.ab-header {
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: 0 1px 0 var(--dm-line);
}
.ab-header-inner {
  max-width: var(--dm-wrap);
  height: 64px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
.ab-logo-text {
  font-family: var(--dm-display);
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.18em;
  color: var(--dm-ink);
}
.ab-nav .ab-dropdown-trigger,
.ab-nav > a {
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dm-ink);
}
.ab-nav .ab-dropdown-trigger::after,
.ab-nav > a::after {
  background: var(--dm-accent);
  height: 2px;
}
.ab-header-category {
  background: var(--dm-ink);
}
.ab-header-category a {
  color: #FFFFFF;
  font-weight: 500;
}
.ab-cart-count {
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
}

/* ---------- hero ---------- */
.dm-hero {
  background:
    radial-gradient(60% 80% at 15% 40%, rgba(255, 122, 26, 0.18), transparent 60%),
    linear-gradient(180deg, var(--dm-ink) 0%, var(--dm-ink-2) 100%);
  color: #FFFFFF;
  padding-block: clamp(36px, 6vw, 72px);
  overflow: hidden;
}
.dm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 32px;
}
.dm-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.dm-hero__title {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.18;
  font-weight: 700;
  color: #FFFFFF;
  text-wrap: balance;
}
.dm-hero__sub {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}
.dm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.dm-hero__chips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dm-hero__chips li {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dm-hero__chips li::before {
  content: "✓ ";
  color: #3CC57C;
}
.dm-hero__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}
.dm-hero__glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.45) 0%, rgba(255, 122, 26, 0) 68%);
  filter: blur(6px);
}
.dm-hero__media img {
  position: relative;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}
.dm-hero__tag {
  position: absolute;
  bottom: 12%;
  inset-inline-end: 6%;
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
  font-family: var(--dm-display);
  font-weight: 700;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.35);
}

/* ---------- trust bar ---------- */
.dm-trust {
  background: var(--dm-surface);
  border-block: 1px solid var(--dm-line);
  padding-block: 18px;
}
.dm-trust__row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dm-trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dm-trust__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--dm-money-soft);
  color: var(--dm-money);
}
.dm-trust__icon svg {
  width: 24px;
  height: 24px;
}
.dm-trust__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dm-trust__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--dm-ink);
}
.dm-trust__sub {
  font-size: 13px;
  color: var(--dm-muted);
}

/* ---------- category tiles ---------- */
.dm-cats {
  padding-block: clamp(32px, 5vw, 56px);
}
.dm-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 14px;
}
.dm-cat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--dm-r);
  background: var(--dm-surface);
  border: 1px solid var(--dm-line);
  text-decoration: none;
  color: var(--dm-ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.dm-cat:hover {
  border-color: var(--dm-accent);
  transform: translateY(-2px);
}
.dm-cat__media {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--dm-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--dm-muted);
}
.dm-cat__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dm-cat__media svg {
  width: 40%;
  height: 40%;
}
.dm-cat__text {
  display: flex;
  flex-direction: column;
}
.dm-cat__title {
  font-weight: 700;
  font-size: 15px;
}
.dm-cat__note {
  font-size: 13px;
  color: var(--dm-muted);
}
.dm-cat--soon {
  border-style: dashed;
  opacity: 0.8;
}

/* ---------- product cards ---------- */
.ab-pgrid {
  max-width: var(--dm-wrap);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}
.ab-pgrid-media {
  aspect-ratio: 1 / 1;
}
.ab-pgrid-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ab-pgrid-hero img {
  object-fit: cover;
}
.ab-pgrid-card {
  background: var(--dm-surface);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-r);
}
.ab-pgrid-card:hover {
  border-color: color-mix(in srgb, var(--dm-accent) 55%, var(--dm-line));
  box-shadow: 0 10px 28px rgba(14, 27, 44, 0.08);
}
.ab-pgrid-media {
  background: var(--dm-bg);
}
.ab-pgrid-badge,
.ab-sale-badge {
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
  font-weight: 700;
  letter-spacing: 0;
}
.ab-pgrid-add-btn {
  display: none;
}
.dm-card-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 14px;
}
.dm-card-info .ab-pgrid-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.dm-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.dm-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--dm-ink);
  margin: 0;
}
.dm-price-old {
  font-size: 14px;
  color: var(--dm-muted);
  text-decoration: line-through;
}
.dm-cod-chip {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--dm-money);
  background: var(--dm-money-soft);
  border-radius: 8px;
  padding: 4px 8px;
}
.dm-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
  font-weight: 700;
  font-size: 15px;
  transition: background 0.2s ease;
}
.ab-pgrid-card:hover .dm-card-cta {
  background: var(--dm-accent-hover);
}
.dm-card-cta--off {
  background: var(--dm-line);
  color: var(--dm-muted);
}

/* ---------- how to order ---------- */
.dm-how {
  background: var(--dm-surface);
  border-block: 1px solid var(--dm-line);
  padding-block: clamp(36px, 5vw, 64px);
}
.dm-how__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.dm-how__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
}
.dm-how__step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--dm-r);
  background: var(--dm-bg);
}
.dm-how__num {
  font-family: var(--dm-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--dm-accent);
}
.dm-how__title {
  font-weight: 700;
  font-size: 16px;
}
.dm-how__text {
  font-size: 14px;
  color: var(--dm-muted);
}

/* ---------- product page ---------- */
.dm-pd .ab-pd-name {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dm-ink);
}
.dm-pd-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.dm-pd-price {
  font-size: 30px;
  font-weight: 700;
  color: var(--dm-ink);
}
.dm-pd-price-old {
  font-size: 16px;
  color: var(--dm-muted);
  text-decoration: line-through;
}
.dm-pd-saved {
  font-size: 13px;
  font-weight: 700;
  color: var(--dm-money);
  background: var(--dm-money-soft);
  border-radius: 999px;
  padding: 3px 10px;
}
.dm-pd-assure {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dm-pd-assure li {
  font-size: 14px;
  font-weight: 500;
}
.dm-pd-assure li::before {
  content: "✓";
  display: inline-block;
  width: 20px;
  color: var(--dm-money);
  font-weight: 700;
}
.dm-pd-eta {
  margin: 12px 0 0;
  font-size: 14px;
  background: var(--dm-bg);
  border-radius: 10px;
  padding: 10px 12px;
}

/* buy buttons (platform buttons) */
.ab-fixed-buy-btn,
.checkout_btn,
.add_to_cart_btn {
  background: var(--dm-accent) !important;
  color: var(--dm-accent-ink) !important;
  border-color: var(--dm-accent) !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .dm-hero__grid {
    grid-template-columns: 1fr;
  }
  .dm-hero__media {
    order: -1;
    min-height: 200px;
  }
  .dm-hero__media img {
    max-height: 260px;
  }
  .dm-trust__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .ab-ann-simple > :not(:first-child) {
    display: none;
  }
  .ab-pgrid-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dm-price {
    font-size: 17px;
  }
  .dm-card-info .ab-pgrid-name {
    font-size: 14px;
  }
  .dm-cod-chip {
    font-size: 11px;
  }
  .dm-card-cta {
    min-height: 40px;
    font-size: 14px;
  }
  .dm-trust__row {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dm-btn,
  .dm-cat,
  .ab-pgrid-card,
  .dm-card-cta {
    transition: none;
  }
}

/* ==========================================================================
   Live-only extras: used ONLY in dist/demmah-live.css, the stylesheet linked from
   the store's Header Code while the full DEMMAH theme can't be uploaded yet.
   The live theme (Hype) lacks DEMMAH's card markup, so these rules approximate it
   with CSS. Every rule is scoped with :not(.dm-card-info) so it never doubles up
   with the real markup in the full theme.
   ========================================================================== */

.ab-pgrid-info:not(.dm-card-info) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 14px;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price-row > .ab-pgrid-price {
  order: 1;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price-row > .ab-price-old {
  order: 2;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price {
  font-family: var(--dm-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--dm-ink);
}
.ab-pgrid-info:not(.dm-card-info) .ab-price-old {
  font-size: 14px;
  color: var(--dm-muted);
  text-decoration: line-through;
}
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price-row::after {
  content: "ادفع عند الاستلام · عاين الأول";
  order: 3;
  flex-basis: 100%;
  align-self: flex-start;
  width: fit-content;
  font-family: var(--dm-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--dm-money);
  background: var(--dm-money-soft);
  border-radius: 8px;
  padding: 4px 8px;
}
.ab-pgrid-info:not(.dm-card-info)::after {
  content: "اطلبها دلوقتي";
  display: flex;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--dm-accent);
  color: var(--dm-accent-ink);
  font-family: var(--dm-body);
  font-weight: 700;
  font-size: 15px;
}
.ab-pgrid-card:hover .ab-pgrid-info:not(.dm-card-info)::after {
  background: var(--dm-accent-hover);
}
.ab-pgrid-color,
.ab-pgrid-info:not(.dm-card-info) .ab-pgrid-swatches:not(:has(*)) {
  display: none;
}
@media (max-width: 600px) {
  .ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price {
    font-size: 17px;
  }
  .ab-pgrid-info:not(.dm-card-info) .ab-pgrid-price-row::after {
    font-size: 11px;
  }
  .ab-pgrid-info:not(.dm-card-info)::after {
    min-height: 40px;
    font-size: 14px;
  }
}
