/* =========================================================
   STOREFRONT V2
   Premium Commercial Header + Hero
   Phase 1
   ========================================================= */


/* =========================================================
   1. V2 DESIGN SYSTEM

   في النسخة التجريبية نثبت الأزرق عمداً حتى نقيم
   جودة التصميم بعيداً عن ألوان القالب القديم.
   بعد اعتماد الشكل سنربطه بمحرر الألوان.
   ========================================================= */

html.storefront-v2 {
  color-scheme: light;

  --v2-primary: #0868f5;
  --v2-primary-dark: #064fc5;
  --v2-primary-light: #1b91ff;
  --v2-cyan: #00b6f3;

  --v2-navy: #101828;
  --v2-text: #1d2939;
  --v2-muted: #667085;
  --v2-soft-text: #98a2b3;

  --v2-page: #f5f7fb;
  --v2-surface: #ffffff;
  --v2-soft-surface: #f8fafc;

  --v2-border: #e2e8f0;
  --v2-border-strong: #cfd8e5;

  --v2-success: #12a36d;
  --v2-success-soft: #e8f8f1;

  --v2-danger: #ed344d;

  --v2-radius-small: 12px;
  --v2-radius: 18px;
  --v2-radius-large: 28px;
  --v2-radius-pill: 999px;

  --v2-container:
    min(100% - 40px, 1220px);

  --v2-shadow-small:
    0 4px 15px
    rgba(16, 24, 40, 0.05);

  --v2-shadow:
    0 18px 50px
    rgba(16, 24, 40, 0.09);

  --v2-shadow-blue:
    0 16px 34px
    rgba(8, 104, 245, 0.22);
}


/* =========================================================
   2. PAGE FOUNDATION
   ========================================================= */

html.storefront-v2,
html.storefront-v2 body {
  max-width: 100%;
  overflow-x: hidden;
}

html.storefront-v2 body {
  background:
    linear-gradient(
      180deg,
      #ffffff 0,
      #f8faff 520px,
      var(--v2-page) 100%
    );

  color: var(--v2-text);

  font-family:
    var(--store-font-family),
    Arial,
    Tahoma,
    sans-serif;

  line-height: 1.65;
}

html.storefront-v2 .home-container,
html.storefront-v2 .section-shell {
  width: var(--v2-container);
  margin-inline: auto;
}


/* =========================================================
   3. ANNOUNCEMENT BAR
   ========================================================= */

html.storefront-v2 .site-announcement {
  position: relative;
  z-index: 1100;

  overflow: hidden;

  background:
    linear-gradient(
      115deg,
      #062f77 0%,
      var(--v2-primary) 48%,
      var(--v2-primary-light) 100%
    );

  color: #ffffff;
}

html.storefront-v2 .site-announcement::before {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.12),
      transparent
    );

  content: "";

  transform: translateX(-110%);

  animation:
    v2-announcement-shine
    7s ease-in-out infinite;
}

html.storefront-v2 .announcement-shell {
  position: relative;
  z-index: 2;

  display: flex;

  width: var(--v2-container);
  min-height: 38px;
  margin-inline: auto;
  padding: 6px 0;

  align-items: center;
  justify-content: center;
  gap: 9px;

  text-align: center;
}

html.storefront-v2 .announcement-icon {
  display: inline-flex;

  width: 23px;
  height: 23px;

  align-items: center;
  justify-content: center;

  border: 1px solid
    rgba(255, 255, 255, 0.26);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.15);

  color: #ffffff;

  font-size: 11px;
  font-weight: 900;
}

html.storefront-v2 .announcement-text {
  margin: 0;

  color: #ffffff;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

html.storefront-v2 .announcement-text strong {
  font-weight: 900;
}

@keyframes v2-announcement-shine {
  0%,
  68% {
    transform: translateX(-110%);
  }

  82%,
  100% {
    transform: translateX(110%);
  }
}


/* =========================================================
   4. HEADER
   ========================================================= */

html.storefront-v2 .site-header {
  position: sticky;
  z-index: 1000;
  top: 0;

  border-bottom:
    1px solid
    rgba(226, 232, 240, 0.88);

  background:
    rgba(255, 255, 255, 0.94);

  box-shadow:
    0 1px 0
    rgba(255, 255, 255, 0.9),
    0 7px 25px
    rgba(16, 24, 40, 0.035);

  backdrop-filter:
    blur(20px)
    saturate(160%);
}

html.storefront-v2 .header-main {
  min-height: 72px;
}

html.storefront-v2 .header-shell {
  display: grid;

  width: var(--v2-container);
  min-height: 72px;
  margin-inline: auto;

  grid-template-columns:
    auto minmax(0, 1fr) auto;

  align-items: center;
  gap: 24px;
}


/* =========================================================
   5. BRAND
   ========================================================= */

html.storefront-v2 .brand-link {
  display: inline-flex;

  min-width: 0;

  align-items: center;
  gap: 12px;
}

html.storefront-v2 .brand-logo {
  display: flex;

  width: 48px;
  height: 48px;
  flex: 0 0 48px;

  overflow: hidden;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(8, 104, 245, 0.16);

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #eaf3ff 100%
    );

  color: var(--v2-primary);

  box-shadow:
    0 8px 22px
    rgba(8, 104, 245, 0.12);

  font-size: 21px;
  font-weight: 950;
}

html.storefront-v2 .brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

html.storefront-v2 .brand-copy {
  display: block;
  min-width: 0;
}

html.storefront-v2 .brand-name {
  display: block;

  max-width: 230px;
  overflow: hidden;

  color: var(--v2-navy);

  font-size: 18px;
  font-weight: 950;
  line-height: 1.25;

  text-overflow: ellipsis;
  white-space: nowrap;
}

