/* Shop homepage — Digikala-inspired RTL layout */

:root {
    --store-red: #ef394e;
    --store-red-dark: #c6283a;
}

.bale-store-app {
    --store-red: #ef394e;
    --store-red-dark: #c6283a;
    --store-bg: #f5f5f5;
    --store-card: #fff;
    --store-text: #3f4064;
    --store-muted: #81858b;
    --store-radius: 12px;
    --store-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --store-border: #f0f0f1;
    --store-soft: #fafafa;
    --store-field: #f0f0f1;
    --store-skeleton: #e0e0e2;
}

.bale-store-app .bale-nav-rail { z-index: 30; }

.bale-store-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    background: var(--store-bg);
    padding-bottom: 72px;
    overflow-x: hidden;
    overflow-y: auto;
}

@media (min-width: 901px) {
    .bale-store-main { padding-bottom: 24px; }
    .bale-store-bottom-nav { display: none !important; }
}

/* Header */
.bale-store-header {
    background: var(--store-card);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: var(--store-shadow);
}

.bale-store-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 1280px;
    margin: 0 auto;
}

.bale-store-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.bale-store-logo picture,
.bale-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bale-store-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--store-field);
    border-radius: 8px;
    padding: 0 12px;
    max-width: 560px;
}

.bale-store-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    color: var(--store-text);
}

.bale-store-search button {
    border: none;
    background: transparent;
    color: var(--store-muted);
    cursor: pointer;
    padding: 4px;
}

.bale-store-header-actions { display: flex; gap: 8px; align-items: center; }

.bale-store-icon-btn {
    color: var(--store-text);
    padding: 8px;
    display: flex;
}

.bale-store-login-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--store-red);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* Stories */
.bale-store-stories {
    background: var(--store-card);
    border-bottom: 1px solid var(--store-border);
    padding: 12px 0;
}

.bale-store-stories-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    max-width: 1280px;
    margin: 0 auto;
}

.bale-store-stories-scroll::-webkit-scrollbar { display: none; }

.bale-store-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 72px;
    font-family: inherit;
    color: var(--store-muted);
    font-size: 11px;
}

/* Slider */
.bale-store-slider-wrap {
    position: relative;
    max-width: 1280px;
    margin: 12px auto;
    padding: 0 16px;
}

.bale-store-slider {
    display: flex;
    width: 100%;
    direction: ltr;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: var(--store-radius);
    scrollbar-width: none;
    gap: 0;
    -webkit-overflow-scrolling: touch;
}

.bale-store-slider::-webkit-scrollbar { display: none; }

.bale-store-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
    border-radius: var(--store-radius);
    overflow: hidden;
    aspect-ratio: 16 / 6;
    background: var(--store-skeleton);
}

.bale-store-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bale-store-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    direction: ltr;
}

.bale-store-slider-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--store-skeleton);
    cursor: pointer;
    transition: background 0.2s;
}

.bale-store-slider-dots span.active { background: var(--store-red); width: 20px; border-radius: 4px; }

@media (min-width: 768px) {
    .bale-store-slide { aspect-ratio: 16 / 5; }
}

/* Categories */
.bale-store-section {
    width: calc(100% - 24px);
    max-width: 1280px;
    margin: 16px auto;
    padding: 16px;
    background: var(--store-card);
    border-radius: 16px;
    box-shadow: var(--store-shadow);
}

.bale-store-section .bale-store-product-card {
    box-shadow: none;
    border: 1px solid var(--store-border);
}

.bale-store-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bale-store-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--store-text);
    margin: 0;
}

.bale-store-categories .bale-store-section-title {
    text-align: center;
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

.bale-store-see-all {
    font-size: 13px;
    color: var(--store-red);
    text-decoration: none;
}

.bale-store-cat-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    align-items: start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.bale-store-cat-grid::-webkit-scrollbar {
    display: none;
}

.bale-store-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 calc(100% / 4);
    max-width: calc(100% / 4);
    min-height: 96px;
    text-decoration: none;
    color: var(--store-text);
}

