/* ========== Desktop: All Categories ========== */
.all-categories-desktop {
    max-width: 1140px;
}

.all-categories-desktop__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.75rem;
}

.all-categories-desktop__divider {
    border: 0;
    border-top: 1px solid #e5e5e5;
    margin: 0 0 2rem;
}

.all-categories-desktop__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem 2rem;
    padding-bottom: 3rem;
}

.all-categories-desktop__group {
    min-width: 0;
}

.all-categories-desktop__heading {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
    line-height: 1.35;
}

.all-categories-desktop__heading a {
    color: #222;
    text-decoration: none;
}

.all-categories-desktop__heading a:hover {
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
}

.all-categories-desktop__list li {
    margin-bottom: 0.65rem;
}

.all-categories-desktop__list a {
    color: #444;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.4;
}

.all-categories-desktop__list a:hover {
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
}

@media (max-width: 1199.98px) {
    .all-categories-desktop__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Mobile: Categories navigation ========== */
.categories-nav-mobile {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 120px);
    background: #f4f4f4;
}

.categories-nav-mobile__sidebar {
    width: 28%;
    max-width: 120px;
    min-width: 88px;
    flex-shrink: 0;
    background: #f4f4f4;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 100px);
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.categories-nav-mobile__item {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e8e8e8;
    background: transparent;
    padding: 14px 10px 14px 12px;
    text-align: start;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
}

.categories-nav-mobile__item.active {
    background: #fff;
    font-weight: 600;
}

.categories-nav-mobile__item.active::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
}

.categories-nav-mobile__sidebar-title {
    padding: 12px 10px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    background: #ececec;
    border-bottom: 1px solid #e0e0e0;
}

.categories-nav-mobile__panels {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 12px 0 0 0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 100px);
    padding: 12px 12px 24px;
}

.rtl .categories-nav-mobile__panels {
    border-radius: 0 12px 0 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.categories-nav-mobile__panel {
    display: none;
}

.categories-nav-mobile__panel.active {
    display: block;
}

.categories-nav-mobile__see-all-products {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.categories-nav-mobile__see-all-products:hover {
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
    border-color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
    text-decoration: none;
}

.categories-nav-mobile__section {
    margin-bottom: 20px;
}

.categories-nav-mobile__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.categories-nav-mobile__section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.categories-nav-mobile__see-all {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
    text-decoration: none;
    white-space: nowrap;
}

.categories-nav-mobile__see-all:hover {
    text-decoration: underline;
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
}

.categories-nav-mobile__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
}

.categories-nav-mobile__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    min-width: 0;
}

.categories-nav-mobile__tile:hover {
    text-decoration: none;
    color: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
}

.categories-nav-mobile__tile-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
    padding: 8px;
}

.categories-nav-mobile__tile-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.categories-nav-mobile__tile-name {
    font-size: 11px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.categories-nav-mobile__grid--products {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 10px;
}

.categories-nav-mobile__product-tile {
    align-items: stretch;
}

.categories-nav-mobile__product-tile .categories-nav-mobile__tile-img {
    position: relative;
    padding: 6px;
}

.categories-nav-mobile__product-badge {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    background: var(--web-primary, var(--base, var(--bs-primary, #f58300)));
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1.2;
}

.categories-nav-mobile__product-price {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #111;
}

.categories-nav-mobile__empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-size: 13px;
    margin: 24px 0;
}

.all-categories-desktop__products {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.all-categories-desktop__featured-block .categories-nav-mobile__section-head {
    margin-bottom: 16px;
}

@media (max-width: 1199.98px) {
    .all-categories-desktop__products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .categories-nav-mobile__sidebar {
        max-width: 160px;
        width: 30%;
    }

    .categories-nav-mobile__item {
        font-size: 13px;
        padding: 16px 12px;
    }

    .categories-nav-mobile__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px 10px;
    }

    .categories-nav-mobile__grid--products {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-nav-mobile__tile-name {
        font-size: 12px;
    }
}