html.storefront-v2 .brand-tagline {
  display: block;

  max-width: 230px;
  margin-top: 2px;
  overflow: hidden;

  color: var(--v2-muted);

  font-size: 9px;
  font-weight: 650;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   6. DESKTOP NAVIGATION
   ========================================================= */

html.storefront-v2 .desktop-nav {
  display: flex;

  min-width: 0;

  align-items: center;
  justify-content: center;
  gap: 4px;
}

html.storefront-v2 .desktop-nav-link {
  position: relative;

  display: inline-flex;

  min-height: 42px;
  padding: 9px 15px;

  align-items: center;
  justify-content: center;

  border-radius: var(--v2-radius-pill);

  color: #475467;

  font-size: 12px;
  font-weight: 800;

  transition:
    color 180ms ease,
    background-color 180ms ease;
}

html.storefront-v2 .desktop-nav-link::after {
  position: absolute;

  right: 50%;
  bottom: 4px;

  width: 0;
  height: 2px;

  border-radius: 10px;

  background:
    linear-gradient(
      90deg,
      var(--v2-primary),
      var(--v2-cyan)
    );

  content: "";

  transform: translateX(50%);

  transition:
    width 200ms ease;
}

html.storefront-v2 .desktop-nav-link:hover,
html.storefront-v2 .desktop-nav-link.is-active {
  background: #eff6ff;
  color: var(--v2-primary);
}

html.storefront-v2
.desktop-nav-link.is-active::after {
  width: 22px;
}


/* =========================================================
   7. HEADER ACTIONS
   ========================================================= */

html.storefront-v2 .header-actions {
  display: flex;

  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

html.storefront-v2 .header-icon-button,
html.storefront-v2 .mobile-menu-button {
  position: relative;

  display: inline-flex;

  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--v2-border);

  border-radius: 13px;

  background: #ffffff;
  color: var(--v2-navy);

  box-shadow:
    0 2px 7px
    rgba(16, 24, 40, 0.025);

  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2 .header-icon-button:hover,
html.storefront-v2 .mobile-menu-button:hover {
  border-color:
    rgba(8, 104, 245, 0.3);

  background: #eff6ff;
  color: var(--v2-primary);

  box-shadow:
    0 7px 18px
    rgba(8, 104, 245, 0.1);

  transform: translateY(-1px);
}

html.storefront-v2 .header-action-badge {
  position: absolute;

  top: -5px;
  left: -5px;

  display: flex;

  min-width: 19px;
  height: 19px;
  padding: 0 5px;

  align-items: center;
  justify-content: center;

  border: 2px solid #ffffff;
  border-radius: 999px;

  background: var(--v2-danger);
  color: #ffffff;

  font-size: 8px;
  font-weight: 950;
}

html.storefront-v2 .header-primary-button {
  display: inline-flex;

  min-height: 43px;
  padding: 10px 18px;

  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 0;

  border-radius: 13px;

  background:
    linear-gradient(
      120deg,
      var(--v2-primary-dark),
      var(--v2-primary) 55%,
      var(--v2-primary-light)
    );

  color: #ffffff;

  box-shadow:
    0 10px 24px
    rgba(8, 104, 245, 0.22);

  font-size: 11px;
  font-weight: 900;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

html.storefront-v2
.header-primary-button:hover {
  box-shadow:
    0 14px 30px
    rgba(8, 104, 245, 0.3);

  filter: saturate(1.1);

  transform: translateY(-2px);
}


/* =========================================================
   8. SEARCH AREA
   ========================================================= */

html.storefront-v2 .header-search-area {
  border-top:
    1px solid
    #eef2f6;

  background: #ffffff;
}

html.storefront-v2 .header-search-shell {
  display: grid;

  width: var(--v2-container);
  min-height: 64px;
  margin-inline: auto;

  grid-template-columns:
    minmax(0, 1fr) auto;

  align-items: center;
  gap: 18px;
}

html.storefront-v2 .store-search {
  position: relative;

  display: flex;

  width: min(100%, 820px);
  min-width: 0;

  align-items: center;
}

html.storefront-v2 .search-input {
  width: 100%;
  min-height: 46px;

  padding:
    10px 46px
    10px 116px;

  border:
    1.5px solid
    var(--v2-border-strong);

  border-radius: 15px;
  outline: 0;

  background: #ffffff;
  color: var(--v2-text);

  font-size: 12px;

  box-shadow:
    inset 0 1px 2px
    rgba(16, 24, 40, 0.018);

  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2 .search-input::placeholder {
  color: #a0aaba;
}

html.storefront-v2 .search-input:focus {
  border-color: var(--v2-primary);

  box-shadow:
    0 0 0 4px
    rgba(8, 104, 245, 0.09);
}

html.storefront-v2 .search-icon {
  position: absolute;
  z-index: 2;

  right: 16px;

  width: 19px;
  height: 19px;

  color: #8793a5;

  pointer-events: none;
}

html.storefront-v2 .search-submit {
  position: absolute;

  left: 5px;

  display: inline-flex;

  min-width: 102px;
  min-height: 36px;
  padding: 8px 15px;

  align-items: center;
  justify-content: center;

  border: 0;

  border-radius: 11px;

  background:
    linear-gradient(
      120deg,
      var(--v2-primary-dark),
      var(--v2-primary),
      var(--v2-primary-light)
    );

  color: #ffffff;

  font-size: 10px;
  font-weight: 900;

  box-shadow:
    0 6px 16px
    rgba(8, 104, 245, 0.18);
}

html.storefront-v2 .search-clear {
  left: 113px;
}

html.storefront-v2 .header-trust {
  display: flex;

  align-items: center;
  gap: 8px;

  color: #475467;

  font-size: 10px;
  font-weight: 750;

  white-space: nowrap;
}

html.storefront-v2 .header-trust-icon {
  display: flex;

  width: 32px;
  height: 32px;

  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background:
    var(--v2-success-soft);

  color:
    var(--v2-success);
}


/* =========================================================
   9. CATEGORY NAVIGATION
   ========================================================= */

html.storefront-v2 .category-nav {
  border-top:
    1px solid
    #f1f4f8;

  border-bottom:
    1px solid
    var(--v2-border);

  background: #ffffff;
}

html.storefront-v2 .category-nav-shell {
  width: var(--v2-container);
  margin-inline: auto;
}

html.storefront-v2 .category-nav-list {
  display: flex;

  padding: 9px 0;

  overflow-x: auto;

  align-items: center;
  gap: 8px;

  scrollbar-width: none;
}

html.storefront-v2
.category-nav-list::-webkit-scrollbar {
  display: none;
}

html.storefront-v2 .category-nav-link {
  display: inline-flex;

  min-height: 35px;
  padding: 7px 15px;
  flex: 0 0 auto;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--v2-border);

  border-radius: 999px;

  background: #ffffff;
  color: #475467;

  font-size: 10px;
  font-weight: 850;

  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2 .category-nav-link:hover,
html.storefront-v2
.category-nav-link.is-active {
  border-color:
    rgba(8, 104, 245, 0.25);

  background: #eef6ff;
  color: var(--v2-primary);

  box-shadow:
    0 4px 12px
    rgba(8, 104, 245, 0.07);
}


/* =========================================================
   10. HERO SECTION
   ========================================================= */

html.storefront-v2 .hero-section {
  position: relative;

  padding: 38px 0 26px;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 92% 8%,
      rgba(27, 145, 255, 0.09),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      #f9fbff,
      transparent
    );
}

html.storefront-v2 .hero-section::before,
html.storefront-v2 .hero-section::after {
  display: none;
}

html.storefront-v2 .hero-shell {
  position: relative;

  display: grid;

  width: var(--v2-container);
  min-height: 480px;
  margin-inline: auto;
  padding: 34px;

  overflow: hidden;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(360px, 0.82fr);

  align-items: center;
  gap: 48px;

  border:
    1px solid
    var(--v2-border);

  border-radius:
    var(--v2-radius-large);

  background:
    linear-gradient(
      125deg,
      #ffffff 0%,
      #ffffff 55%,
      #f1f7ff 100%
    );

  box-shadow:
    0 24px 65px
    rgba(16, 24, 40, 0.08);
}

html.storefront-v2 .hero-shell::before {
  position: absolute;

  top: 0;
  right: 0;
  left: 0;

  height: 5px;

  background:
    linear-gradient(
      90deg,
      var(--v2-cyan),
      var(--v2-primary),
      #5b5cf0
    );

  content: "";
}

html.storefront-v2 .hero-shell::after {
  position: absolute;

  top: -150px;
  left: -130px;

  width: 350px;
  height: 350px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(8, 104, 245, 0.1),
      transparent 68%
    );

  content: "";

  pointer-events: none;
}


/* Hero content */

html.storefront-v2 .hero-content {
  position: relative;
  z-index: 3;

  max-width: 650px;
}

html.storefront-v2 .hero-eyebrow {
  display: inline-flex;

  min-height: 34px;
  padding: 7px 13px;

  align-items: center;
  gap: 8px;

  border:
    1px solid
    rgba(8, 104, 245, 0.16);

  border-radius: 999px;

  background: #eff6ff;
  color: var(--v2-primary);

  font-size: 10px;
  font-weight: 900;
}

html.storefront-v2 .hero-eyebrow-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--v2-success);

  box-shadow:
    0 0 0 5px
    rgba(18, 163, 109, 0.11);
}

html.storefront-v2 .hero-title {
  max-width: 680px;
  margin:
    22px 0
    15px;

  color: var(--v2-navy);

  font-size:
    clamp(38px, 4.4vw, 61px);

  font-weight: 950;
  line-height: 1.13;
  letter-spacing: -0.035em;
}

html.storefront-v2 .hero-description {
  max-width: 590px;
  margin: 0;

  color: var(--v2-muted);

  font-size:
    clamp(13px, 1.35vw, 17px);

  font-weight: 500;
  line-height: 1.9;
}

html.storefront-v2 .hero-actions {
  display: flex;

  margin-top: 27px;

  align-items: center;
  gap: 11px;
}

