
@media (max-width: 1023.98px) {
  .dk-only { display: none !important; }
}
@media (min-width: 1024px) {
  .dk-hide { display: none !important; }
}

@media (min-width: 1024px) {

  :root {
    --dk-max: 1360px;
    --dk-gutter: 40px;
    --dk-header-h: 72px;
    --dk-gap: 24px;
    --dk-side-w: 360px;
    --dk-card-bg: var(--bg-surface);
    --dk-tint: color-mix(in srgb, var(--primary) 12%, var(--bg-surface));
  }

  body { padding-bottom: 0; }

  .dk-header {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
  }
  .dk-header__inner {
    max-width: var(--dk-max); margin: 0 auto;
    height: var(--dk-header-h); padding: 0 var(--dk-gutter);
    display: flex; align-items: center; gap: 24px;
  }
  .dk-brand {
    display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
    text-decoration: none;
  }
  .dk-brand .brand-squircle {
    width: 36px; height: 36px; border-radius: 22%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .dk-brand .brand-squircle img { width: 100%; height: 100%; object-fit: contain; }
  .dk-brand__word {
    color: var(--primary); font-family: var(--font-ar);
    font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em;
  }

  .dk-nav { display: flex; align-items: center; gap: 2px; }
  .dk-nav__link {
    display: inline-flex; align-items: center; height: 40px; padding: 0 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm); font-weight: 700; white-space: nowrap;
    color: var(--text-secondary); text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .dk-nav__link:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
  .dk-nav__link.is-active,
  .dk-nav__link.is-active:hover { background: var(--dk-tint); color: var(--primary-ink); }

  .dk-tools { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
  .dk-tools > :not(.dk-search) { flex-shrink: 0; }

  .dk-search {
    display: inline-flex; align-items: center; gap: 10px;
    flex: 1 1 auto; min-width: 44px; max-width: 340px; height: 44px; padding: 0 14px;
    container-type: inline-size;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color); background: var(--bg-surface);
    color: var(--text-tertiary); font-family: var(--font-ar); font-size: var(--text-sm); font-weight: 600;
    cursor: text; text-align: start;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  }
  .dk-search:hover { border-color: var(--border-color-strong); }
  .dk-search:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
  .dk-search i, .dk-search svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-secondary); }
  .dk-search__text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @container (max-width: 120px) {
    .dk-search__text, .dk-search__key { display: none; }
  }
  .dk-search__key {
    flex: 0 0 auto; font-family: var(--font-en, inherit); font-size: var(--text-xs); font-weight: 700;
    color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 6px;
    padding: 0 6px; line-height: 20px; background: var(--bg-surface-hover);
  }

  .dk-scan { min-height: 44px; padding: 0 18px; font-size: var(--text-sm); white-space: nowrap; }
  .dk-scan i, .dk-scan svg { width: 18px; height: 18px; }

  .dk-icon-btn {
    position: relative; width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-surface); border: 1px solid var(--border-color);
    color: var(--text-primary); text-decoration: none;
  }
  .dk-icon-btn:hover { border-color: var(--border-color-strong); }
  .dk-icon-btn i, .dk-icon-btn svg { width: 19px; height: 19px; }
  .dk-icon-btn .notif-bell-badge {
    position: absolute; top: -3px; inset-inline-end: -3px;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--radius-full);
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
  }
  .dk-icon-btn .notif-bell-badge[hidden] { display: none; }

  .dk-account {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
    border-radius: var(--radius-full); border: 1px solid var(--border-color);
    background: var(--bg-surface); color: var(--text-primary);
    font-size: var(--text-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
  }
  .dk-account:hover { border-color: var(--border-color-strong); color: var(--text-primary); }
  .dk-account.is-active { background: var(--dk-tint); border-color: transparent; color: var(--primary-ink); }
  .dk-account i, .dk-account svg { width: 18px; height: 18px; }

  @media (max-width: 1239.98px) {
    .dk-header__inner { gap: 16px; }
    .dk-header .dk-brand__word { display: none; }
    .dk-nav__link { padding: 0 8px; }
    .dk-search { flex: 0 0 44px; min-width: 0; width: 44px; padding: 0; justify-content: center; }
    .dk-search__text, .dk-search__key { display: none; }
    .dk-account span { display: none; }
    .dk-account { width: 44px; padding: 0; justify-content: center; }
  }

  .container {
    max-width: var(--dk-max);
    padding: 32px var(--dk-gutter) 72px;
  }

  .page-back-row:has(> .page-back-btn) { display: none; }
  .page-back-title { font-size: var(--text-2xl); }


  .dk-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--dk-side-w);
    column-gap: 32px;
    align-items: start;
  }
  .dk-split > .dk-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .dk-split > .dk-side {
    grid-column: 2; grid-row: 1; min-width: 0;
    position: sticky; top: calc(var(--dk-header-h) + 24px);
  }

  .dk-card {
    background: var(--dk-card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }
  .dk-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px 14px;
  }
  .dk-card__title {
    display: flex; align-items: center; gap: 10px; margin: 0;
    font-size: var(--text-base); font-weight: 800; color: var(--text-primary);
  }
  .dk-card__title .app-icon { --icon-size: 34px; }
  .dk-card__body { padding: 0 20px 20px; }
  .dk-card .view-all { min-height: 32px; }

  .dk-footer {
    margin-top: 48px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
  }
  .dk-footer__inner {
    max-width: var(--dk-max); margin: 0 auto; padding: 40px var(--dk-gutter) 28px;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 48px;
  }
  .dk-footer__about { max-width: 520px; }
  .dk-footer__title { margin: 18px 0 6px; font-size: var(--text-sm); font-weight: 800; color: var(--text-primary); }
  .dk-footer__about p { margin: 0; font-size: var(--text-sm); line-height: 1.9; color: var(--text-secondary); }
  .dk-footer__links { display: grid; grid-template-columns: repeat(2, max-content); gap: 14px 40px; align-self: center; }
  .dk-footer__links a { color: var(--text-secondary); font-size: var(--text-sm); font-weight: 700; text-decoration: none; }
  .dk-footer__links a:hover { color: var(--primary-ink); }
  .dk-footer__base {
    max-width: var(--dk-max); margin: 0 auto; padding: 16px var(--dk-gutter) 24px;
    border-top: 1px solid var(--border-color);
    font-size: var(--text-xs); color: var(--text-tertiary); text-align: center;
  }
}

