/* Desktop-only storefront layer. The mobile PWA remains untouched. */
.desktop-hero-logo { display: none; }
.desktop-main-links,
.desktop-search,
.desktop-nav-cart,
.desktop-product-showcase,
.desktop-filter-panel,
.desktop-catalog-heading,
.desktop-card-add,
.desktop-trust-strip { display: none; }
.desktop-store-footer { display: none; }
.desktop-catalog-layout,
.desktop-product-wrap { display: contents; }

@media (min-width: 1025px) {
  body { background: #fff; letter-spacing: 0; }

  /* Store page */
  .store-top-bar {
    min-height: 34px;
    padding: 8px 28px;
    background: var(--theme-accent);
    color: var(--theme-on-accent);
  }
  .store-top-bar span,
  .store-top-bar span[style] {
    color: inherit !important;
    font-size: 12px !important;
    font-weight: 500;
    letter-spacing: 0 !important;
    text-transform: none;
  }
  .store-main-nav {
    height: 82px;
    padding: 0 clamp(28px, 5vw, 88px);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #ece9e4;
    backdrop-filter: blur(14px);
  }
  .store-nav-logo { gap: 12px; }
  .store-nav-logo-img,
  .store-nav-logo-fallback {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid #e5e1da;
  }
  .store-nav-name { color: #171717; font-size: 16px; font-weight: 600; letter-spacing: 0; }
  .store-nav-loc { color: #777; font-size: 11px; }
  .store-lang-sw { border: 1px solid #e5e1da; border-radius: 0; padding: 3px; }
  .store-lang-btn { border-radius: 0; min-width: 34px; }
  .store-nav-wa { border-radius: 0; background: #171717; color: #fff; padding: 10px 16px; }

  .rt-promo-banner { display: none !important; }
  .main-content {
    width: min(1440px, calc(100% - 64px)) !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 0 84px !important;
    background: #fff !important;
  }
  .welcome-header,
  body.has-store-background .welcome-header {
    min-height: 280px;
    margin: 48px 0 52px;
    padding: 44px clamp(36px, 6vw, 100px);
    background: var(--theme-soft) !important;
    border: 1px solid var(--theme-line) !important;
    border-radius: 26px !important;
    box-shadow: none !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "actions content logo";
    column-gap: clamp(24px, 4vw, 58px);
    align-items: center;
    text-align: start;
    overflow: hidden;
  }
  [dir="ltr"] .welcome-header { grid-template-areas: "logo content actions"; }
  .welcome-header::before,
  .welcome-header::after { display: none !important; }
  .desktop-hero-logo {
    grid-area: logo;
    display: flex;
    width: clamp(92px, 9vw, 132px);
    height: clamp(92px, 9vw, 132px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
    color: var(--theme-ink);
    font-size: 34px;
    font-weight: 700;
  }
  .desktop-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
  .welcome-text { grid-area: content; max-width: 720px; }
  .welcome-text h1 {
    color: var(--theme-ink) !important;
    font-size: clamp(32px, 3.2vw, 52px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
  }
  .welcome-text p {
    color: var(--theme-muted) !important;
    max-width: 620px;
    margin: 14px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.9 !important;
    text-shadow: none !important;
  }
  .header-btns { grid-area: actions; margin-top: 0; }
  .btn-premium { border-radius: 0 !important; padding: 12px 22px !important; background: #171717 !important; color: #fff !important; }

  #announcementBar {
    margin: 0 0 36px !important;
    border: 1px solid var(--theme-line) !important;
    border-radius: 0 !important;
    background: var(--theme-soft) !important;
    color: var(--theme-ink) !important;
    box-shadow: none !important;
  }
  .section-title {
    margin: 0 0 22px !important;
    padding: 0 !important;
    color: #171717 !important;
    font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
  }
  .category-bar {
    justify-content: center;
    overflow: visible !important;
    margin: 0 0 36px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-bottom: 1px solid #e8e5df;
  }
  .cat-btn {
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #777 !important;
    padding: 11px 18px !important;
    font-size: 13px !important;
  }
  .cat-btn.active { border-bottom-color: #171717 !important; color: #171717 !important; }
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 28px 18px !important;
    padding: 0 !important;
    margin: 0 0 72px !important;
  }
  .product-card {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .product-card .img-container {
    aspect-ratio: 4 / 5 !important;
    border-radius: 0 !important;
    background: var(--theme-soft) !important;
  }
  .product-card.fit-cover .img-container { aspect-ratio: 4 / 5 !important; }
  .product-card:hover { transform: none !important; background: transparent !important; }
  .product-card:hover .img-container img { transform: scale(1.025) !important; }
  .p-info { padding: 13px 0 0 !important; text-align: start; }
  .p-info .p-name { color: #202020 !important; font-size: 14px !important; font-weight: 500 !important; }
  .p-info .p-meta,
  .price-sale { color: #625e57 !important; font-size: 13px !important; }
  .badge-soldout { border-radius: 0 !important; }
  .quick-actions { display: none !important; }
  .about-box { max-width: 760px; margin: 0 auto 80px !important; border-radius: 0 !important; box-shadow: none !important; }
  .quick-actions-fixed {
    width: auto !important;
    left: 28px !important;
    bottom: 28px !important;
    padding: 8px !important;
    gap: 4px !important;
    border: 1px solid #e5e1da !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .10) !important;
  }
  .action-item-fixed { border: 0 !important; border-radius: 0 !important; }

  @media (max-width: 1220px) {
    .welcome-header { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo content" "actions actions"; }
    [dir="ltr"] .welcome-header { grid-template-areas: "logo content" "actions actions"; }
    .header-btns { margin-top: 24px; }
  }

  /* Product page */
  .header { padding: 15px clamp(28px, 5vw, 88px); background: rgba(255, 255, 255, .96); }
  .header-inner { max-width: 1440px; }
  .header-logo { width: 46px; height: 46px; border-radius: 50%; background: #f5f3ef; color: #171717; }
  .header-name { font-size: 16px; font-weight: 700; }
  .back-btn { border-radius: 0; background: #171717; border-color: #171717; color: #fff; }
  .product-main {
    max-width: 1320px;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: clamp(44px, 6vw, 110px);
    padding: 70px 32px 58px;
  }
  .product-image-wrap { aspect-ratio: 4 / 5; border-radius: 0; background: #f5f3ef; box-shadow: none; }
  .product-image-wrap img { background: #f5f3ef; }
  .gallery-thumb { border-radius: 0; width: 84px; height: 84px; flex-basis: 84px; }
  .gallery-thumb img { border-radius: 0; }
  .product-info { padding-top: 18px; gap: 22px; }
  .product-category { color: #777; letter-spacing: 1px; }
  .product-name { font-size: clamp(32px, 3vw, 46px); font-weight: 700; line-height: 1.2; }
  .product-price-wrap { padding: 18px 0; border-color: #e8e5df; }
  .product-price { font-size: 30px; font-weight: 700; }
  .product-desc { font-size: 15px; color: #625e57; }
  .btn-primary, .btn-secondary { border-radius: 0; min-height: 52px; }
  .btn-primary { background: #171717; }
  .btn-secondary { border-color: #171717; color: #171717; }
  .share-section { border-top-color: #e8e5df; }
  .store-card, .related { max-width: 1320px; }
  .store-card, .related-card, .related-img { border-radius: 0; box-shadow: none; }
}

/* Desktop catalog layout: matches the approved reference composition. */
@media (min-width: 1025px) {
  body.has-store-background,
  body.has-store-background .main-content { background: #fff !important; }
  .store-top-bar,
  .sidebar,
  .rt-promo-banner,
  .welcome-header,
  #announcementBar,
  .category-bar,
  .quick-actions,
  .quick-actions-fixed,
  .store-nav-wa { display: none !important; }

  .store-main-nav {
    position: sticky;
    top: 0;
    z-index: 3000;
    height: 68px;
    max-width: none;
    padding: 0 clamp(24px, 4vw, 72px);
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid #e9e9e9;
    box-shadow: none;
  }
  .store-nav-logo { min-width: 166px; }
  .store-nav-logo-img,
  .store-nav-logo-fallback { width: 34px; height: 34px; border-radius: 7px; }
  .store-nav-name { font-size: 14px; font-weight: 750; }
  .store-nav-loc { display: none; }
  .desktop-main-links { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 1.6vw, 28px); flex: 1; }
  .desktop-nav-category {
    appearance: none;
    border: 0;
    background: transparent;
    color: #222;
    cursor: pointer;
    font: 600 11px/1 'IBM Plex Sans Arabic', sans-serif;
    padding: 8px 0;
    white-space: nowrap;
  }
  .desktop-nav-category:hover,
  .desktop-nav-category.active { color: var(--theme-accent); }
  .store-nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 360px; }
  .desktop-search {
    display: flex;
    align-items: center;
    gap: 7px;
    width: clamp(150px, 16vw, 250px);
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    color: #555;
  }
  .desktop-search i { width: 16px; height: 16px; }
  .desktop-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #1d1d1d; font: 12px 'IBM Plex Sans Arabic', sans-serif; }
  .desktop-search input::placeholder { color: #aaa; }
  .store-lang-sw { border: 0; padding: 0; }
  .store-lang-btn { min-width: 28px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: #444; font-size: 10px; }
  .store-lang-btn.active { border-bottom-color: #151515; color: #151515; }
  .desktop-nav-cart {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 0;
    border-radius: 5px;
    background: #151515;
    color: #fff;
    cursor: pointer;
    font: 600 11px 'IBM Plex Sans Arabic', sans-serif;
  }
  .desktop-nav-cart i { width: 15px; height: 15px; }
  .desktop-nav-cart b { display: inline-grid; place-items: center; min-width: 17px; height: 17px; border-radius: 50%; background: var(--theme-accent); color: #fff; font-size: 9px; }

  .main-content { width: min(1280px, calc(100% - 48px)) !important; max-width: 1280px !important; padding: 0 0 48px !important; }
  .desktop-product-showcase { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); gap: 4px; height: 178px; margin: 18px 0 38px; overflow: hidden; border-radius: 4px; background: #161616; }
  .desktop-showcase-item { position: relative; display: block; min-width: 0; overflow: hidden; color: #fff; background: #1b1b1b; }
  .desktop-showcase-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
  .desktop-showcase-item:hover img { transform: scale(1.035); }
  .desktop-showcase-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .24); }
  .desktop-showcase-featured .desktop-showcase-shade { background: rgba(0, 0, 0, .42); }
  .desktop-showcase-copy { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; }
  .desktop-showcase-copy small { margin-bottom: 6px; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
  .desktop-showcase-copy strong { max-width: 90%; font-size: clamp(16px, 1.8vw, 25px); font-weight: 700; line-height: 1.3; }

  .desktop-catalog-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr); grid-template-areas: 'filters results'; gap: 30px; align-items: start; }
  .desktop-filter-panel { grid-area: filters; position: sticky; top: 91px; display: block; overflow: hidden; border: 1px solid #e6e6e6; border-radius: 10px; background: #fff; box-shadow: 0 10px 22px rgba(15, 23, 42, .05); }
  .desktop-filter-group { padding: 15px 14px; border-bottom: 1px solid #ececec; }
  .desktop-filter-group:last-child { border-bottom: 0; }
  .desktop-filter-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #202020; font-size: 12px; font-weight: 750; }
  .desktop-filter-option { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 6px 0; color: #626262; cursor: pointer; text-align: inherit; font: 11px 'IBM Plex Sans Arabic', sans-serif; }
  .desktop-filter-option:hover,
  .desktop-filter-option.active { color: var(--theme-accent); font-weight: 700; }
  .desktop-filter-option b { font-size: 10px; font-weight: 500; color: #a0a0a0; }
  .desktop-check-option { display: flex; align-items: center; gap: 7px; color: #626262; cursor: pointer; font-size: 11px; }
  .desktop-check-option input { accent-color: var(--theme-accent); }
  .desktop-price-range { width: 100%; accent-color: var(--theme-accent); }
  .desktop-price-values { display: flex; justify-content: space-between; margin-top: 5px; color: #818181; font-size: 10px; direction: ltr; }
  .desktop-price-values strong { color: #3f3f3f; font-weight: 600; }

  .desktop-catalog-results { grid-area: results; min-width: 0; }
  .desktop-catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
  .desktop-kicker { margin-bottom: 4px; color: #909090; font-size: 10px; }
  .desktop-catalog-heading h2 { margin: 0; color: #181818; font-size: 21px; font-weight: 750; }
  #desktopResultsCount { color: #898989; font-size: 11px; white-space: nowrap; }
  .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 15px !important; margin: 0 !important; padding: 0 !important; }
  .desktop-product-wrap { display: block; position: relative; min-width: 0; padding-bottom: 37px; }
  .desktop-product-wrap .product-card { height: 100%; overflow: hidden; border: 1px solid #e7e7e7 !important; border-radius: 8px !important; background: #fff !important; box-shadow: none !important; }
  .desktop-product-wrap .product-card:hover { transform: translateY(-2px) !important; box-shadow: 0 12px 24px rgba(15, 23, 42, .08) !important; }
  .desktop-product-wrap .img-container { aspect-ratio: 1 / 1 !important; border-radius: 0 !important; background: #f7f7f6 !important; }
  .desktop-product-wrap .p-info { padding: 11px 11px 7px !important; text-align: center; }
  .desktop-product-wrap .p-info .p-name { min-height: 33px; color: #222 !important; font-size: 12px !important; font-weight: 650 !important; line-height: 1.45; }
  .desktop-product-wrap .p-info .p-meta,
  .desktop-product-wrap .price-sale { margin-top: 4px; color: #555 !important; font-size: 11px !important; }
  .desktop-product-wrap .p-sku { display: none; }
  .desktop-card-add { display: block; position: absolute; right: 11px; bottom: 7px; left: 11px; z-index: 2; height: 27px; border: 0; border-radius: 4px; background: #181818; color: #fff; cursor: pointer; font: 650 10px 'IBM Plex Sans Arabic', sans-serif; transition: background .2s ease, transform .2s ease; }
  .desktop-card-add:hover,
  .desktop-card-add.added { background: var(--theme-accent); transform: translateY(-1px); }
  .desktop-trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 32px; padding: 15px 20px; border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; }
  .desktop-trust-strip div { display: flex; align-items: center; justify-content: center; gap: 8px; color: #4d4d4d; font-size: 11px; }
  .desktop-trust-strip div + div { border-inline-start: 1px solid #e5e5e5; }
  .desktop-trust-strip i { width: 17px; height: 17px; color: #252525; }
  .about-box { display: none !important; }
}

@media (min-width: 1025px) and (max-width: 1180px) {
  .desktop-main-links { gap: 12px; }
  .desktop-main-links .desktop-nav-category:nth-child(n+5) { display: none; }
  .store-nav-actions { min-width: 290px; }
  .desktop-search { width: 150px; }
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Approved compact proportions for the actual desktop storefront. */
@media (min-width: 1025px) {
  .store-main-nav { height: 52px; padding: 0 clamp(26px, 4vw, 58px); }
  .store-nav-logo { min-width: 145px; }
  .store-nav-logo-img,
  .store-nav-logo-fallback { width: 29px; height: 29px; border-radius: 6px; }
  .store-nav-name { font-size: 11px; }
  .desktop-main-links { gap: clamp(12px, 1.5vw, 22px); }
  .desktop-nav-category { font-size: 9px; }
  .store-nav-actions { min-width: 320px; gap: 8px; }
  .desktop-search { width: clamp(145px, 15vw, 225px); padding: 6px 9px; }
  .desktop-search input { font-size: 10px; }
  .store-lang-btn { min-width: 24px; font-size: 9px; }
  .desktop-nav-cart { padding: 7px 10px; font-size: 10px; }

  .main-content { width: min(1280px, calc(100% - 52px)) !important; padding-bottom: 34px !important; }
  .desktop-product-showcase { height: 108px; margin: 0 0 22px; border-radius: 0; }
  .desktop-showcase-copy small { margin-bottom: 4px; font-size: 8px; }
  .desktop-showcase-copy strong { font-size: clamp(13px, 1.3vw, 18px); }

  .desktop-catalog-layout { grid-template-columns: 184px minmax(0, 1fr); gap: 28px; }
  .desktop-filter-panel { top: 68px; border-radius: 8px; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
  .desktop-filter-group { padding: 12px 13px; }
  .desktop-filter-title { margin-bottom: 7px; font-size: 11px; }
  .desktop-filter-option { padding: 4px 0; font-size: 10px; }
  .desktop-filter-option b { font-size: 9px; }
  .desktop-check-option { font-size: 10px; }
  .desktop-price-values { font-size: 9px; }
  .desktop-catalog-heading { margin-bottom: 16px; }
  .desktop-kicker { display: none; }
  .desktop-catalog-heading h2 { font-size: 16px; }
  #desktopResultsCount { font-size: 10px; }

  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
  .desktop-product-wrap { padding-bottom: 33px; }
  .desktop-product-wrap .product-card { min-height: 250px; border-radius: 8px !important; }
  .desktop-product-wrap .img-container { aspect-ratio: auto !important; height: 138px; border-radius: 6px 6px 0 0 !important; }
  .desktop-product-wrap .p-info { padding: 8px 9px 5px !important; }
  .desktop-product-wrap .p-info .p-name { min-height: 30px; font-size: 11px !important; }
  .desktop-product-wrap .p-info .p-meta,
  .desktop-product-wrap .price-sale { margin-top: 3px; font-size: 10px !important; }
  .desktop-card-add { right: 9px; bottom: 6px; left: 9px; height: 24px; font-size: 9px; }
  .desktop-trust-strip { margin-top: 25px; padding: 12px 16px; }
  .desktop-trust-strip div { font-size: 10px; }

  .desktop-store-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 16px 0 0; border-top: 1px solid #e5e7eb; }
  .desktop-store-footer-copy strong,
  .desktop-store-footer-copy span { display: block; }
  .desktop-store-footer-copy strong { color: #1f2937; font-size: 11px; }
  .desktop-store-footer-copy span { margin-top: 3px; color: #94a3b8; font-size: 10px; }
  .desktop-store-socials { display: flex; gap: 7px; direction: ltr; }
  .desktop-store-socials a { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #e5e7eb; border-radius: 50%; color: #475569; transition: .2s; }
  .desktop-store-socials a:hover { color: var(--theme-accent); border-color: var(--theme-accent); transform: translateY(-2px); }
  .desktop-store-socials i { width: 14px; height: 14px; }
}

@media (min-width: 1400px) {
  .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