@media (min-width: 600px) {
    .bale-store-cat-item {
        flex: 0 0 calc(100% / 6);
        max-width: calc(100% / 6);
        min-height: 104px;
    }
}

@media (min-width: 900px) {
    .bale-store-cat-item {
        flex: 0 0 calc(100% / 8);
        max-width: calc(100% / 8);
    }
}

.bale-store-cat-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--store-card);
    box-shadow: var(--store-shadow);
    border: 2px solid var(--store-card);
}

@media (min-width: 600px) {
    .bale-store-cat-img {
        width: 64px;
        height: 64px;
    }
}

.bale-store-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bale-store-cat-name {
    font-size: 11px;
    text-align: center;
    line-height: 1.35;
    width: 100%;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Amazing offers */
.bale-store-amazing {
    background: linear-gradient(180deg, var(--store-red) 0%, var(--store-red-dark) 100%);
    width: calc(100% - 24px);
    max-width: 1280px;
    margin: 16px auto;
    border-radius: 16px;
    padding: 14px 0;
}

.bale-store-amazing-intro {
    flex: 0 0 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 2px;
    color: #fff;
    text-align: center;
}

.bale-store-amazing-title {
    display: flex;
    flex-direction: column;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.bale-store-amazing-timer {
    display: flex;
    align-items: center;
    gap: 3px;
    direction: ltr;
}

.bale-store-amazing-timer b {
    background: #fff;
    color: var(--store-red);
    border-radius: 6px;
    min-width: 26px;
    padding: 4px 3px;
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.bale-store-amazing-timer i {
    font-style: normal;
    font-weight: 700;
    color: #fff;
}

.bale-store-amazing-percent {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
}

.bale-store-amazing-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.95;
}

.bale-store-amazing-more:hover { opacity: 1; }

.bale-store-amazing-scroll {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    padding: 0 12px;
    scrollbar-width: none;
}

.bale-store-amazing-scroll::-webkit-scrollbar { display: none; }

/* Product cards */
.bale-store-products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.bale-store-products-scroll::-webkit-scrollbar { display: none; }

.bale-store-product-card {
    flex: 0 0 160px;
    background: var(--store-card);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
    padding: 12px;
    position: relative;
    transition: transform 0.15s ease;
}

.bale-store-product-card:hover { transform: translateY(-2px); }

.bale-store-product-card.amazing {
    flex: 0 0 180px;
}

.bale-store-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--store-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

.bale-store-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.bale-store-product-img {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.bale-store-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bale-store-product-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--store-text);
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.bale-store-product-cat {
    font-size: 10px;
    color: var(--store-muted);
    display: block;
    margin-bottom: 6px;
}

.bale-store-product-prices {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bale-store-price-old {
    font-size: 11px;
    color: var(--store-muted);
    text-decoration: line-through;
}

.bale-store-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--store-text);
}

.bale-store-amazing .bale-store-price { color: var(--store-red); }

/* Empty state */
.bale-store-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--store-muted);
}

.bale-store-empty .bale-btn { margin-top: 16px; }

/* Product list page */
.bale-store-list-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 24px;
}

.bale-store-list-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
}

.bale-store-list-head > div { flex: 1; min-width: 0; }

.bale-store-back-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--store-card);
    box-shadow: var(--store-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--store-text);
    font-size: 18px;
    flex-shrink: 0;
}

.bale-store-list-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--store-text);
}

.bale-store-list-count {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--store-muted);
}

.bale-store-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 16px;
}

.bale-store-products-grid .bale-store-product-card {
    flex: unset;
    min-width: 0;
}

@media (min-width: 600px) {
    .bale-store-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .bale-store-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .bale-store-products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.bale-store-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px 24px;
}

.bale-store-page-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid var(--store-border);
    background: var(--store-card);
    color: var(--store-text);
    text-decoration: none;
    font-size: 14px;
}

.bale-store-page-btn-primary {
    background: var(--store-red);
    border-color: var(--store-red);
    color: #fff;
}

/* Bottom nav (mobile) */
.bale-store-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: var(--bale-nav-width, 0);
    background: var(--store-card);
    border-top: 1px solid var(--store-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 25;
}