@media (min-width: 1024px) {

  .dk-hero {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: var(--dk-gap); margin-bottom: var(--dk-gap);
  }
  .dk-hero__ask { padding: 36px 36px 30px; display: flex; flex-direction: column; justify-content: center; }
  .dk-hero__title {
    margin: 0 0 10px; font-size: 2.25rem; line-height: 1.3; font-weight: 800;
    color: var(--text-primary);
  }
  .dk-hero__lead { margin: 0 0 22px; font-size: var(--text-base); line-height: 1.8; color: var(--text-secondary); }
  .dk-hero__search { display: flex; gap: 12px; align-items: stretch; }
  .dk-hero__field {
    flex: 1 1 auto; min-width: 0; height: 58px; padding: 0 20px;
    display: flex; align-items: center; gap: 12px;
    border-radius: var(--radius-lg);
    border: 1.5px solid color-mix(in srgb, var(--primary) 35%, var(--border-color));
    background: var(--bg-surface); box-shadow: var(--shadow-md);
    color: var(--text-tertiary); font-family: var(--font-ar); font-size: var(--text-base); font-weight: 600;
    cursor: text; text-align: start;
  }
  .dk-hero__field:hover { border-color: color-mix(in srgb, var(--primary) 60%, var(--border-color)); }
  .dk-hero__field:focus-visible { outline: none; box-shadow: var(--focus-ring); }
  .dk-hero__field i, .dk-hero__field svg { width: 22px; height: 22px; color: var(--text-strict); flex: 0 0 auto; }
  .dk-hero__scan { min-height: 58px; padding: 0 26px; font-size: var(--text-base); white-space: nowrap; }
  .dk-hero__scan i, .dk-hero__scan svg { width: 20px; height: 20px; }

  .dk-hero__trend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
  .dk-hero__trend-label {
    display: inline-flex; align-items: center; gap: 6px; margin-inline-end: 4px;
    font-size: var(--text-sm); font-weight: 800; color: var(--text-secondary);
  }
  .dk-hero__trend-label i, .dk-hero__trend-label svg { width: 16px; height: 16px; }
  .dk-chip {
    font-family: var(--font-ar); font-size: var(--text-sm); font-weight: 700;
    padding: 6px 14px; border-radius: var(--radius-full); cursor: pointer;
    border: 1px solid var(--border-color); background: var(--bg-surface-hover); color: var(--text-primary);
  }
  .dk-chip:hover { border-color: var(--primary); color: var(--primary-ink); }

  .dk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--dk-gap); }
  .dk-stat {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
    padding: 22px 24px; min-height: 140px; text-decoration: none; color: var(--text-primary);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
  }
  .dk-stat:hover { border-color: var(--border-color-strong); color: var(--text-primary); transform: translateY(-2px); }
  .dk-stat__icon {
    width: 40px; height: 40px; border-radius: 12px; margin-bottom: auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-surface-hover); color: var(--text-secondary);
  }
  .dk-stat__icon i, .dk-stat__icon svg { width: 20px; height: 20px; }
  .dk-stat__n { font-size: 2.1rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .dk-stat__label { font-size: var(--text-sm); font-weight: 700; color: var(--text-secondary); }

  .home-slider { margin-bottom: var(--dk-gap); min-height: 200px; }
  .home-slide { min-height: 200px; }
  .home-slide-inner { padding: 28px 36px; }

  .dk-home { display: flex; flex-direction: column; gap: var(--dk-gap); margin-bottom: 8px; }
  .dk-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--dk-gap); align-items: start; }
  .dk-duo  { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--dk-gap); align-items: stretch; }

  .dk-rows { display: flex; flex-direction: column; gap: 4px; }
  .dk-row {
    display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px;
    border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary);
    transition: background var(--transition-fast);
  }
  .dk-row:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
  .dk-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .dk-row__name {
    font-size: var(--text-sm); font-weight: 800; line-height: 1.5;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .dk-row__sub {
    font-size: var(--text-xs); line-height: 1.6; color: var(--text-tertiary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .dk-row .badge { flex: 0 0 auto; font-size: 11px; padding: 3px 10px; }
  .dk-empty { margin: 4px 0; font-size: var(--text-sm); color: var(--text-tertiary); }

  .dk-camp {
    display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; margin: 0 -10px;
    border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary);
  }
  .dk-camp + .dk-camp { border-top: 1px solid var(--border-color); border-radius: 0; }
  .dk-camp:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
  .dk-camp__title { font-size: var(--text-sm); font-weight: 800; line-height: 1.5; }
  .dk-camp__meta {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: var(--text-xs); font-weight: 700; color: var(--text-tertiary);
  }
  .dk-bar { display: block; height: 8px; border-radius: var(--radius-full); background: var(--bg-surface-hover); overflow: hidden; }
  .dk-bar > span {
    display: block; height: 100%; border-radius: var(--radius-full);
    background: linear-gradient(var(--deg-to-start), var(--success), var(--danger));
    background-size: calc(10000% / var(--pct, 100)) 100%;
    background-position: var(--page-start) center; background-repeat: no-repeat;
  }

  .dk-shops__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
  .dk-shops .shops-panel { height: auto; min-height: 210px; border-radius: var(--radius-md); }
  .dk-wilayas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
  .dk-wilayas li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: var(--text-sm); }
  .dk-wilayas__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dk-wilayas__bar { height: 8px; border-radius: var(--radius-full); background: var(--bg-surface-hover); overflow: hidden; }
  .dk-wilayas__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--text-tertiary); }
  .dk-wilayas__n { font-size: var(--text-xs); font-weight: 700; color: var(--text-secondary); white-space: nowrap; }

  .dk-celebs__count { margin: 0 0 14px; font-size: var(--text-sm); font-weight: 800; color: var(--text-secondary); }
  .dk-celebs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .dk-celeb {
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
    padding: 12px 8px; border-radius: var(--radius-md); border: 1px solid var(--border-color);
    text-decoration: none; color: var(--text-primary);
  }
  .dk-celeb:hover { border-color: var(--border-color-strong); color: var(--text-primary); }
  .dk-celeb .celeb-avatar { width: 56px; height: 56px; margin: 0 0 4px; }
  .dk-celeb__name { font-size: var(--text-sm); font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dk-celeb__n { font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 700; }

  .dk-card .art-feed { padding: 0; margin: 0 -8px; background: none; border: 0; border-radius: 0; }

  .dk-prn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dk-prn {
    display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color); text-decoration: none; color: var(--text-primary);
  }
  .dk-prn:hover { border-color: var(--border-color-strong); color: var(--text-primary); }
  .dk-prn__img {
    aspect-ratio: 16 / 9; border-radius: 8px; background-size: cover; background-position: center top;
    background-color: var(--bg-surface-hover);
    display: flex; align-items: center; justify-content: center; color: var(--text-tertiary);
    position: relative; overflow: hidden;
  }
  .dk-prn__img .media-fill { object-position: center top; }
  .dk-prn__img i, .dk-prn__img svg { width: 26px; height: 26px; }
  .dk-prn__title {
    font-size: var(--text-sm); font-weight: 800; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }

  .categories-section { margin-top: var(--dk-gap); }
  .categories-scroll { flex-wrap: wrap; overflow: visible; }
}

