/* ============================================================
   store_categories — "تسوق حسب الفئة" section of the instrument
   store landing. Three cards: photo + category name + view-products
   pill. A card whose URL is empty renders its button inert with a
   "coming soon" chip (target pages ship later).
   Light / Dark / wallpaper / RTL aware. Palette via CSS vars only.
   ============================================================ */

.store-categories-section {
    position: relative;
    padding: 32px 0;
}

.store-categories__heading {
    margin: 0 0 28px;
    text-align: center;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.4vw, 2.1rem);
    color: var(--dark);
}
body.dark-mode .store-categories__heading { color: #ffffff; }
body.home-wallpaper-active:not(.dark-mode) .store-categories__heading {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(20, 0, 40, 0.35);
}

.store-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 28px);
}

/* ---- Card ---- */
.sc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: clamp(18px, 2vw, 28px);
    border: 1.5px solid var(--primary);
    border-radius: 24px;
    background: #fbdefcf8;
    box-shadow: 0 16px 36px rgba(62, 0, 95, 0.10);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}
.sc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(62, 0, 95, 0.16);
}
body.dark-mode .sc-card,
body.home-wallpaper-active:not(.dark-mode) .sc-card {
    background: rgba(31, 15, 51, 0.45);
    border-color: rgba(180, 143, 255, 0.65);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.30);
}
body.dark-mode .sc-card:hover,
body.home-wallpaper-active:not(.dark-mode) .sc-card:hover {
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.40);
}

/* ---- Media ---- */
.sc-card__media {
    width: 100%;
    height: clamp(150px, 16vw, 210px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
}
.sc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(20, 0, 40, 0.35));
}
.sc-card__media--placeholder {
    background: rgba(180, 143, 255, 0.12);
    color: var(--primary);
}
body.dark-mode .sc-card__media--placeholder,
body.home-wallpaper-active:not(.dark-mode) .sc-card__media--placeholder {
    color: #f5d8ff;
}

/* ---- Title ---- */
.sc-card__title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    line-height: 1.35;
    color: var(--dark);
    word-break: break-word;
    overflow-wrap: anywhere;
}
body.dark-mode .sc-card__title { color: #ffffff; }
body.home-wallpaper-active:not(.dark-mode) .sc-card__title { color: #ffffff; }

/* ---- CTA pill ---- */
.sc-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1.5px solid rgba(180, 143, 255, 0.65);
    background: var(--primary);
    color: var(--primary-btn-color);
    font-weight: 700;
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 20px rgba(62, 0, 95, 0.22);
}
.sc-card__cta:hover {
    transform: translateY(-2px);
    color: var(--primary-btn-color);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(62, 0, 95, 0.32);
}
.sc-card__cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}
html[dir="ltr"] .sc-card__cta-arrow svg { transform: scaleX(-1); }

/* Inert state — target page not built yet */
.sc-card__cta--disabled {
    cursor: default;
    opacity: 0.65;
    box-shadow: none;
}
.sc-card__cta--disabled:hover { transform: none; box-shadow: none; }
.sc-card__soon {
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 700;
}

/* ============================================================
   Responsive — 1199 / 991 / 767 / 575
   ============================================================ */
@media (max-width: 1199px) {
    .store-categories__grid { gap: 16px; }
}

@media (max-width: 991px) {
    .sc-card__media { height: 150px; }
}

@media (max-width: 767px) {
    .store-categories__grid { grid-template-columns: 1fr; }
    .sc-card__media { height: 190px; }
}

@media (max-width: 575px) {
    .store-categories-section { padding: 20px 0; }
    .sc-card { border-radius: 20px; }
}