.bale-store-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--store-muted);
    font-size: 10px;
    padding: 4px 12px;
}

.bale-store-bottom-nav a.active { color: var(--store-red); }

/* When the nav rail is collapsed via the toggle, the bottom nav spans the full width */
body.bale-nav-collapsed .bale-store-bottom-nav {
    right: 0;
}

/* Place the collapsed toggle button next to the search box inside the store header */
body.bale-nav-collapsed .bale-store-app .bale-store-header-top {
    padding-right: 64px;
}

body.bale-nav-collapsed .bale-store-app .bale-nav-toggle {
    top: 10px;
    right: 16px;
    background: var(--store-field);
    color: var(--store-text);
    box-shadow: none;
}

/* Story overlay */
.bale-store-story-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bale-store-story-overlay[hidden] { display: none; }

.bale-store-story-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
}

.bale-store-story-viewer {
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bale-store-story-viewer img,
.bale-store-story-viewer video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.bale-store-story-viewer .story-text {
    color: #fff;
    font-size: 18px;
    padding: 24px;
    text-align: center;
    max-width: 400px;
}

/* Store footer — trust badge + tagline + copyright */
.bale-store-footer {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 20px 16px 8px;
    text-align: center;
    border-top: 1px solid var(--store-border);
    background: var(--store-card);
}

.bale-store-footer-enamad {
    display: inline-block;
    line-height: 0;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.bale-store-footer-enamad:hover {
    opacity: 1;
}

.bale-store-footer-enamad img {
    width: 36px;
    height: auto;
    display: block;
}

.bale-store-footer-tagline {
    margin: 8px 0 4px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--store-muted);
}

.bale-store-footer-copy {
    margin: 0;
    font-size: 10px;
    color: var(--store-muted);
    opacity: 0.75;
}

/* ───── Filter modal dark-mode overrides ───── */
[data-bale-theme="dark"] .bale-filter-modal {
    --fm-text: #E9EDEF;
    --fm-muted: #8696A0;
    --fm-border: #2A3942;
    --fm-field: #202C33;
}
[data-bale-theme="dark"] .bale-filter-modal-head h2 { color: var(--fm-text); }
[data-bale-theme="dark"] .bale-filter-label { color: var(--fm-text); }
[data-bale-theme="dark"] .bale-filter-close {
    background: var(--fm-field);
    color: var(--fm-muted);
}
[data-bale-theme="dark"] .bale-filter-sort-opt {
    border-color: var(--fm-border);
    color: var(--fm-muted);
}
[data-bale-theme="dark"] .bale-filter-sort-opt.selected {
    border-color: var(--store-red);
    color: var(--store-red);
    background: rgba(239, 57, 78, 0.12);
}
[data-bale-theme="dark"] .bale-filter-price-field label { color: var(--fm-muted); }
[data-bale-theme="dark"] .bale-filter-price-field input {
    background: var(--fm-field);
    border-color: var(--fm-border);
    color: var(--fm-text);
}
[data-bale-theme="dark"] .bale-filter-price-field input:focus { border-color: var(--store-red); }
[data-bale-theme="dark"] .bale-filter-price-dash { color: var(--fm-muted); }
[data-bale-theme="dark"] .bale-filter-reset {
    border-color: var(--fm-border);
    color: var(--fm-muted);
}

/* ───── Filter button ───── */
.bale-filter-btn {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--store-card);
    box-shadow: var(--store-shadow);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--store-text);
    margin-right: auto;
}

.bale-filter-btn--active {
    background: var(--store-red);
    color: #fff;
}

.bale-filter-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--store-red);
}

.bale-filter-btn--active .bale-filter-dot {
    background: var(--store-red);
    border-color: #fff;
}

/* ───── Filter overlay & modal ───── */
.bale-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.bale-filter-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.bale-filter-modal {
    width: 100%;
    max-width: 480px;
    background: var(--bale-surface, #ffffff);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(30px);
    transition: transform 0.25s ease;
    direction: rtl;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.bale-filter-overlay.open .bale-filter-modal {
    transform: translateY(0);
}

.bale-filter-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bale-filter-modal-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--store-text);
}