@media (min-width: 1024px) {

  .pd-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin: 0 0 22px; font-size: var(--text-sm); color: var(--text-tertiary);
  }
  .pd-crumbs a { color: var(--text-secondary); font-weight: 700; text-decoration: none; }
  .pd-crumbs a:hover { color: var(--primary-ink); }
  .pd-crumbs i, .pd-crumbs svg { width: 14px; height: 14px; color: var(--text-tertiary); }
  .pd-crumbs [aria-current] { color: var(--text-primary); font-weight: 800; }

  .desktop-grid { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 32px; align-items: start; }

  .pd-main { display: flex; flex-direction: column; min-width: 0; }
  .pd-main > * { order: 3; }
  .pd-main > .product-hero { order: 1; }
  .pd-main > .pd-actions { order: 2; }

  .product-hero.product-hero--plain {
    background: var(--bg-surface);
    border: 1px solid var(--border-color); border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: none; padding: 0; margin-bottom: 0; text-align: start;
  }
  .product-hero-body.product-hero-body--flush {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    column-gap: 28px; align-items: start; padding: 28px 28px 22px;
  }
  .product-hero-body > .logo-tile { grid-row: 1 / span 3; margin: 0; }
  .product-hero-body > h1 { grid-column: 2; margin: 6px 0 6px; font-size: 2rem; line-height: 1.35; }
  .product-hero-body > p { grid-column: 2; }
  .product-hero-body > .badge { grid-column: 2; justify-self: start; align-self: start; }
  .product-hero-body > .pr-rate { grid-column: 2; align-items: flex-start; margin-top: 14px; }

  .pd-actions {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 16px 28px 20px;
  }

  .pd-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .pd-side > .card { margin: 0; }

  .pd-side-alts { padding: 20px 20px 18px; }
  .pd-side-alts__group + .pd-side-alts__group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color); }
  .pd-side-alts__title {
    display: flex; align-items: center; gap: 8px; margin: 0 0 4px;
    font-size: var(--text-base); font-weight: 800; color: var(--text-primary);
  }
  .pd-side-alts__title i, .pd-side-alts__title svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-secondary); }
  .pd-side-alts__title .is-curated { color: var(--success-ink); }
  .pd-side-alts__note { margin: 0 0 8px; font-size: var(--text-xs); line-height: 1.8; color: var(--text-tertiary); }
  .pd-side-alts .view-all { min-height: 36px; }
  .pd-side-alts__suggest { margin-top: 14px; }
  .pd-side-alts__safe { text-align: center; padding: 6px 4px; }
  .pd-side-alts__safe i, .pd-side-alts__safe svg { width: 32px; height: 32px; color: var(--success-ink); }
  .pd-side-alts__safe h2 { margin: 10px 0 6px; font-size: var(--text-base); font-weight: 800; color: var(--success-ink); }
  .pd-side-alts__safe p { margin: 0; font-size: var(--text-sm); line-height: 1.8; color: var(--text-secondary); }
}

