/* ==========================================================================
   الزييود — الاستجابة (نقاط توقف Bootstrap القياسية)
   شبكة المنتجات: <360 = 1 · 360–767 = 2 · 768–1199 = 3 · ≥1200 = 4 (حد أقصى)
   ========================================================================== */

@media (max-width: 1399.98px) {
  .zy-grid.with-sidebar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
  .zy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zy-grid.with-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zy-features { grid-template-columns: repeat(2, 1fr); }
  .zy-nav-phone { display: none; }
}

/* ---------- Tablet وما دون ---------- */
@media (max-width: 991.98px) {
  :root { --zy-header-h: 64px; }
  .zy-nav, .zy-header .zy-search-desktop, .zy-header .hide-lg-down { display: none !important; }
  .zy-logo-mark { width: 38px; height: 38px; }
  .zy-logo-name { font-size: 1.3rem; }
  .zy-logo-sub { font-size: .68rem; }
  .zy-header-main { gap: .5rem; }
  .zy-grid.with-sidebar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zy-filters { position: static; border: 0; padding: 0; }
  .zy-summary, .zy-account-nav, .zy-toc { position: static; }
  .zy-mobile-summary { display: block; }
  .zy-checkout-aside { display: none; }
  .zy-account-nav { margin-bottom: 1.25rem; }
  .zy-account-nav .zy-account-links { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: 2px; }
  .zy-account-nav .zy-account-links a, .zy-account-nav .zy-account-links button { width: auto; white-space: nowrap; flex-shrink: 0; }
  .zy-toc { display: none; }

  /* الشريط السفلي يظهر على الموبايل/التابلت */
  .zy-bottom-nav { display: block; }
  body.has-bottom-nav { --zy-bottom-offset: 62px; }
  body.no-bottom-nav .zy-bottom-nav { display: none; }
  body.has-sticky-buy { --zy-bottom-offset: 72px; }
  .zy-sticky-buy { display: flex; }
}

@media (min-width: 992px) {
  .zy-mobile-search, .zy-mobile-only { display: none !important; }
}

/* ---------- الهاتف ---------- */
@media (max-width: 767.98px) {
  .zy-grid, .zy-grid.with-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .zy-section-head { margin-bottom: 1.25rem; }
  .zy-cat-grid { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
  .zy-cat-card { aspect-ratio: 1 / 1.15; }
  .zy-cat-card-body { padding: .65rem; }
  .zy-cat-card h3 { font-size: .86rem; }
  .zy-cat-card small, .zy-cat-card .zy-cat-go { display: none; }
  .zy-features { gap: .6rem; }
  .zy-feature { flex-direction: column; text-align: center; padding: 1rem .7rem; gap: .5rem; }
  .zy-feature-icon { width: 46px; height: 46px; font-size: 1.25rem; }
  .zy-feature p { font-size: .8rem; }
  .zy-steps li { font-size: .74rem; }
  .zy-steps li::before { width: 34px; height: 34px; }
  .zy-steps li::after { top: 17px; }
  .zy-cart-line { grid-template-columns: 76px 1fr; gap: .75rem; }
  .zy-cart-line img { width: 76px; height: 76px; }
  .zy-cart-line .line-total { grid-column: 2; text-align: start; }
  .zy-order-table-wrap { display: none; }
  .zy-order-cards { display: block; }
  .zy-toolbar .form-select { min-width: 0; flex: 1; }
  .zy-pd-price .zy-price { font-size: 1.65rem; }
  .zy-footer { padding-top: 2.5rem; }
  .zy-promo { min-height: 210px; }
  .zy-use-card { min-height: 200px; }
  .zy-kv { grid-template-columns: 1fr; gap: 0; }
  .zy-kv dd { margin-bottom: .45rem; }
}

/* بطاقة المنتج المختصرة (< 576px) */
@media (max-width: 575.98px) {
  :root { --zy-gutter: 16px; }
  .container, .container-fluid { padding-inline: 16px; }
  .zy-card-cat, .zy-card-pack { display: none; }
  .zy-card-body { padding: .65rem .7rem .75rem; gap: .2rem; }
  .zy-card-title { font-size: .92rem; line-height: 1.5; min-height: calc(1.5em * 2); }
  .zy-price { font-size: 1.05rem; }
  .zy-price-old { font-size: .78rem; }
  .zy-price-note .txt { display: none; }
  .zy-card-badges { top: .45rem; inset-inline-start: .45rem; }
  .zy-tag { font-size: .7rem; padding: .1rem .4rem; }
  .zy-stock { font-size: .72rem; padding: .05rem .4rem; }
  .zy-card .btn { font-size: .88rem; padding-inline: .5rem; }
  .zy-card .btn .lbl-long { display: none; }
  .zy-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .zy-section-head h2 { font-size: 1.25rem; }
  .zy-empty-icon { width: 92px; height: 92px; font-size: 2.3rem; }
  .zy-auth { padding-block: 1.25rem; }
  .zy-steps li span { display: none; }
  .zy-topbar .zy-topbar-phone { display: none; }
  .zy-topbar .container { justify-content: center; }
  .zy-pd-actions .zy-qty { flex: 0 0 auto; }
}

/* الهواتف الضيقة جداً (< 360px): عمود واحد */
@media (max-width: 359.98px) {
  .zy-grid, .zy-grid.with-sidebar { grid-template-columns: 1fr; }
  .zy-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .zy-logo-sub { display: none; }
  .zy-features { grid-template-columns: 1fr; }
  .zy-feature { flex-direction: row; text-align: start; }
}

/* ---------- Hero حسب حجم الشاشة ---------- */
@media (min-width: 1200px) { .zy-hero-aside { display: block; } }
@media (max-width: 991.98px) {
  /* التابلت والموبايل: الهيدر صف واحد (var(--zy-header-h)) */
  .zy-hero { --hero-h: clamp(460px, calc(100vh - var(--zy-header-h)), 760px); }
  @supports (height: 100svh) { .zy-hero { --hero-h: clamp(460px, calc(100svh - var(--zy-header-h)), 760px); } }
}
@media (max-width: 767.98px) {
  /* الموبايل: يملأ المساحة بين الهيدر وشريط التنقل السفلي مع إظهار بداية القسم التالي */
  .zy-hero { --hero-h: clamp(440px, calc(100vh - var(--zy-header-h) - 62px - 28px), 700px); }
  @supports (height: 100svh) { .zy-hero { --hero-h: clamp(440px, calc(100svh - var(--zy-header-h) - 62px - 28px), 700px); } }
  .zy-hero-slide { align-items: flex-end; }
  .zy-hero-slide::after { background: linear-gradient(0deg, rgba(16,12,12,.92) 0%, rgba(16,12,12,.7) 42%, rgba(16,12,12,.2) 75%, rgba(16,12,12,.05) 100%); }
  .zy-hero-inner { align-items: flex-end; padding-bottom: 84px; padding-top: 1rem; }
  .zy-hero-content h1, .zy-hero-content h2 { font-size: clamp(1.75rem, 7.4vw, 2.3rem); margin: .7rem 0 .6rem; }
  .zy-hero-content p { font-size: .98rem; margin-bottom: 1.2rem; }
  .zy-hero-content .btn-lg { min-height: 48px; padding-inline: 1.1rem; font-size: 1rem; }
  .zy-hero-bar .container { gap: .75rem; }
  .zy-hero-count { display: none; }
  .zy-hero-btn { width: 44px; height: 44px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  /* هاتف بوضع أفقي: ارتفاع مريح بدل ملء الشاشة */
  .zy-hero { --hero-h: 440px; }
}