html.storefront-v2 .hero-primary-button {
  display: inline-flex;

  min-height: 51px;
  padding: 11px 24px;

  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 0;

  border-radius: 14px;

  background:
    linear-gradient(
      115deg,
      var(--v2-primary-dark),
      var(--v2-primary) 52%,
      var(--v2-primary-light)
    );

  color: #ffffff;

  box-shadow:
    var(--v2-shadow-blue);

  font-size: 13px;
  font-weight: 950;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

html.storefront-v2
.hero-primary-button:hover {
  box-shadow:
    0 19px 39px
    rgba(8, 104, 245, 0.3);

  filter: saturate(1.1);

  transform: translateY(-2px);
}

html.storefront-v2 .hero-secondary-button {
  display: inline-flex;

  min-height: 51px;
  padding: 11px 22px;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    var(--v2-border-strong);

  border-radius: 14px;

  background: #ffffff;
  color: #344054;

  box-shadow:
    0 3px 10px
    rgba(16, 24, 40, 0.035);

  font-size: 12px;
  font-weight: 850;

  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2
.hero-secondary-button:hover {
  border-color:
    rgba(8, 104, 245, 0.3);

  color: var(--v2-primary);

  box-shadow:
    var(--v2-shadow-small);

  transform: translateY(-1px);
}


/* Hero stats */

html.storefront-v2 .hero-stats {
  display: grid;

  max-width: 620px;
  margin-top: 30px;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 9px;
}

html.storefront-v2 .hero-stat {
  display: flex;

  min-width: 0;
  min-height: 66px;
  padding: 10px 11px;

  align-items: center;
  gap: 9px;

  border:
    1px solid
    #e7edf5;

  border-radius: 14px;

  background:
    rgba(255, 255, 255, 0.84);

  box-shadow:
    0 5px 15px
    rgba(16, 24, 40, 0.035);
}

html.storefront-v2 .hero-stat-icon {
  display: flex;

  width: 37px;
  height: 37px;
  flex: 0 0 37px;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: #edf5ff;
  color: var(--v2-primary);
}

html.storefront-v2 .hero-stat > span:last-child {
  display: block;
  min-width: 0;
}

html.storefront-v2 .hero-stat strong {
  display: block;

  color: #344054;

  font-size: 9px;
  font-weight: 900;
  line-height: 1.4;
}

html.storefront-v2
.hero-stat > span:last-child > span {
  display: block;

  margin-top: 2px;

  color: var(--v2-muted);

  font-size: 7px;
  line-height: 1.4;
}


/* =========================================================
   11. HERO MEDIA
   ========================================================= */

html.storefront-v2 .hero-media {
  position: relative;

  display: flex;

  min-width: 0;
  min-height: 410px;

  align-items: center;
  justify-content: center;
}

html.storefront-v2 .hero-image-frame {
  position: relative;

  width: min(100%, 390px);
  height: 410px;

  overflow: hidden;

  border:
    7px solid
    rgba(255, 255, 255, 0.95);

  border-radius: 24px;

  background:
    linear-gradient(
      145deg,
      #eef5ff,
      #ffffff
    );

  box-shadow:
    0 24px 55px
    rgba(8, 47, 104, 0.17);
}

html.storefront-v2 .hero-image {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition:
    transform 500ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );
}

html.storefront-v2
.hero-image-frame:hover
.hero-image {
  transform: scale(1.025);
}

html.storefront-v2
.hero-image-placeholder {
  display: flex;

  width: 100%;
  height: 100%;
  padding: 32px;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;

  background:
    linear-gradient(
      145deg,
      #eef5ff,
      #ffffff
    );

  color: var(--v2-muted);

  text-align: center;
}

html.storefront-v2
.hero-image-placeholder-icon {
  display: flex;

  width: 72px;
  height: 72px;

  align-items: center;
  justify-content: center;

  border-radius: 22px;

  background: #ffffff;
  color: var(--v2-primary);

  box-shadow:
    0 15px 35px
    rgba(8, 104, 245, 0.13);

  font-size: 24px;
}

html.storefront-v2
.hero-image-placeholder strong {
  color: var(--v2-primary);

  font-size: 18px;
  font-weight: 950;
}

html.storefront-v2
.hero-image-placeholder > span:last-child {
  max-width: 240px;

  color: var(--v2-muted);

  font-size: 10px;
  line-height: 1.7;
}


/* Floating cards */

html.storefront-v2 .hero-floating-card {
  position: absolute;
  z-index: 4;

  display: flex;

  min-width: 178px;
  padding: 11px 13px;

  align-items: center;
  gap: 10px;

  border:
    1px solid
    rgba(255, 255, 255, 0.9);

  border-radius: 15px;

  background:
    rgba(255, 255, 255, 0.91);

  color: var(--v2-text);

  box-shadow:
    0 16px 36px
    rgba(16, 24, 40, 0.13);

  backdrop-filter:
    blur(15px);
}

html.storefront-v2
.hero-floating-card.is-top {
  top: 29px;
  right: -19px;
}

html.storefront-v2
.hero-floating-card.is-bottom {
  bottom: 27px;
  left: -20px;
}

html.storefront-v2 .hero-floating-icon {
  display: flex;

  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: #ebf5ff;
  color: var(--v2-primary);

  font-size: 15px;
  font-weight: 950;
}

html.storefront-v2
.hero-floating-card strong {
  display: block;

  color: #344054;

  font-size: 9px;
  font-weight: 900;
}

html.storefront-v2
.hero-floating-card
span span {
  display: block;

  margin-top: 2px;

  color: var(--v2-muted);

  font-size: 7px;
}


/* =========================================================
   12. TRUST STRIP
   ========================================================= */

html.storefront-v2
.trust-strip-section {
  padding: 0 0 22px;
}

html.storefront-v2 .trust-strip {
  display: grid;

  width: var(--v2-container);
  margin-inline: auto;
  padding: 10px;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 7px;

  border:
    1px solid
    var(--v2-border);

  border-radius: 19px;

  background: #ffffff;

  box-shadow:
    0 10px 32px
    rgba(16, 24, 40, 0.055);
}

html.storefront-v2 .trust-item {
  display: flex;

  min-width: 0;
  min-height: 67px;
  padding: 10px 12px;

  align-items: center;
  gap: 10px;

  border:
    1px solid
    transparent;

  border-radius: 14px;

  background: #ffffff;

  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

html.storefront-v2 .trust-item:hover {
  border-color:
    #d8e9ff;

  background:
    #f6faff;
}

html.storefront-v2 .trust-item-icon {
  display: flex;

  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: #edf5ff;
  color: var(--v2-primary);
}

html.storefront-v2
.trust-item:nth-child(2)
.trust-item-icon {
  background:
    var(--v2-success-soft);

  color:
    var(--v2-success);
}

html.storefront-v2 .trust-item strong {
  display: block;

  color: #344054;

  font-size: 9px;
  font-weight: 900;
}

html.storefront-v2
.trust-item > span:last-child > span {
  display: block;

  margin-top: 2px;

  color: var(--v2-muted);

  font-size: 7px;
  line-height: 1.45;
}


/* =========================================================
   13. TABLET
   ========================================================= */

@media (max-width: 1050px) {
  html.storefront-v2 .desktop-nav {
    display: none;
  }

  html.storefront-v2
  .mobile-menu-button {
    display: inline-flex;
  }

  html.storefront-v2 .header-shell {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  html.storefront-v2 .hero-shell {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(310px, 0.8fr);

    gap: 30px;
  }

  html.storefront-v2 .hero-title {
    font-size:
      clamp(37px, 5vw, 50px);
  }

  html.storefront-v2 .hero-image-frame {
    height: 380px;
  }

  html.storefront-v2 .hero-media {
    min-height: 380px;
  }
}


/* =========================================================
   14. MOBILE
   ========================================================= */

@media (max-width: 700px) {
  html.storefront-v2 {
    --v2-container:
      min(100% - 22px, 1220px);
  }

  html.storefront-v2 body {
    padding-bottom: 86px;
  }

  html.storefront-v2
  .site-announcement {
    position: relative;
  }

  html.storefront-v2
  .announcement-shell {
    min-height: 34px;
    padding: 5px 0;
  }

  html.storefront-v2
  .announcement-text {
    font-size: 9px;
  }

  html.storefront-v2
  .announcement-icon {
    width: 21px;
    height: 21px;
  }


  /* Header */

  html.storefront-v2 .site-header {
    position: relative;
    top: auto;
  }

  html.storefront-v2 .header-main,
  html.storefront-v2 .header-shell {
    min-height: 65px;
  }

  html.storefront-v2 .header-shell {
    gap: 7px;
  }

  html.storefront-v2 .brand-link {
    gap: 9px;
  }

  html.storefront-v2 .brand-logo {
    width: 43px;
    height: 43px;
    flex-basis: 43px;

    border-radius: 13px;
  }

  html.storefront-v2 .brand-name {
    max-width: 165px;

    font-size: 16px;
  }

  html.storefront-v2
  .brand-tagline {
    display: none;
  }

  html.storefront-v2
  .header-primary-button {
    display: none;
  }

  html.storefront-v2
  .header-icon-button,
  html.storefront-v2
  .mobile-menu-button {
    width: 39px;
    height: 39px;
    flex-basis: 39px;

    border-radius: 12px;
  }


  /* Search */

  html.storefront-v2
  .header-search-shell {
    min-height: 63px;

    grid-template-columns: 1fr;
  }

  html.storefront-v2 .store-search {
    width: 100%;
  }

  html.storefront-v2
  .header-trust {
    display: none;
  }

  html.storefront-v2 .search-input {
    min-height: 45px;

    padding-left: 98px;

    border-radius: 14px;

    font-size: 11px;
  }

  html.storefront-v2 .search-submit {
    min-width: 85px;
    min-height: 35px;

    border-radius: 10px;

    font-size: 9px;
  }

  html.storefront-v2 .search-clear {
    left: 96px;
  }


  /* Category navigation */

  html.storefront-v2
  .category-nav-list {
    padding: 8px 0;
    gap: 7px;
  }

  html.storefront-v2
  .category-nav-link {
    min-height: 34px;
    padding: 7px 14px;

    font-size: 9px;
  }


  /* Hero */

  html.storefront-v2 .hero-section {
    padding:
      15px 0
      17px;
  }

  html.storefront-v2 .hero-shell {
    min-height: 0;
    padding: 23px 18px 18px;

    grid-template-columns: 1fr;
    gap: 22px;

    border-radius: 23px;
  }

  html.storefront-v2 .hero-content {
    max-width: none;

    text-align: center;
  }

  html.storefront-v2 .hero-eyebrow {
    min-height: 31px;
    margin-inline: auto;
    padding: 6px 12px;

    font-size: 9px;
  }

  html.storefront-v2 .hero-title {
    margin:
      17px 0
      11px;

    font-size:
      clamp(31px, 9vw, 42px);

    line-height: 1.17;
  }

  html.storefront-v2
  .hero-description {
    max-width: 520px;
    margin-inline: auto;

    font-size: 11px;
    line-height: 1.8;
  }

  html.storefront-v2 .hero-actions {
    display: grid;

    width: 100%;
    margin-top: 20px;

    grid-template-columns:
      minmax(0, 1fr);

    gap: 9px;
  }

  html.storefront-v2
  .hero-primary-button,
  html.storefront-v2
  .hero-secondary-button {
    width: 100%;
    min-height: 47px;

    border-radius: 13px;
  }

  html.storefront-v2 .hero-stats {
    display: none;
  }

  html.storefront-v2 .hero-media {
    min-height: 265px;
  }

  html.storefront-v2
  .hero-image-frame {
    width: 100%;
    max-width: 420px;
    height: 270px;

    border-width: 5px;
    border-radius: 19px;
  }

  html.storefront-v2
  .hero-floating-card {
    min-width: 135px;
    padding: 8px 9px;
  }

  html.storefront-v2
  .hero-floating-card.is-top {
    top: 9px;
    right: -3px;
  }

  html.storefront-v2
  .hero-floating-card.is-bottom {
    bottom: 8px;
    left: -3px;
  }

  html.storefront-v2
  .hero-floating-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;

    border-radius: 9px;
  }

  html.storefront-v2
  .hero-floating-card strong {
    font-size: 8px;
  }

  html.storefront-v2
  .hero-floating-card span span {
    font-size: 6px;
  }


  /* Trust strip */

  html.storefront-v2
  .trust-strip-section {
    padding-bottom: 15px;
  }

  html.storefront-v2 .trust-strip {
    padding: 7px;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 5px;

    border-radius: 16px;
  }

  html.storefront-v2 .trust-item {
    min-height: 59px;
    padding: 7px;

    gap: 7px;

    border-radius: 12px;
  }

  html.storefront-v2
  .trust-item-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;

    border-radius: 10px;
  }

  html.storefront-v2
  .trust-item strong {
    font-size: 7.5px;
  }

  html.storefront-v2
  .trust-item > span:last-child > span {
    font-size: 6px;
  }
}


/* =========================================================
   15. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {
  html.storefront-v2 {
    --v2-container:
      min(100% - 16px, 1220px);
  }

  html.storefront-v2 .brand-name {
    max-width: 125px;
    font-size: 14px;
  }

  html.storefront-v2
  .header-actions {
    gap: 4px;
  }

  html.storefront-v2 .hero-shell {
    padding-inline: 14px;
  }

  html.storefront-v2 .hero-title {
    font-size: 30px;
  }

  html.storefront-v2
  .hero-image-frame {
    height: 245px;
  }

  html.storefront-v2 .hero-media {
    min-height: 245px;
  }

  html.storefront-v2
  .hero-floating-card {
    display: none;
  }
}


/* =========================================================
   16. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html.storefront-v2
  .site-announcement::before {
    animation: none;
  }

  html.storefront-v2 *,
  html.storefront-v2 *::before,
  html.storefront-v2 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* =========================================================
   STOREFRONT V2.1
   Desktop first-impression refinement
   Header • Search • Hero • Trust
   ========================================================= */

@media (min-width: 701px) {

  /* الإعلان العلوي */

  html.storefront-v2 .announcement-shell {
    min-height: 40px;
    padding-block: 7px;
    gap: 10px;
  }

  html.storefront-v2 .announcement-icon {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  html.storefront-v2 .announcement-text {
    font-size: 12px;
    font-weight: 800;
  }


  /* الهيدر */

  html.storefront-v2 .header-main,
  html.storefront-v2 .header-shell {
    min-height: 80px;
  }

  html.storefront-v2 .header-shell {
    gap: 28px;
  }

  html.storefront-v2 .brand-link {
    gap: 13px;
  }

  html.storefront-v2 .brand-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;

    border-radius: 16px;

    font-size: 23px;
  }

  html.storefront-v2 .brand-name {
    max-width: 260px;

    font-size: 20px;
    line-height: 1.25;
  }

  html.storefront-v2 .brand-tagline {
    max-width: 260px;

    margin-top: 3px;

    font-size: 10px;
    line-height: 1.45;
  }


  /* روابط التنقل */

  html.storefront-v2 .desktop-nav {
    gap: 6px;
  }

  html.storefront-v2 .desktop-nav-link {
    min-height: 44px;
    padding: 9px 17px;

    font-size: 13px;
  }

  html.storefront-v2
  .desktop-nav-link.is-active::after {
    bottom: 3px;
    width: 24px;
    height: 3px;
  }


  /* أزرار الهيدر */

  html.storefront-v2 .header-icon-button,
  html.storefront-v2 .mobile-menu-button {
    width: 45px;
    height: 45px;
    flex-basis: 45px;

    border-radius: 14px;
  }

  html.storefront-v2
  .header-icon-button .icon {
    width: 21px;
    height: 21px;
  }

  html.storefront-v2
  .header-primary-button {
    min-height: 46px;
    padding: 10px 20px;

    border-radius: 14px;

    font-size: 12px;
  }


  /* منطقة البحث */

  html.storefront-v2
  .header-search-shell {
    min-height: 72px;
    gap: 22px;
  }

  html.storefront-v2 .store-search {
    width: min(100%, 860px);
  }

  html.storefront-v2 .search-input {
    min-height: 52px;

    padding:
      11px 50px
      11px 128px;

    border-width: 1.5px;
    border-radius: 16px;

    font-size: 13px;

    box-shadow:
      0 3px 12px
      rgba(16, 24, 40, 0.035);
  }

  html.storefront-v2 .search-icon {
    right: 17px;

    width: 21px;
    height: 21px;
  }

  html.storefront-v2 .search-submit {
    left: 6px;

    min-width: 113px;
    min-height: 40px;

    padding-inline: 18px;

    border-radius: 12px;

    font-size: 11px;
  }

  html.storefront-v2 .search-clear {
    left: 121px;

    width: 30px;
    height: 30px;
  }

  html.storefront-v2 .header-trust {
    gap: 9px;

    font-size: 11px;
  }

  html.storefront-v2 .header-trust-icon {
    width: 35px;
    height: 35px;

    border-radius: 11px;
  }


  /* تصنيفات الهيدر */

  html.storefront-v2
  .category-nav-list {
    padding-block: 10px;
    gap: 9px;
  }

  html.storefront-v2
  .category-nav-link {
    min-height: 38px;
    padding: 8px 17px;

    font-size: 11px;
  }


  /* تقليل الفراغ قبل الـ Hero */

  html.storefront-v2 .hero-section {
    padding:
      24px 0
      23px;
  }


  /* Hero */

  html.storefront-v2 .hero-shell {
    min-height: 500px;
    padding: 40px;

    grid-template-columns:
      minmax(0, 1fr)
      minmax(390px, 0.84fr);

    gap: 54px;
  }

  html.storefront-v2 .hero-eyebrow {
    min-height: 36px;
    padding: 7px 14px;

    font-size: 11px;
  }

  html.storefront-v2 .hero-title {
    margin:
      23px 0
      16px;

    font-size:
      clamp(43px, 4.55vw, 64px);

    line-height: 1.11;
  }

  html.storefront-v2
  .hero-description {
    max-width: 620px;

    font-size: 16px;
    line-height: 1.9;
  }

  html.storefront-v2 .hero-actions {
    margin-top: 29px;
    gap: 12px;
  }

  html.storefront-v2
  .hero-primary-button,
  html.storefront-v2
  .hero-secondary-button {
    min-height: 53px;
    padding-inline: 25px;

    font-size: 13px;
  }


  /* بطاقات الثقة داخل Hero */

  html.storefront-v2 .hero-stats {
    margin-top: 31px;
    gap: 11px;
  }

  html.storefront-v2 .hero-stat {
    min-height: 74px;
    padding: 12px;

    gap: 11px;

    border-radius: 15px;
  }

  html.storefront-v2
  .hero-stat-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;

    border-radius: 12px;
  }

  html.storefront-v2
  .hero-stat strong {
    font-size: 11px;
  }

  html.storefront-v2
  .hero-stat > span:last-child > span {
    margin-top: 3px;

    font-size: 9px;
  }


  /* صورة Hero */

  html.storefront-v2 .hero-media {
    min-height: 435px;
  }

  html.storefront-v2
  .hero-image-frame {
    width: min(100%, 420px);
    height: 435px;

    border-width: 7px;
    border-radius: 26px;
  }


  /* البطاقات العائمة */

  html.storefront-v2
  .hero-floating-card {
    min-width: 192px;
    padding: 13px 15px;

    gap: 11px;

    border-radius: 16px;
  }

  html.storefront-v2
  .hero-floating-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;

    border-radius: 12px;
  }

  html.storefront-v2
  .hero-floating-card strong {
    font-size: 11px;
  }

  html.storefront-v2
  .hero-floating-card span span {
    margin-top: 3px;

    font-size: 9px;
  }


  /* شريط الثقة بعد Hero */

  html.storefront-v2 .trust-strip {
    padding: 12px;
    gap: 9px;

    border-radius: 20px;
  }

  html.storefront-v2 .trust-item {
    min-height: 76px;
    padding: 12px 14px;

    gap: 12px;

    border-radius: 15px;
  }

  html.storefront-v2
  .trust-item-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;

    border-radius: 13px;
  }

  html.storefront-v2
  .trust-item-icon .icon {
    width: 21px;
    height: 21px;
  }

  html.storefront-v2
  .trust-item strong {
    font-size: 11px;
  }

  html.storefront-v2
  .trust-item > span:last-child > span {
    margin-top: 3px;

    font-size: 9px;
    line-height: 1.5;
  }
}
/* =========================================================
   STOREFRONT V2.2
   Mobile density and above-the-fold optimization
   ========================================================= */