@media (min-width: 1024px) {
  .pd-main { gap: 24px; }
  .pd-main > .status-note,
  .pd-main > .pd-own,
  .pd-main > .discussion-card { margin-top: 0; margin-bottom: 0; }
  .pd-main > .pd-actions { margin-top: -24px; margin-bottom: 0; }
}

@media (min-width: 1024px) {
  .pl-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px;
    column-gap: 32px; align-items: start;
  }
  .pl-layout > .pl-head { grid-column: 1; grid-row: 1; margin: 0 0 20px; }
  .pl-head .pl-title { font-size: var(--text-2xl); }
  .pl-layout > .pl-side {
    grid-column: 2; grid-row: 1 / span 3;
    position: sticky; top: calc(var(--dk-header-h) + 24px);
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm);
  }
  .pl-layout > #productSearchResults,
  .pl-layout > #productListContainer { grid-column: 1; }
  .pl-side .pl-search { margin-bottom: 16px; background: var(--bg-app); }
  .pl-side .cat-strip-wrap { margin-bottom: 0; }
  .pl-side .cat-strip { flex-wrap: wrap; overflow: visible; white-space: normal; }
  .pl-side .cat-strip-wrap::after { display: none; }

  #productListContainer, #productSearchResults {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start;
  }
  #productListContainer > .list-card, #productSearchResults > .list-card { margin: 0; }
  #productListContainer > :not(.list-card),
  #productSearchResults > :not(.list-card) { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .pl-side__title { margin: 0 0 10px; font-size: var(--text-sm); font-weight: 800; color: var(--text-secondary); }
}