.bale-filter-close {
    background: var(--store-field);
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    color: var(--store-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bale-filter-section {
    margin-bottom: 20px;
}

.bale-filter-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--store-text);
}

/* Sort radio group */
.bale-filter-sort-group {
    display: flex;
    gap: 8px;
}

.bale-filter-sort-opt {
    flex: 1;
    text-align: center;
    padding: 9px 4px;
    border-radius: 10px;
    border: 1.5px solid var(--store-border);
    font-size: 13px;
    color: var(--store-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.bale-filter-sort-opt input { display: none; }

.bale-filter-sort-opt.selected {
    border-color: var(--store-red);
    color: var(--store-red);
    background: #fff5f6;
    font-weight: 600;
}

/* Price range */
.bale-filter-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bale-filter-price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bale-filter-price-field label {
    font-size: 12px;
    color: var(--store-muted);
}

.bale-filter-price-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--store-border);
    background: var(--store-field);
    font-size: 14px;
    color: var(--store-text);
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.bale-filter-price-field input:focus {
    border-color: var(--store-red);
    background: #fff;
}

.bale-filter-price-dash {
    color: var(--store-muted);
    font-size: 16px;
    flex-shrink: 0;
    padding-top: 20px;
}

/* Action buttons */
.bale-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.bale-filter-reset {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1.5px solid var(--store-border);
    background: transparent;
    font-size: 14px;
    color: var(--store-muted);
    cursor: pointer;
    font-family: inherit;
}

.bale-filter-apply {
    flex: 2;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: var(--store-red);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Editable static content pages (rules / terms) */
.bale-store-content-page {
    width: 100%;
    min-width: 0;
    max-width: 760px;
    margin: 16px auto;
    padding: 20px 18px;
    background: var(--bale-surface, #fff);
    border: 1px solid var(--bale-border, #e5e7eb);
    border-radius: 14px;
    box-sizing: border-box;
}
.bale-store-content-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
}
.bale-store-content-body {
    white-space: pre-line;
    line-height: 2;
    font-size: 15px;
    color: var(--bale-text, #1f2937);
}
.bale-store-content-body--html {
    white-space: normal;
}
.bale-store-content-body--html p {
    margin: 0 0 12px;
}
.bale-store-content-body--html ul,
.bale-store-content-body--html ol {
    margin: 0 0 12px;
    padding-right: 24px;
}
.bale-store-content-body--html a {
    color: var(--bale-primary, #16a34a);
}
.bale-store-content-body--html table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.bale-store-content-body--html table td,
.bale-store-content-body--html table th {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
}

.bale-store-footer-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 4px 0;
}
.bale-store-footer-links a {
    color: var(--bale-primary, #16a34a);
    font-size: 13px;
    text-decoration: none;
}
.bale-store-footer-links a:hover {
    text-decoration: underline;
}

/* Bottom nav button (matches the <a> style) */
.bale-store-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--store-text);
    padding: 4px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.bale-store-bottom-nav-btn:hover { color: var(--store-red); }

/* Categories modal */
.bale-store-cat-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bale-store-cat-modal[hidden] { display: none; }
.bale-store-cat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}
.bale-store-cat-modal-sheet {
    position: relative;
    background: var(--store-card, #fff);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 24px rgba(0,0,0,.15);
}
.bale-store-cat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--store-text, #3f4064);
    border-bottom: 1px solid var(--store-border);
    flex-shrink: 0;
}
.bale-store-cat-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--store-muted);
    padding: 4px;
    line-height: 0;
}
.bale-store-cat-modal-body {
    overflow-y: auto;
    padding: 12px;
    flex: 1;
}
.bale-store-cat-modal-loading {
    text-align: center;
    padding: 32px;
    color: var(--store-muted);
    font-size: 14px;
}
.bale-store-cat-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.bale-store-cat-modal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--store-text);
    font-size: 12px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    transition: background .15s;
}
.bale-store-cat-modal-item:hover { background: var(--store-field); }
.bale-store-cat-modal-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--store-field);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bale-store-cat-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bale-store-cat-modal-name {
    line-height: 1.4;
    word-break: break-word;
}