@media (max-width: 700px) {

  /* مساحة آمنة للشريط السفلي */

  html.storefront-v2 body {
    padding-bottom: 78px;
  }


  /* الشريط الإعلاني */

  html.storefront-v2 .announcement-shell {
    min-height: 31px;
    padding-block: 4px;
  }

  html.storefront-v2 .announcement-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  html.storefront-v2 .announcement-text {
    font-size: 8.5px;
    line-height: 1.4;
  }


  /* الهيدر الرئيسي */

  html.storefront-v2 .header-main,
  html.storefront-v2 .header-shell {
    min-height: 59px;
  }

  html.storefront-v2 .header-shell {
    gap: 6px;
  }

  html.storefront-v2 .brand-link {
    gap: 8px;
  }

  html.storefront-v2 .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;

    border-radius: 12px;
  }

  html.storefront-v2 .brand-name {
    max-width: 160px;

    font-size: 15px;
  }

  html.storefront-v2 .header-icon-button,
  html.storefront-v2 .mobile-menu-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;

    border-radius: 11px;
  }

  html.storefront-v2 .header-icon-button .icon,
  html.storefront-v2 .mobile-menu-button .icon {
    width: 19px;
    height: 19px;
  }


  /* البحث */

  html.storefront-v2 .header-search-shell {
    min-height: 56px;
  }

  html.storefront-v2 .search-input {
    min-height: 43px;

    padding-right: 43px;
    padding-left: 94px;

    border-radius: 13px;

    font-size: 10.5px;
  }

  html.storefront-v2 .search-icon {
    right: 14px;

    width: 19px;
    height: 19px;
  }

  html.storefront-v2 .search-submit {
    left: 4px;

    min-width: 82px;
    min-height: 35px;

    border-radius: 10px;

    font-size: 9px;
  }

  html.storefront-v2 .search-clear {
    left: 91px;
  }


  /* شريط التصنيفات */

  html.storefront-v2 .category-nav-list {
    padding-block: 6px;
    gap: 6px;
  }

  html.storefront-v2 .category-nav-link {
    min-height: 32px;
    padding: 6px 12px;

    font-size: 8.5px;
  }


  /* مساحة أقل قبل Hero */

  html.storefront-v2 .hero-section {
    padding: 10px 0 12px;
  }


  /* البطاقة الرئيسية */

  html.storefront-v2 .hero-shell {
    min-height: 0;
    padding: 17px 14px 14px;

    gap: 11px;

    border-radius: 20px;
  }

  html.storefront-v2 .hero-content {
    text-align: center;
  }


  /* Badge */

  html.storefront-v2 .hero-eyebrow {
    min-height: 28px;
    padding: 5px 10px;

    font-size: 8.5px;
  }

  html.storefront-v2 .hero-eyebrow-dot {
    width: 7px;
    height: 7px;

    box-shadow:
      0 0 0 4px
      rgba(18, 163, 109, 0.1);
  }


  /* العنوان */

  html.storefront-v2 .hero-title {
    margin: 12px 0 7px;

    font-size:
      clamp(28px, 8.2vw, 35px);

    line-height: 1.15;
    letter-spacing: -0.025em;
  }

  html.storefront-v2 .hero-description {
    max-width: 430px;
    margin-inline: auto;

    font-size: 10.5px;
    line-height: 1.65;
  }


  /* الأزرار */

  html.storefront-v2 .hero-actions {
    margin-top: 13px;

    gap: 4px;
  }

  html.storefront-v2 .hero-primary-button {
    min-height: 46px;
    padding: 9px 18px;

    border-radius: 13px;

    font-size: 11.5px;
  }

  html.storefront-v2 .hero-secondary-button {
    width: max-content;
    min-height: 34px;
    margin-inline: auto;
    padding: 5px 12px;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: var(--v2-primary);

    box-shadow: none;

    font-size: 9.5px;
  }

  html.storefront-v2
  .hero-secondary-button:hover {
    background: #eff6ff;

    box-shadow: none;

    transform: none;
  }


  /* إخفاء الإحصائيات على الهاتف */

  html.storefront-v2 .hero-stats {
    display: none;
  }


  /* صورة Hero تظهر أبكر */

  html.storefront-v2 .hero-media {
    min-height: 220px;
    margin-top: 0;
  }

  html.storefront-v2 .hero-image-frame {
    width: 100%;
    max-width: 430px;
    height: 230px;

    border-width: 4px;
    border-radius: 17px;
  }

  html.storefront-v2 .hero-image {
    object-fit: cover;
    object-position: center 20%;
  }


  /* إزالة البطاقات العائمة من الهاتف */

  html.storefront-v2 .hero-floating-card {
    display: none;
  }


  /* تصغير شريط التنقل السفلي */

  html.storefront-v2 .mobile-bottom-nav {
    right: 12px;
    bottom:
      max(
        7px,
        env(safe-area-inset-bottom)
      );
    left: 12px;

    min-height: 58px;
    padding: 4px;

    gap: 3px;

    border-radius: 17px;

    box-shadow:
      0 13px 34px
      rgba(15, 31, 61, 0.15);
  }

  html.storefront-v2 .mobile-bottom-link {
    padding: 3px 2px;

    gap: 2px;

    border-radius: 12px;

    font-size: 7px;
  }

  html.storefront-v2
  .mobile-bottom-link .icon {
    width: 20px;
    height: 20px;
  }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

  html.storefront-v2 .hero-shell {
    padding-inline: 12px;
  }

  html.storefront-v2 .hero-title {
    font-size: 27px;
  }

  html.storefront-v2 .hero-description {
    font-size: 10px;
  }

  html.storefront-v2 .hero-image-frame {
    height: 210px;
  }

  html.storefront-v2 .hero-media {
    min-height: 210px;
  }
}
/* =========================================================
   STOREFRONT V2.3
   Premium Categories + Product Catalog
   ========================================================= */