@media (min-width: 1024px) {
  .sx-head {
    display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .sx-title { margin: 0 0 6px; font-size: var(--text-2xl); font-weight: 800; color: var(--text-primary); }
  .sx-filters { display: flex; gap: 12px; flex: 1 1 auto; justify-content: flex-start; flex-wrap: wrap; }
  .sx-field { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
  .sx-field span { font-size: var(--text-xs); font-weight: 800; color: var(--text-secondary); }
  .sx-field select {
    height: 44px; padding: 0 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-primary);
    font-family: var(--font-ar); font-size: var(--text-sm); font-weight: 700; cursor: pointer;
  }
  .sx-field select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
  .sx-add { min-height: 44px; margin-inline-start: auto; }

  .sx-body {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--dk-gap); align-items: start;
  }
  .sx-count { margin: 0 0 10px; font-size: var(--text-sm); font-weight: 800; color: var(--text-secondary); }
  .sx-list { display: flex; flex-direction: column; gap: 12px; }
  .sx-list .shop-list-item { margin: 0; }
  .sx-list .shop-list-item:hover { transform: none; }
  .sx-list .shop-list-item.is-selected {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary), var(--shadow-md);
  }
  .sx-msg { padding: 48px 24px; text-align: center; color: var(--text-tertiary); font-weight: 700; }
  .sx-msg.is-error { color: var(--danger-ink); }

  .sx-panel {
    border-radius: var(--radius-xl); border: 1px solid var(--border-color);
    background: var(--bg-surface); box-shadow: var(--shadow-md);
    scroll-margin-top: calc(var(--dk-header-h) + 16px);
    overflow: hidden;
  }
  .sx-panel:has(#sxPanelBody:empty) { display: none; }
}

@media (min-width: 1024px) {
  :root { --dk-rail-w: 248px; }

  .dk-has-rail {
    position: relative;
    max-width: var(--dk-max);
    padding: 32px var(--dk-gutter) 72px;
    padding-inline-start: calc(var(--dk-gutter) + var(--dk-rail-w) + 36px);
    min-height: 620px;
  }
  .dk-rail {
    position: absolute; top: 32px; bottom: 72px;
    inset-inline-start: var(--dk-gutter); width: var(--dk-rail-w);
  }
  .dk-rail__nav {
    position: sticky; top: calc(var(--dk-header-h) + 24px);
    display: flex; flex-direction: column; gap: 2px; padding: 12px;
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  }
  .dk-rail__title { padding: 6px 12px 10px; font-size: var(--text-xs); font-weight: 800; color: var(--text-tertiary); }
  .dk-rail__link {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: var(--radius-md); text-decoration: none;
    color: var(--text-secondary); font-size: var(--text-sm); font-weight: 700;
  }
  .dk-rail__link i, .dk-rail__link svg { width: 18px; height: 18px; flex: 0 0 auto; }
  .dk-rail__count { margin-inline-start: auto; }
  .dk-rail__link:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
  .dk-rail__link.is-active, .dk-rail__link.is-active:hover { background: var(--dk-tint); color: var(--primary-ink); }

  .doc-main.dk-has-rail { margin: 0 auto; min-height: 70vh; }
  .doc-main > :not(.dk-rail) { max-width: 860px; }

  .fav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .fav-list > .card { margin: 0; }
}

