/*
 * Homepage-only layout recovery. Every selector begins at the static
 * storefront root so catalog, scroller, and product-detail components stay
 * under their own CS-Cart/UniTheme2 styles.
 */
:root body.theme-safqa .sq-signature-storefront {
    --sq-home-ink: #102033;
    --sq-home-muted: #64748b;
    --sq-home-line: #e2e8f0;
    --sq-home-surface: #ffffff;
    --sq-home-subtle: #f8fafc;
    --sq-home-gold: #f59e0b;
    --sq-home-gold-deep: #d97706;
    --sq-home-blue: #007eb0;
    width: min(100%, 1560px);
    margin: 0 auto 28px;
    padding: 0 16px;
    color: var(--sq-home-ink);
    direction: rtl;
    font-family: Cairo, "Noto Sans Arabic", sans-serif;
    box-sizing: border-box;
}

:root body.theme-safqa .sq-signature-storefront *,
:root body.theme-safqa .sq-signature-storefront *::before,
:root body.theme-safqa .sq-signature-storefront *::after { box-sizing: border-box; }

:root body.theme-safqa .sq-signature-storefront img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Compact category discovery row. */
:root body.theme-safqa .sq-story-bubbles-row {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    margin: 24px 0 32px;
}

:root body.theme-safqa .sq-story-bubble-card {
    min-width: 0;
    color: var(--sq-home-ink);
    text-align: center;
    text-decoration: none;
}

:root body.theme-safqa .sq-bubble-avatar-wrap {
    position: relative;
    width: min(100%, 116px);
    aspect-ratio: 1;
    margin: 0 auto 9px;
    padding: 3px;
    border: 2px solid #fbbf24;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgb(15 23 42 / 8%);
    transition: transform .18s ease, box-shadow .18s ease;
}

:root body.theme-safqa .sq-story-bubble-card:hover .sq-bubble-avatar-wrap {
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgb(15 23 42 / 14%);
}

:root body.theme-safqa .sq-bubble-avatar-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    background: #f8fafc;
}

:root body.theme-safqa .sq-bubble-avatar-inner img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
:root body.theme-safqa .sq-bubble-tag { position: absolute; right: 50%; bottom: -7px; transform: translateX(50%); padding: 2px 7px; border-radius: 999px; background: #102033; color: #fff; font-size: 10px; font-weight: 800; white-space: nowrap; }
:root body.theme-safqa .sq-bubble-title { display: block; overflow: hidden; color: var(--sq-home-ink); font-size: 12px; font-weight: 800; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }

/* Storefront cards and product rails. */
:root body.theme-safqa .sq-cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 34px; }
:root body.theme-safqa .sq-card,
:root body.theme-safqa .sq-curated-section,
:root body.theme-safqa .sq-micro-wall-box,
:root body.theme-safqa .sq-bundle-box { min-width: 0; border: 1px solid var(--sq-home-line); border-radius: 14px; background: var(--sq-home-surface); box-shadow: 0 3px 12px rgb(15 23 42 / 5%); }
:root body.theme-safqa .sq-card { display: flex; flex-direction: column; padding: 18px; overflow: hidden; }
:root body.theme-safqa .sq-card-header { margin-bottom: 12px; }
:root body.theme-safqa .sq-card-title { margin: 0; color: var(--sq-home-ink); font-size: 18px; line-height: 1.35; }
:root body.theme-safqa .sq-card-subtitle { margin: 4px 0 0; color: var(--sq-home-muted); font-size: 12px; }
:root body.theme-safqa .sq-quad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
:root body.theme-safqa .sq-quad-item { display: block; min-width: 0; padding: 8px; border-radius: 9px; background: var(--sq-home-subtle); color: inherit; text-align: center; text-decoration: none; }
:root body.theme-safqa .sq-quad-img { width: 100%; height: 112px; object-fit: contain; }
:root body.theme-safqa .sq-quad-label,
:root body.theme-safqa .sq-quad-price { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body.theme-safqa .sq-quad-label { margin-top: 5px; color: var(--sq-home-ink); font-size: 11px; font-weight: 700; }
:root body.theme-safqa .sq-quad-price { margin-top: 2px; color: var(--sq-home-gold-deep); font-size: 11px; font-weight: 800; }
:root body.theme-safqa .sq-single-hero-card { position: relative; display: block; height: 188px; margin-bottom: 10px; border-radius: 10px; background: var(--sq-home-subtle); overflow: hidden; }
:root body.theme-safqa .sq-single-hero-img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
:root body.theme-safqa .sq-deal-tag { position: absolute; top: 9px; right: 9px; z-index: 1; padding: 3px 7px; border-radius: 5px; background: #be123c; color: #fff; font-size: 10px; font-weight: 800; }
:root body.theme-safqa .sq-card-link,
:root body.theme-safqa .sq-curated-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--sq-home-blue); font-size: 12px; font-weight: 800; text-decoration: none; }