/* =========================================================
   1. SHARED CATALOG SECTIONS
   ========================================================= */

html.storefront-v2 #categoriesSection,
html.storefront-v2 #products {
  position: relative;
  overflow: hidden;
}

html.storefront-v2 #categoriesSection {
  padding: 42px 0 55px;

  border-top:
    1px solid
    rgba(226, 232, 240, 0.82);

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fbff 100%
    );
}

html.storefront-v2 #products {
  padding: 58px 0 72px;

  border-top:
    1px solid
    var(--v2-border);

  border-bottom:
    1px solid
    var(--v2-border);

  background:
    linear-gradient(
      180deg,
      #f5f8fd 0%,
      #ffffff 32%,
      #f8faff 100%
    );
}

html.storefront-v2 #products::before {
  position: absolute;

  top: -180px;
  right: -160px;

  width: 430px;
  height: 430px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(8, 104, 245, 0.075),
      transparent 68%
    );

  content: "";

  pointer-events: none;
}


/* =========================================================
   2. SECTION HEADINGS
   ========================================================= */

html.storefront-v2
#categoriesSection .section-heading,
html.storefront-v2
#products .section-heading {
  position: relative;
  z-index: 2;

  display: flex;

  margin-bottom: 27px;

  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

html.storefront-v2
#categoriesSection .section-heading-content,
html.storefront-v2
#products .section-heading-content {
  max-width: 720px;
}

html.storefront-v2
#categoriesSection .section-kicker,
html.storefront-v2
#products .section-kicker {
  display: inline-flex;

  min-height: 31px;
  padding: 6px 13px;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(8, 104, 245, 0.13);

  border-radius: 999px;

  background: #eff6ff;
  color: var(--v2-primary);

  font-size: 9px;
  font-weight: 950;
}

html.storefront-v2
#categoriesSection .section-title,
html.storefront-v2
#products .section-title {
  margin: 12px 0 8px;

  color: var(--v2-navy);

  font-size:
    clamp(30px, 3.15vw, 45px);

  font-weight: 950;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

html.storefront-v2
#categoriesSection .section-description,
html.storefront-v2
#products .section-description {
  max-width: 650px;
  margin: 0;

  color: var(--v2-muted);

  font-size: 13px;
  line-height: 1.85;
}

html.storefront-v2 .section-link {
  display: inline-flex;

  min-height: 43px;
  padding: 9px 17px;

  align-items: center;
  justify-content: center;
  gap: 8px;

  border:
    1px solid
    rgba(8, 104, 245, 0.18);

  border-radius: 13px;

  background: #ffffff;
  color: var(--v2-primary);

  box-shadow:
    0 6px 18px
    rgba(16, 24, 40, 0.045);

  font-size: 10px;
  font-weight: 900;

  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

html.storefront-v2 .section-link:hover {
  border-color:
    rgba(8, 104, 245, 0.35);

  background: #eff6ff;

  box-shadow:
    0 10px 22px
    rgba(8, 104, 245, 0.1);

  transform: translateY(-2px);
}


/* =========================================================
   3. CATEGORIES GRID
   ========================================================= */

html.storefront-v2 .categories-grid {
  position: relative;
  z-index: 2;

  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 17px;
}


/* =========================================================
   4. CATEGORY CARD
   ========================================================= */

html.storefront-v2 .category-card {
  position: relative;

  display: flex;

  min-width: 0;
  min-height: 235px;
  padding: 10px;

  overflow: hidden;
  flex-direction: column;

  border:
    1px solid
    var(--v2-border);

  border-radius: 21px;

  background: #ffffff;

  box-shadow:
    0 8px 25px
    rgba(16, 24, 40, 0.055);

  isolation: isolate;

  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

html.storefront-v2 .category-card::before {
  position: absolute;
  z-index: -1;

  top: -75px;
  left: -75px;

  width: 170px;
  height: 170px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(8, 104, 245, 0.09),
      transparent 70%
    );

  content: "";

  transition:
    transform 300ms ease;
}

html.storefront-v2 .category-card:hover {
  border-color:
    rgba(8, 104, 245, 0.28);

  box-shadow:
    0 18px 40px
    rgba(8, 62, 135, 0.12);

  transform: translateY(-5px);
}

html.storefront-v2
.category-card:hover::before {
  transform: scale(1.2);
}


/* Category image */

html.storefront-v2 .category-card-media {
  position: relative;

  display: grid;

  width: 100%;
  height: 160px;

  overflow: hidden;

  place-items: center;

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      #edf5ff,
      #f8fbff
    );
}

html.storefront-v2 .category-card-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition:
    transform 450ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );
}

html.storefront-v2
.category-card:hover
.category-card-image {
  transform: scale(1.045);
}

html.storefront-v2 .category-placeholder {
  display: grid;

  width: 65px;
  height: 65px;

  place-items: center;

  border:
    1px solid
    rgba(8, 104, 245, 0.13);

  border-radius: 20px;

  background: #ffffff;
  color: var(--v2-primary);

  box-shadow:
    0 12px 28px
    rgba(8, 104, 245, 0.12);

  font-size: 25px;
}


/* Category content */