@media (min-width: 1024px) {

  .cps-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-content: start; }
  .cps-main > .sec-title, .cps-main > .card, .cps-main > details { grid-column: 1 / -1; }
  .cps-main > .sec-title:first-child { margin-top: 0; }
  .cps-main > a { display: block; min-width: 0; }
  .cps-main .campaign-card { height: calc(100% - 14px); }
  .cps-main details.ended-wrap[open] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .cps-main details.ended-wrap > summary { grid-column: 1 / -1; }

  .article-hero { min-height: 300px; }
  .article-hero h1 { font-size: 2.1rem; }
  .cp-body.has-side { position: relative; padding-inline-end: 392px; min-height: 560px; }
  .cp-body.has-side > .cp-side { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 360px; }
  .cp-side__inner { position: sticky; top: calc(var(--dk-header-h) + 24px); }
  .cp-body.is-article { max-width: 880px; margin-inline: auto; }

  .celeb-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 16px; row-gap: 0; }
  @media (min-width: 1240px) { .celeb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  .ct-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ct-list > a { display: block; min-width: 0; }
  .ct-list .campaign-card { margin: 0; height: 100%; }

  .contact-form-box { margin-top: 0; padding: 28px; }

  .prn-head, .prn-grid { max-width: var(--dk-max); padding-inline: var(--dk-gutter); }
  .prn-head { padding-top: 32px; }
  .prn-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; padding-bottom: 72px; }
  .prn-filters { max-width: var(--dk-max); margin: 0 auto; padding: 0 var(--dk-gutter) 20px; justify-content: flex-start; }
}

@media (min-width: 1024px) {
  .cps-main .campaign-card { grid-template-columns: 1fr; grid-template-rows: 150px auto; }
  .cps-main .campaign-img { min-height: 150px; }
}

@media (min-width: 1024px) {
  .auth-page > .theme-toggle,
  .reset-page > .theme-toggle { display: none; }
  .auth-page .auth-layout { min-height: calc(100vh - var(--dk-header-h)); }
  .auth-page .dk-footer, .reset-page .dk-footer { margin-top: 0; }

  body.reset-page { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .reset-page .reset-card { margin: 72px auto; align-self: center; }
}

@media (min-width: 1024px) {
  .dk-shops__body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .dk-shops .shops-panel-btn { white-space: nowrap; }
}

@media (min-width: 1024px) {
  .dk-hero__field span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .list-card .badge, .dk-row .badge { white-space: nowrap; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .dk-hero { grid-template-columns: 1fr; }
  .dk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dk-stat { min-height: 120px; }
  #productListContainer, #productSearchResults { grid-template-columns: 1fr; }
  .pl-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (min-width: 1024px) {
  .dk-shops__body { grid-template-columns: 1fr; gap: 16px; }
  .dk-shops .shops-panel { order: -1; min-height: 0; height: 120px; }

  .categories-section .category-btn {
    flex-direction: row; gap: 8px; min-width: 0; padding-block: 5px; padding-inline: 14px 6px;
    border: 1px solid var(--border-color); border-radius: var(--radius-full);
    background: var(--bg-surface);
  }
  .categories-section .category-btn:hover { border-color: var(--border-color-strong); }
  .categories-section .category-btn .cat-icon { width: 30px; height: 30px; border-radius: 50%; }
  .categories-section .category-btn .cat-icon i, .categories-section .category-btn .cat-icon svg { width: 16px; height: 16px; }
  .categories-section .category-btn .cat-name { width: auto; display: block; -webkit-line-clamp: unset; font-size: var(--text-sm); white-space: nowrap; }

  .pl-layout > .pl-side { max-height: calc(100vh - var(--dk-header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
}

@media (min-width: 1024px) {
  .categories-section .category-btn .cat-count {
    min-width: 26px; padding: 1px 8px; border-radius: var(--radius-full);
    background: var(--bg-surface-hover); color: var(--text-secondary);
    font-size: var(--text-xs); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums;
  }
}

@media (min-width: 1024px) {
  .content-hero { background-position: center 85%; }
}