:root body.theme-safqa .sq-section-header,
:root body.theme-safqa .sq-curated-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
:root body.theme-safqa .sq-section-header { padding: 16px 18px; border-radius: 12px; background: #102033; color: #fff; }
:root body.theme-safqa .sq-section-title-wrap { display: flex; align-items: center; gap: 10px; }
:root body.theme-safqa .sq-section-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; background: #fbbf24; color: #102033; }
:root body.theme-safqa .sq-section-title { margin: 0; font-size: 18px; }
:root body.theme-safqa .sq-countdown-box { display: flex; align-items: center; gap: 8px; font-size: 12px; }
:root body.theme-safqa .sq-timer-pill { padding: 4px 8px; border-radius: 6px; background: #fff; color: #102033; font-weight: 900; }
:root body.theme-safqa .sq-scroller-wrap { margin: 0 0 34px; }
:root body.theme-safqa .sq-scroller { display: flex; gap: 14px; overflow-x: auto; padding: 3px 2px 12px; scroll-snap-type: x mandatory; }
:root body.theme-safqa .sq-product-card { position: relative; display: flex; flex: 0 0 224px; flex-direction: column; min-width: 0; min-height: 390px; padding: 13px; border: 1px solid var(--sq-home-line); border-radius: 12px; background: #fff; scroll-snap-align: start; }
:root body.theme-safqa .sq-product-badge { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 7px; border-radius: 5px; background: #be123c; color: #fff; font-size: 10px; font-weight: 800; }
:root body.theme-safqa .sq-product-thumb { width: 100%; height: 174px; object-fit: contain; margin-bottom: 9px; }
:root body.theme-safqa .sq-product-brand { color: var(--sq-home-muted); font-size: 10px; font-weight: 700; }
:root body.theme-safqa .sq-product-name { display: -webkit-box; min-height: 39px; overflow: hidden; color: var(--sq-home-ink); font-size: 12px; font-weight: 800; line-height: 1.55; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
:root body.theme-safqa .sq-product-rating { margin: 6px 0; color: #f59e0b; font-size: 10px; }
:root body.theme-safqa .sq-product-rating .count { color: var(--sq-home-muted); }
:root body.theme-safqa .sq-product-pricing { display: flex; align-items: baseline; gap: 5px; }
:root body.theme-safqa .sq-price-main { color: var(--sq-home-ink); font-size: 19px; font-weight: 900; }
:root body.theme-safqa .sq-price-currency,
:root body.theme-safqa .sq-price-old { color: var(--sq-home-muted); font-size: 10px; }
:root body.theme-safqa .sq-price-old { text-decoration: line-through; }
:root body.theme-safqa .sq-progress-bar { height: 5px; margin: 8px 0 4px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
:root body.theme-safqa .sq-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #ea580c); }
:root body.theme-safqa .sq-stock-alert { color: #b45309; font-size: 10px; font-weight: 700; }
:root body.theme-safqa .sq-btn-quick-add,
:root body.theme-safqa .sq-p-btn,
:root body.theme-safqa .sq-bundle-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; margin-top: auto; border-radius: 8px; background: #ffd814; color: #102033; font-size: 11px; font-weight: 900; text-decoration: none; }

/* Featured product, curated rails, dense discovery grid, and bundle. */
:root body.theme-safqa .sq-curated-section { margin: 0 0 28px; padding: 18px; }
:root body.theme-safqa .sq-curated-head h2 { margin: 0; color: var(--sq-home-ink); font-size: 19px; }
:root body.theme-safqa .sq-curated-head small { display: block; margin-top: 3px; color: var(--sq-home-muted); font-size: 11px; font-weight: 600; }
:root body.theme-safqa .sq-spotlight-wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; }
:root body.theme-safqa .sq-spotlight-main-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); overflow: hidden; border: 1px solid var(--sq-home-line); border-radius: 12px; }
:root body.theme-safqa .sq-spotlight-img-box { min-height: 300px; padding: 18px; background: var(--sq-home-subtle); }
:root body.theme-safqa .sq-spotlight-img-box img { width: 100%; height: 100%; object-fit: contain; }
:root body.theme-safqa .sq-spotlight-info { padding: 22px; }
:root body.theme-safqa .sq-spotlight-info h4 { margin: 0; color: var(--sq-home-gold-deep); font-size: 11px; }
:root body.theme-safqa .sq-spotlight-info h3 { margin: 8px 0 12px; font-size: 20px; line-height: 1.4; }
:root body.theme-safqa .sq-spotlight-features { margin: 0 0 14px; padding: 0; list-style: none; color: var(--sq-home-muted); font-size: 12px; line-height: 1.8; }
:root body.theme-safqa .sq-spotlight-features i { color: #059669; }
:root body.theme-safqa .sq-spotlight-price { color: var(--sq-home-ink); font-size: 24px; font-weight: 900; }
:root body.theme-safqa .sq-spotlight-cta { display: flex; justify-content: center; margin-top: 12px; padding: 10px; border-radius: 8px; background: #ffca28; color: #102033; font-weight: 900; text-decoration: none; }
:root body.theme-safqa .sq-spotlight-side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
:root body.theme-safqa .sq-spotlight-mini-card { min-width: 0; padding: 10px; border: 1px solid var(--sq-home-line); border-radius: 10px; color: var(--sq-home-ink); text-decoration: none; }
:root body.theme-safqa .sq-spotlight-mini-thumb { height: 112px; }
:root body.theme-safqa .sq-spotlight-mini-thumb img { width: 100%; height: 100%; object-fit: contain; }
:root body.theme-safqa .sq-spotlight-mini-name { display: -webkit-box; height: 36px; overflow: hidden; font-size: 11px; font-weight: 800; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
:root body.theme-safqa .sq-spotlight-mini-price { margin-top: 5px; color: var(--sq-home-gold-deep); font-size: 12px; font-weight: 900; }
:root body.theme-safqa .sq-curated-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
:root body.theme-safqa .sq-p-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--sq-home-line); border-radius: 10px; overflow: hidden; }
:root body.theme-safqa .sq-p-img { height: 176px; padding: 10px; background: var(--sq-home-subtle); }
:root body.theme-safqa .sq-p-img img { width: 100%; height: 100%; object-fit: contain; }
:root body.theme-safqa .sq-p-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 11px; }
:root body.theme-safqa .sq-p-name { display: -webkit-box; min-height: 39px; overflow: hidden; color: var(--sq-home-ink); font-size: 11px; font-weight: 800; line-height: 1.55; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
:root body.theme-safqa .sq-stars { color: #f59e0b; font-size: 10px; }
:root body.theme-safqa .sq-stars span { color: var(--sq-home-muted); }
:root body.theme-safqa .sq-p-price { color: var(--sq-home-ink); font-size: 16px; font-weight: 900; }
:root body.theme-safqa .sq-p-price sup { color: var(--sq-home-muted); font-size: 9px; }
:root body.theme-safqa .sq-micro-wall-box { padding: 14px; }
:root body.theme-safqa .sq-micro-grid-12 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
:root body.theme-safqa .sq-micro-item-card { min-width: 0; padding: 9px; border: 1px solid var(--sq-home-line); border-radius: 9px; color: var(--sq-home-ink); text-decoration: none; }
:root body.theme-safqa .sq-micro-thumb { height: 106px; }
:root body.theme-safqa .sq-micro-thumb img { width: 100%; height: 100%; object-fit: contain; }
:root body.theme-safqa .sq-micro-title { display: -webkit-box; height: 33px; overflow: hidden; font-size: 10px; font-weight: 800; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
:root body.theme-safqa .sq-micro-price { margin-top: 4px; color: var(--sq-home-gold-deep); font-size: 11px; font-weight: 900; }
:root body.theme-safqa .sq-micro-btn { margin-top: 7px; padding: 5px; border-radius: 6px; background: #f1f5f9; color: var(--sq-home-blue); font-size: 10px; font-weight: 800; text-align: center; }
:root body.theme-safqa .sq-bundle-box { padding: 18px; }
:root body.theme-safqa .sq-bundle-items-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: center; }
:root body.theme-safqa .sq-bundle-product-group { display: flex; align-items: center; justify-content: space-around; gap: 12px; }
:root body.theme-safqa .sq-bundle-single-item { width: min(100%, 170px); color: inherit; text-align: center; }
:root body.theme-safqa .sq-bundle-single-item img { width: 100%; height: 120px; object-fit: contain; }
:root body.theme-safqa .sq-bundle-single-item .b-title { min-height: 35px; font-size: 11px; font-weight: 800; }
:root body.theme-safqa .sq-bundle-single-item .b-price { margin-top: 4px; color: var(--sq-home-gold-deep); font-size: 13px; font-weight: 900; }
:root body.theme-safqa .sq-bundle-plus { color: var(--sq-home-muted); font-size: 28px; font-weight: 400; }
:root body.theme-safqa .sq-bundle-checkout-panel { padding: 18px; border-radius: 10px; background: #fffbeb; text-align: center; }
:root body.theme-safqa .bundle-badge { display: block; margin-bottom: 8px; color: #92400e; font-size: 11px; font-weight: 800; }
:root body.theme-safqa .sq-bundle-total-price { color: var(--sq-home-ink); font-size: 24px; font-weight: 900; }
:root body.theme-safqa .sq-bundle-savings { margin: 3px 0 12px; color: var(--sq-home-muted); font-size: 11px; }

@media (max-width: 1199px) {
    :root body.theme-safqa .sq-story-bubbles-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    :root body.theme-safqa .sq-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root body.theme-safqa .sq-curated-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    :root body.theme-safqa .sq-micro-grid-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    :root body.theme-safqa .sq-signature-storefront { padding: 0 10px; }
    :root body.theme-safqa .sq-story-bubbles-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
    :root body.theme-safqa .sq-bubble-avatar-wrap { max-width: 78px; }
    :root body.theme-safqa .sq-bubble-title { font-size: 10px; }
    :root body.theme-safqa .sq-cards-grid,
    :root body.theme-safqa .sq-spotlight-wrap,
    :root body.theme-safqa .sq-bundle-items-row { grid-template-columns: 1fr; }
    :root body.theme-safqa .sq-spotlight-main-card { grid-template-columns: 1fr; }
    :root body.theme-safqa .sq-spotlight-img-box { min-height: 230px; }
    :root body.theme-safqa .sq-curated-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :root body.theme-safqa .sq-micro-grid-12 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    :root body.theme-safqa .sq-section-header,
    :root body.theme-safqa .sq-curated-head { align-items: flex-start; flex-direction: column; }
    :root body.theme-safqa .sq-bundle-product-group { flex-wrap: wrap; }
    :root body.theme-safqa .sq-bundle-plus { display: none; }
}