html.storefront-v2 .category-card-content {
  display: flex;

  min-height: 61px;
  padding: 12px 5px 3px;

  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

html.storefront-v2 .category-card-title {
  margin: 0 0 3px;

  color: var(--v2-navy);

  font-size: 14px;
  font-weight: 950;
  line-height: 1.4;
}

html.storefront-v2 .category-card-count {
  display: block;

  color: var(--v2-muted);

  font-size: 9px;
  font-weight: 700;
}

html.storefront-v2 .category-card-arrow {
  display: grid;

  width: 37px;
  height: 37px;
  flex: 0 0 37px;

  place-items: center;

  border:
    1px solid
    rgba(8, 104, 245, 0.13);

  border-radius: 12px;

  background: #eff6ff;
  color: var(--v2-primary);

  font-size: 15px;
  font-weight: 950;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

html.storefront-v2
.category-card:hover
.category-card-arrow {
  background: var(--v2-primary);
  color: #ffffff;

  transform: translateX(-3px);
}


/* Single category */

html.storefront-v2
.categories-grid
> .category-card:only-child {
  grid-column: 1 / -1;

  width: min(100%, 340px);

  justify-self: center;
}


/* =========================================================
   5. PRODUCTS TOOLBAR
   ========================================================= */

html.storefront-v2 .products-toolbar {
  position: relative;
  z-index: 3;

  display: flex;

  margin-bottom: 24px;
  padding: 13px 14px;

  align-items: center;
  justify-content: space-between;
  gap: 18px;

  border:
    1px solid
    var(--v2-border);

  border-radius: 17px;

  background:
    rgba(255, 255, 255, 0.92);

  box-shadow:
    0 9px 27px
    rgba(16, 24, 40, 0.055);

  backdrop-filter:
    blur(13px);
}

html.storefront-v2 .products-result-info {
  display: flex;

  min-width: 0;

  align-items: center;
  gap: 10px;

  color: #475467;

  font-size: 10px;
  font-weight: 850;
}

html.storefront-v2 .products-result-count {
  display: grid;

  min-width: 38px;
  height: 38px;
  padding-inline: 9px;

  place-items: center;

  border:
    1px solid
    rgba(8, 104, 245, 0.14);

  border-radius: 12px;

  background: #eff6ff;
  color: var(--v2-primary);

  font-size: 13px;
  font-weight: 950;
}

html.storefront-v2 .products-toolbar-actions {
  display: flex;

  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

html.storefront-v2 .products-sort {
  min-width: 220px;
  min-height: 42px;
  padding: 8px 13px;

  border:
    1px solid
    var(--v2-border-strong);

  border-radius: 12px;
  outline: 0;

  background: #ffffff;
  color: var(--v2-text);

  font-size: 10px;
  font-weight: 800;

  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2 .products-sort:focus {
  border-color: var(--v2-primary);

  box-shadow:
    0 0 0 4px
    rgba(8, 104, 245, 0.08);
}

html.storefront-v2 .view-switcher {
  display: flex;

  padding: 4px;

  align-items: center;
  gap: 3px;

  border:
    1px solid
    var(--v2-border);

  border-radius: 12px;

  background: #f5f7fa;
}

html.storefront-v2 .view-switch-button {
  display: grid;

  width: 34px;
  height: 34px;

  place-items: center;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: #8994a6;

  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

html.storefront-v2
.view-switch-button.is-active {
  background: #ffffff;
  color: var(--v2-primary);

  box-shadow:
    0 4px 11px
    rgba(16, 24, 40, 0.08);
}


/* =========================================================
   6. PRODUCTS GRID
   ========================================================= */

html.storefront-v2 .products-grid,
html.storefront-v2 .products-skeleton {
  position: relative;
  z-index: 2;

  display: grid;

  grid-template-columns:
    repeat(
      var(--home-products-desktop),
      minmax(0, 1fr)
    );

  gap: 20px;
}


/* =========================================================
   7. PREMIUM PRODUCT CARD
   ========================================================= */

html.storefront-v2 .product-card {
  position: relative;

  display: flex;

  min-width: 0;
  overflow: hidden;

  flex-direction: column;

  border:
    1px solid
    var(--v2-border);

  border-radius: 20px;

  background: #ffffff;

  box-shadow:
    0 7px 23px
    rgba(16, 24, 40, 0.055);

  isolation: isolate;

  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

html.storefront-v2 .product-card:hover {
  border-color:
    rgba(8, 104, 245, 0.27);

  box-shadow:
    0 21px 46px
    rgba(8, 56, 122, 0.13);

  transform: translateY(-6px);
}


/* =========================================================
   8. PRODUCT MEDIA
   ========================================================= */

html.storefront-v2 .product-media {
  position: relative;

  display: block;

  width: 100%;

  aspect-ratio: 4 / 5;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      #edf3f9,
      #f9fbfd
    );
}

html.storefront-v2 .product-media::after {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      transparent 63%,
      rgba(15, 23, 42, 0.05)
    );

  content: "";

  pointer-events: none;
}

html.storefront-v2 .product-image {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center top;

  transition:
    transform 500ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );
}

html.storefront-v2
.product-card:hover
.product-image {
  transform: scale(1.035);
}

html.storefront-v2
.product-image-placeholder {
  display: flex;

  width: 100%;
  height: 100%;
  padding: 20px;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;

  background:
    linear-gradient(
      145deg,
      #edf5ff,
      #f8fbff
    );

  color: var(--v2-muted);

  text-align: center;

  font-size: 10px;
}

html.storefront-v2
.product-image-placeholder-icon {
  display: grid;

  width: 65px;
  height: 65px;

  place-items: center;

  border-radius: 20px;

  background: #ffffff;
  color: var(--v2-primary);

  box-shadow:
    0 14px 30px
    rgba(8, 104, 245, 0.12);

  font-size: 23px;
}


/* =========================================================
   9. PRODUCT BADGES
   ========================================================= */

html.storefront-v2 .product-badges {
  position: absolute;
  z-index: 4;

  top: 11px;
  right: 11px;

  display: flex;

  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

html.storefront-v2 .product-badge {
  display: inline-flex;

  min-height: 28px;
  padding: 6px 9px;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(255, 255, 255, 0.56);

  border-radius: 999px;

  color: #ffffff;

  box-shadow:
    0 8px 18px
    rgba(16, 24, 40, 0.15);

  backdrop-filter:
    blur(8px);

  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}

html.storefront-v2 .discount-badge {
  background:
    linear-gradient(
      125deg,
      #ef2f4a,
      #dc1f3b
    );
}

html.storefront-v2 .featured-badge {
  background:
    linear-gradient(
      125deg,
      #7c3aed,
      #5b35d5
    );
}

html.storefront-v2
.out-of-stock-badge {
  background:
    rgba(23, 32, 51, 0.84);
}


/* =========================================================
   10. FLOATING ACTIONS
   ========================================================= */

html.storefront-v2
.product-floating-actions {
  position: absolute;
  z-index: 6;

  top: 11px;
  left: 11px;

  display: flex;

  flex-direction: column;
  gap: 7px;
}

html.storefront-v2
.product-floating-button {
  display: grid;

  width: 38px;
  height: 38px;

  place-items: center;

  border:
    1px solid
    rgba(226, 232, 240, 0.88);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.92);

  color: #344054;

  box-shadow:
    0 9px 20px
    rgba(16, 24, 40, 0.11);

  backdrop-filter:
    blur(12px);

  font-size: 17px;

  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

html.storefront-v2
.product-floating-button:hover {
  border-color:
    rgba(8, 104, 245, 0.25);

  background: var(--v2-primary);
  color: #ffffff;

  transform: translateY(-2px);
}


/* =========================================================
   11. PRODUCT BODY
   ========================================================= */

html.storefront-v2 .product-body {
  display: flex;

  min-height: 235px;
  padding: 16px;

  flex: 1;
  flex-direction: column;
}

html.storefront-v2 .product-category {
  display: block;

  margin-bottom: 6px;

  color: var(--v2-primary);

  font-size: 8.5px;
  font-weight: 900;
}

html.storefront-v2 .product-name {
  min-height: 44px;
  margin: 0 0 8px;

  color: var(--v2-navy);

  font-size: 15px;
  font-weight: 950;
  line-height: 1.45;
}

html.storefront-v2 .product-name a {
  display: -webkit-box;

  overflow: hidden;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html.storefront-v2 .product-description {
  display: -webkit-box;

  min-height: 38px;
  margin: 0 0 13px;

  overflow: hidden;

  color: var(--v2-muted);

  font-size: 9.5px;
  line-height: 1.7;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}


/* =========================================================
   12. PRODUCT PRICES
   ========================================================= */

html.storefront-v2
.product-price-area {
  display: flex;

  margin-top: auto;

  align-items: flex-end;
  justify-content: space-between;
  gap: 9px;
}

html.storefront-v2 .product-prices {
  display: flex;

  min-width: 0;

  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

html.storefront-v2 .current-price {
  color: var(--v2-primary);

  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.025em;
}

html.storefront-v2 .compare-price {
  color: #98a2b3;

  font-size: 9px;
  font-weight: 700;

  text-decoration: line-through;
}

html.storefront-v2 .product-saving {
  display: inline-flex;

  min-height: 27px;
  padding: 5px 8px;

  align-items: center;
  justify-content: center;

  border:
    1px solid
    rgba(18, 163, 109, 0.12);

  border-radius: 999px;

  background: var(--v2-success-soft);
  color: var(--v2-success);

  font-size: 7.5px;
  font-weight: 950;

  white-space: nowrap;
}


/* =========================================================
   13. PRODUCT ACTIONS
   ========================================================= */

html.storefront-v2 .product-actions {
  display: grid;

  margin-top: 15px;

  grid-template-columns:
    minmax(0, 1fr)
    42px;

  gap: 8px;
}

html.storefront-v2
.product-buy-button,
html.storefront-v2
.product-details-button {
  display: inline-grid;

  min-height: 44px;

  place-items: center;

  border-radius: 13px;

  font-size: 10px;
  font-weight: 950;

  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

html.storefront-v2
.product-buy-button {
  border: 0;

  background:
    linear-gradient(
      115deg,
      var(--v2-primary-dark),
      var(--v2-primary) 54%,
      var(--v2-primary-light)
    );

  color: #ffffff;

  box-shadow:
    0 11px 23px
    rgba(8, 104, 245, 0.2);
}

html.storefront-v2
.product-buy-button:hover {
  box-shadow:
    0 15px 29px
    rgba(8, 104, 245, 0.29);

  transform: translateY(-2px);
}

html.storefront-v2
.product-buy-button[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

html.storefront-v2
.product-details-button {
  border:
    1px solid
    var(--v2-border-strong);

  background: #ffffff;
  color: var(--v2-primary);
}

html.storefront-v2
.product-details-button:hover {
  border-color:
    rgba(8, 104, 245, 0.28);

  background: #eff6ff;

  transform: translateY(-1px);
}


/* =========================================================
   14. SINGLE PRODUCT
   ========================================================= */

html.storefront-v2
.products-grid:not(.is-list-view)
> .product-card:only-child {
  grid-column: 1 / -1;

  width: min(100%, 335px);

  justify-self: center;
}


/* =========================================================
   15. LIST VIEW
   ========================================================= */

html.storefront-v2
.products-grid.is-list-view {
  grid-template-columns: 1fr;
}

html.storefront-v2
.products-grid.is-list-view
.product-card {
  display: grid;

  grid-template-columns:
    235px
    minmax(0, 1fr);
}

html.storefront-v2
.products-grid.is-list-view
.product-media {
  height: 100%;
  min-height: 275px;

  aspect-ratio: auto;
}

html.storefront-v2
.products-grid.is-list-view
.product-body {
  min-height: 275px;
  padding: 22px;
}

html.storefront-v2
.products-grid.is-list-view
.product-description {
  -webkit-line-clamp: 3;
}


/* =========================================================
   16. SKELETON
   ========================================================= */

html.storefront-v2 .product-skeleton {
  overflow: hidden;

  border:
    1px solid
    var(--v2-border);

  border-radius: 20px;

  background: #ffffff;
}

html.storefront-v2 .skeleton-image {
  aspect-ratio: 4 / 5;
}

html.storefront-v2 .skeleton-body {
  padding: 16px;
}


/* =========================================================
   17. TABLET
   ========================================================= */

@media (max-width: 1180px) {
  html.storefront-v2 .categories-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }
}


/* =========================================================
   18. MOBILE CATALOG
   ========================================================= */

@media (max-width: 700px) {

  html.storefront-v2 #categoriesSection {
    padding: 30px 0 35px;
  }

  html.storefront-v2 #products {
    padding: 36px 0 48px;
  }


  /* Heading */

  html.storefront-v2
  #categoriesSection .section-heading,
  html.storefront-v2
  #products .section-heading {
    margin-bottom: 18px;

    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  html.storefront-v2
  #categoriesSection .section-kicker,
  html.storefront-v2
  #products .section-kicker {
    min-height: 27px;
    padding: 5px 10px;

    font-size: 7.5px;
  }

  html.storefront-v2
  #categoriesSection .section-title,
  html.storefront-v2
  #products .section-title {
    margin: 9px 0 6px;

    font-size: 27px;
    line-height: 1.2;
  }

  html.storefront-v2
  #categoriesSection .section-description,
  html.storefront-v2
  #products .section-description {
    font-size: 9.5px;
    line-height: 1.7;
  }

  html.storefront-v2 .section-link {
    min-height: 36px;
    padding: 7px 12px;

    border-radius: 11px;

    font-size: 8px;
  }


  /* Categories */

  html.storefront-v2 .categories-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 9px;
  }

  html.storefront-v2 .category-card {
    min-height: 165px;
    padding: 7px;

    border-radius: 16px;
  }

  html.storefront-v2 .category-card-media {
    height: 105px;

    border-radius: 12px;
  }

  html.storefront-v2
  .category-placeholder {
    width: 50px;
    height: 50px;

    border-radius: 16px;

    font-size: 19px;
  }

  html.storefront-v2
  .category-card-content {
    min-height: 47px;
    padding: 8px 2px 0;

    gap: 5px;
  }

  html.storefront-v2
  .category-card-title {
    margin-bottom: 2px;

    font-size: 9.5px;
  }

  html.storefront-v2
  .category-card-count {
    font-size: 6.5px;
  }

  html.storefront-v2
  .category-card-arrow {
    width: 28px;
    height: 28px;
    flex-basis: 28px;

    border-radius: 9px;

    font-size: 11px;
  }

  html.storefront-v2
  .categories-grid
  > .category-card:only-child {
    width: min(100%, 260px);
  }


  /* Toolbar */

  html.storefront-v2 .products-toolbar {
    margin-bottom: 15px;
    padding: 9px;

    align-items: stretch;
    flex-direction: column;
    gap: 8px;

    border-radius: 14px;
  }

  html.storefront-v2
  .products-result-info {
    justify-content: space-between;

    font-size: 8px;
  }

  html.storefront-v2
  .products-result-count {
    min-width: 32px;
    height: 32px;

    border-radius: 10px;

    font-size: 11px;
  }

  html.storefront-v2
  .products-toolbar-actions {
    width: 100%;

    justify-content: space-between;
  }

  html.storefront-v2 .products-sort {
    min-width: 0;
    min-height: 38px;

    flex: 1;

    border-radius: 10px;

    font-size: 8px;
  }

  html.storefront-v2 .view-switcher {
    padding: 3px;

    border-radius: 10px;
  }

  html.storefront-v2
  .view-switch-button {
    width: 31px;
    height: 31px;

    border-radius: 8px;
  }


  /* Grid */

  html.storefront-v2 .products-grid,
  html.storefront-v2 .products-skeleton {
    grid-template-columns:
      repeat(
        var(--home-products-mobile),
        minmax(0, 1fr)
      );

    gap: 10px;
  }


  /* Product card */

  html.storefront-v2 .product-card {
    border-radius: 16px;
  }

  html.storefront-v2 .product-media {
    aspect-ratio: 4 / 5;
  }

  html.storefront-v2
  .product-badges {
    top: 7px;
    right: 7px;

    gap: 4px;
  }

  html.storefront-v2
  .product-badge {
    min-height: 21px;
    padding: 4px 6px;

    font-size: 6.5px;
  }

  html.storefront-v2
  .product-floating-actions {
    top: 7px;
    left: 7px;

    gap: 5px;
  }

  html.storefront-v2
  .product-floating-button {
    width: 31px;
    height: 31px;

    border-radius: 10px;

    font-size: 14px;
  }

  html.storefront-v2 .product-body {
    min-height: 183px;
    padding: 10px;
  }

  html.storefront-v2
  .product-category {
    margin-bottom: 4px;

    font-size: 6.5px;
  }

  html.storefront-v2 .product-name {
    min-height: 34px;
    margin-bottom: 5px;

    font-size: 10.5px;
    line-height: 1.45;
  }

  html.storefront-v2
  .product-description {
    display: none;
  }

  html.storefront-v2
  .product-price-area {
    display: block;
  }

  html.storefront-v2
  .product-prices {
    gap: 5px;
  }

  html.storefront-v2
  .current-price {
    font-size: 16px;
  }

  html.storefront-v2
  .compare-price {
    font-size: 7px;
  }

  html.storefront-v2
  .product-saving {
    width: max-content;
    min-height: 21px;
    margin-top: 6px;
    padding: 4px 6px;

    font-size: 6px;
  }

  html.storefront-v2
  .product-actions {
    margin-top: 10px;

    grid-template-columns: 1fr;

    gap: 5px;
  }

  html.storefront-v2
  .product-buy-button {
    min-height: 38px;

    border-radius: 11px;

    font-size: 8px;
  }

  html.storefront-v2
  .product-details-button {
    display: none;
  }


  /* Single product */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child {
    width: min(100%, 310px);
  }


  /* One product per row chosen by merchant */


  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-card {
    display: grid;

    min-height: 220px;

    grid-template-columns:
      minmax(125px, 42%)
      minmax(0, 1fr);
  }

  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-media {
    height: 100%;
    min-height: 220px;

    aspect-ratio: auto;
  }

  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-body {
    min-height: 220px;
    padding: 13px;
  }

  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-description {
    display: -webkit-box;
  }

  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-details-button {
    display: inline-grid;
  }

  html.storefront-v2[style*="--store-products-mobile: 1"]
  .product-actions {
    grid-template-columns:
      minmax(0, 1fr)
      38px;
  }
}


/* =========================================================
   19. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

  html.storefront-v2
  #categoriesSection .section-title,
  html.storefront-v2
  #products .section-title {
    font-size: 24px;
  }

  html.storefront-v2
  .categories-grid {
    gap: 7px;
  }

  html.storefront-v2
  .category-card {
    min-height: 155px;
  }

  html.storefront-v2
  .category-card-media {
    height: 98px;
  }

  html.storefront-v2
  .products-grid,
  html.storefront-v2
  .products-skeleton {
    gap: 8px;
  }

  html.storefront-v2
  .product-body {
    padding: 8px;
  }

  html.storefront-v2
  .product-name {
    font-size: 9.5px;
  }

  html.storefront-v2
  .current-price {
    font-size: 14.5px;
  }

  html.storefront-v2
  .product-buy-button {
    font-size: 7.5px;
  }
}
/* =========================================================
   STOREFRONT V2.4
   Smart catalog count • Compact cards • Reliable mobile mode
   ========================================================= */


/* =========================================================
   1. DESKTOP — ADAPT GRID TO PRODUCT COUNT
   ========================================================= */

@media (min-width: 701px) {

  /*
   * منتج واحد: بطاقة واحدة في الوسط.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  [data-product-id] {
    min-width: 0;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  [data-product-id]:only-child {
    width: 100%;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  &[data-product-count="1"] {
    grid-template-columns:
      minmax(300px, 350px);

    justify-content: center;
  }

  /*
   * منتجان: بطاقتان متوازنتان في الوسط.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  &[data-product-count="2"] {
    grid-template-columns:
      repeat(
        2,
        minmax(290px, 335px)
      );

    justify-content: center;
  }

  /*
   * ثلاثة منتجات.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  &[data-product-count="3"] {
    grid-template-columns:
      repeat(
        3,
        minmax(255px, 310px)
      );

    justify-content: center;
  }

  /*
   * أربعة منتجات أو أكثر.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  &[data-product-count="4"] {
    grid-template-columns:
      repeat(
        var(--home-products-desktop),
        minmax(0, 1fr)
      );
  }


  /* بطاقة أقل طولاً وأكثر توازناً */

  html.storefront-v2
  .product-body {
    min-height: 205px;
    padding: 14px;
  }

  html.storefront-v2
  .product-media {
    aspect-ratio: 4 / 4.75;
  }

  html.storefront-v2
  .product-name {
    min-height: 40px;

    font-size: 14px;
  }

  html.storefront-v2
  .product-description {
    min-height: 34px;
    margin-bottom: 10px;

    font-size: 9px;
  }

  html.storefront-v2
  .product-price-area {
    min-height: 44px;
  }

  html.storefront-v2
  .product-actions {
    margin-top: 11px;
  }


  /*
   * المنتج بلا صورة لا يأخذ مساحة ضخمة.
   */

  html.storefront-v2
  .product-card.has-no-image
  .product-media {
    aspect-ratio: 4 / 3;
  }
}


/* =========================================================
   2. PROFESSIONAL IMAGE PLACEHOLDER
   ========================================================= */

html.storefront-v2
.product-card.has-no-image
.product-media {
  background:
    radial-gradient(
      circle at 25% 20%,
      rgba(8, 104, 245, 0.11),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      #eef5ff,
      #f9fbff
    );
}

html.storefront-v2
.product-card.has-no-image
.product-image-placeholder {
  position: relative;
}

html.storefront-v2
.product-card.has-no-image
.product-image-placeholder::before {
  position: absolute;
  inset: 15px;

  border:
    1px dashed
    rgba(8, 104, 245, 0.18);

  border-radius: 18px;

  content: "";
}

html.storefront-v2
.product-card.has-no-image
.product-image-placeholder-icon {
  position: relative;
  z-index: 2;

  width: 58px;
  height: 58px;

  border-radius: 18px;

  background:
    rgba(255, 255, 255, 0.94);
}

html.storefront-v2
.product-card.has-no-image
.product-image-placeholder > span:last-child {
  position: relative;
  z-index: 2;

  color: #718096;

  font-size: 8px;
  font-weight: 850;
}


/* =========================================================
   3. MOBILE — TWO PRODUCTS PER ROW
   ========================================================= */

@media (max-width: 700px) {

  /*
   * عندما يختار التاجر منتجين في الصف.
   */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .products-grid:not(.is-list-view) {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 9px;
  }


  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-card {
    display: flex;
    min-height: 0;

    flex-direction: column;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-media {
    height: auto;
    min-height: 0;

    aspect-ratio: 4 / 5;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-card.has-no-image
  .product-media {
    aspect-ratio: 4 / 3.5;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-body {
    min-height: 163px;
    padding: 9px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-name {
    min-height: 31px;
    margin-bottom: 4px;

    font-size: 10px;
    line-height: 1.45;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-category {
    margin-bottom: 3px;

    font-size: 6px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-description {
    display: none;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-price-area {
    display: block;

    min-height: 46px;
    margin-top: auto;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .current-price {
    font-size: 15px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .compare-price {
    margin-top: 2px;

    font-size: 6.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-saving {
    min-height: 19px;
    margin-top: 4px;
    padding: 3px 5px;

    font-size: 5.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-actions {
    margin-top: 7px;

    grid-template-columns: 1fr;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-buy-button {
    min-height: 36px;

    border-radius: 10px;

    font-size: 7.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-details-button {
    display: none;
  }

  /*
   * في الهاتف نحتفظ بالقلب فقط.
   * المعاينة السريعة موجودة عند فتح البطاقة.
   */

  html.storefront-v2
  .product-floating-button[
    data-action="quick-view"
  ] {
    display: none;
  }

  html.storefront-v2
  .product-floating-actions {
    top: 7px;
    left: 7px;
  }

  html.storefront-v2
  .product-floating-button {
    width: 30px;
    height: 30px;

    border-radius: 10px;

    font-size: 14px;
  }
}


/* =========================================================
   4. MOBILE — ONE PRODUCT PER ROW
   Compact horizontal professional card
   ========================================================= */

@media (max-width: 700px) {

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .products-grid:not(.is-list-view) {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-card {
    display: grid;

    min-height: 215px;

    grid-template-columns:
      minmax(130px, 42%)
      minmax(0, 1fr);
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-media {
    width: 100%;
    height: 100%;
    min-height: 215px;

    aspect-ratio: auto;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-card.has-no-image
  .product-media {
    min-height: 190px;

    aspect-ratio: auto;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-body {
    min-height: 215px;
    padding: 13px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-name {
    min-height: 35px;

    font-size: 12px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-description {
    display: -webkit-box;

    min-height: 32px;

    font-size: 8px;

    -webkit-line-clamp: 2;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .current-price {
    font-size: 18px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-actions {
    grid-template-columns:
      minmax(0, 1fr)
      38px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-buy-button {
    min-height: 39px;
  }

  html.storefront-v2[
    data-products-mobile="1"
  ]
  .product-details-button {
    display: inline-grid;

    width: 38px;
    height: 39px;
  }
}


/* =========================================================
   5. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 370px) {

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .products-grid:not(.is-list-view) {
    gap: 7px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-body {
    min-height: 157px;
    padding: 7px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-name {
    font-size: 9px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .current-price {
    font-size: 13.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-buy-button {
    min-height: 34px;

    font-size: 7px;
  }
}
/* =========================================================
   STOREFRONT V2.5
   Professional catalog final polish
   Desktop sizing • Compact mobile cards • Clear hierarchy
   ========================================================= */


/* =========================================================
   1. PRODUCTS SECTION FOUNDATION
   ========================================================= */

html.storefront-v2 #products {
  scroll-margin-top: 90px;
}

html.storefront-v2
#products .section-shell {
  position: relative;
  z-index: 2;
}

html.storefront-v2
#products .section-heading {
  max-width: 1000px;
  margin-inline: auto;
  margin-bottom: 24px;
}

html.storefront-v2
#products .section-heading-content {
  max-width: 760px;
}

html.storefront-v2
#products .section-title {
  font-size:
    clamp(32px, 3.2vw, 46px);

  line-height: 1.16;
}

html.storefront-v2
#products .section-description {
  font-size: 12px;
  line-height: 1.75;
}


/* =========================================================
   2. TOOLBAR
   ========================================================= */

html.storefront-v2
#products .products-toolbar {
  max-width: 1000px;
  margin-inline: auto;
  margin-bottom: 22px;
}


/* =========================================================
   3. DESKTOP SMART GRID
   ========================================================= */

@media (min-width: 701px) {

  /*
   * منتج واحد.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)[data-product-count="1"] {
    width: min(100%, 390px);
    margin-inline: auto;

    grid-template-columns:
      minmax(0, 1fr) !important;

    justify-content: center;
  }


  /*
   * منتجان.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)[data-product-count="2"] {
    width: min(100%, 790px);
    margin-inline: auto;

    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;

    gap: 20px !important;

    justify-content: center;
  }


  /*
   * ثلاثة منتجات.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)[data-product-count="3"] {
    width: min(100%, 1060px);
    margin-inline: auto;

    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      ) !important;

    gap: 19px !important;

    justify-content: center;
  }


  /*
   * أربعة منتجات أو أكثر.
   */

  html.storefront-v2
  .products-grid:not(.is-list-view)[data-product-count="4"] {
    width: 100%;

    grid-template-columns:
      repeat(
        var(--home-products-desktop),
        minmax(0, 1fr)
      ) !important;
  }


  /* البطاقة */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-card {
    width: 100%;
    height: 100%;

    border-radius: 22px;

    box-shadow:
      0 10px 30px
      rgba(16, 24, 40, 0.07);
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-card:hover {
    box-shadow:
      0 24px 52px
      rgba(8, 56, 122, 0.15);

    transform: translateY(-6px);
  }


  /* الصورة */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-media {
    aspect-ratio: 4 / 4.65 !important;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-card.has-no-image
  .product-media {
    aspect-ratio: 4 / 3.35 !important;
  }


  /* جسم البطاقة */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-body {
    min-height: 210px !important;
    padding: 17px !important;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-category {
    margin-bottom: 6px;

    font-size: 9px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-name {
    min-height: 43px;
    margin-bottom: 7px;

    font-size: 16px;
    line-height: 1.4;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-description {
    min-height: 35px;
    margin-bottom: 11px;

    font-size: 10px;
    line-height: 1.65;
  }


  /* السعر */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-price-area {
    min-height: 47px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .current-price {
    font-size: 24px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .compare-price {
    font-size: 10px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-saving {
    min-height: 28px;
    padding-inline: 9px;

    font-size: 8px;
  }


  /* الأزرار */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-actions {
    margin-top: 13px;

    grid-template-columns:
      minmax(0, 1fr)
      44px;

    gap: 9px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-buy-button {
    min-height: 46px;

    border-radius: 14px;

    font-size: 11px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  .product-details-button {
    width: 44px;
    height: 46px;

    border-radius: 13px;
  }
}


/* =========================================================
   4. MOBILE SECTION
   ========================================================= */

@media (max-width: 700px) {

  html.storefront-v2 #products {
    padding-top: 31px;
    padding-bottom: 42px;
  }

  html.storefront-v2
  #products .section-heading {
    margin-bottom: 16px;
  }

  html.storefront-v2
  #products .section-title {
    margin-top: 8px;

    font-size: 25px;
    line-height: 1.18;
  }

  html.storefront-v2
  #products .section-description {
    font-size: 9px;
    line-height: 1.65;
  }


  /* Toolbar */

  html.storefront-v2
  #products .products-toolbar {
    margin-bottom: 13px;
    padding: 9px;

    border-radius: 14px;
  }


  /* شبكة منتجين */

  html.storefront-v2
  .products-grid:not(.is-list-view) {
    align-items: stretch;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .products-grid:not(.is-list-view) {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;

    gap: 9px !important;
  }


  /* البطاقة */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-card {
    display: flex !important;

    width: 100%;
    min-width: 0;
    min-height: 0 !important;
    height: 100%;

    flex-direction: column;

    border-radius: 15px;
  }


  /* الصورة: أقصر من النسخة الحالية */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-media {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;

    aspect-ratio: 4 / 4.35 !important;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-image {
    object-position: center top;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-card.has-no-image
  .product-media {
    aspect-ratio: 4 / 3.45 !important;
  }


  /* Placeholder أصغر */

  html.storefront-v2
  .product-card.has-no-image
  .product-image-placeholder::before {
    inset: 9px;

    border-radius: 13px;
  }

  html.storefront-v2
  .product-card.has-no-image
  .product-image-placeholder-icon {
    width: 48px;
    height: 48px;

    border-radius: 15px;

    font-size: 18px;
  }


  /* إخفاء زر العين على الهاتف */

  html.storefront-v2
  .product-floating-actions
  .product-floating-button:nth-child(n + 2) {
    display: none !important;
  }

  html.storefront-v2
  .product-floating-actions {
    top: 7px;
    left: 7px;
  }

  html.storefront-v2
  .product-floating-button {
    width: 30px;
    height: 30px;

    border-radius: 9px;

    font-size: 14px;
  }


  /* الشارات */

  html.storefront-v2
  .product-badges {
    top: 7px;
    right: 7px;

    gap: 3px;
  }

  html.storefront-v2
  .product-badge {
    min-height: 21px;
    padding: 4px 6px;

    font-size: 6px;
  }


  /* جسم البطاقة */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-body {
    display: flex;

    min-height: 145px !important;
    padding: 9px !important;

    flex: 1;
    flex-direction: column;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-category {
    margin-bottom: 3px;

    font-size: 6px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-name {
    min-height: 31px;
    margin-bottom: 3px;

    font-size: 10px;
    line-height: 1.4;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-description {
    display: none !important;
  }


  /* السعر */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-price-area {
    display: block;

    min-height: 0 !important;
    margin-top: auto;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-prices {
    gap: 4px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .current-price {
    font-size: 15.5px;
    line-height: 1.1;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .compare-price {
    font-size: 6.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-saving {
    min-height: 19px;
    margin-top: 4px;
    padding: 3px 5px;

    font-size: 5.5px;
  }


  /* زر الطلب */

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-actions {
    margin-top: 7px;

    grid-template-columns: 1fr !important;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-buy-button {
    min-height: 36px;

    border-radius: 10px;

    font-size: 7.5px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-details-button {
    display: none !important;
  }
}


/* =========================================================
   5. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .products-grid:not(.is-list-view) {
    gap: 7px !important;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-body {
    min-height: 138px !important;
    padding: 7px !important;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-name {
    min-height: 28px;

    font-size: 9px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .current-price {
    font-size: 14px;
  }

  html.storefront-v2[
    data-products-mobile="2"
  ]
  .product-buy-button {
    min-height: 34px;

    font-size: 7px;
  }
}
/* =========================================================
   STOREFRONT V2.5
   Compact single-product mobile presentation
   ========================================================= */

@media (max-width: 700px) {

  /* مساحة كافية فوق شريط الهاتف السفلي */

  html.storefront-v2 #products {
    padding-bottom: 100px;
  }


  /* منتج واحد: بطاقة مركزة لكن غير ضخمة */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child {
    width: min(88%, 390px);
    margin-inline: auto;
  }


  /* تقليل طول الصورة */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-media {
    height: 420px;
    min-height: 0;

    aspect-ratio: auto;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-image {
    object-fit: cover;
    object-position: center 14%;
  }


  /* ضغط الجزء النصي */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-body {
    min-height: 190px;
    padding: 14px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-category {
    margin-bottom: 4px;

    font-size: 7px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-name {
    min-height: auto;
    margin-bottom: 8px;

    font-size: 15px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-description {
    display: -webkit-box;

    min-height: 0;
    margin-bottom: 12px;

    font-size: 8.5px;
    line-height: 1.65;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }


  /* السعر والتوفير في صف واحد */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-price-area {
    display: flex;

    min-height: 42px;

    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .current-price {
    font-size: 23px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .compare-price {
    font-size: 7.5px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-saving {
    margin-top: 0;

    font-size: 6.5px;
  }


  /* زر الطلب */

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-actions {
    margin-top: 12px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-buy-button {
    min-height: 45px;

    font-size: 10px;
  }


  /* شريط التنقل لا يغطي زر الطلب */

  html.storefront-v2 .mobile-bottom-nav {
    z-index: 100;
  }
}


/* الهواتف القصيرة أو الصغيرة */

@media (max-width: 390px) {

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child {
    width: 92%;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-media {
    height: 360px;
  }

  html.storefront-v2
  .products-grid:not(.is-list-view)
  > .product-card:only-child
  .product-body {
    min-height: 180px;
    padding: 12px;
  }
}
