.bt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
/* ============================= */

/* Color Tokens - Barik Tools    */

/* ============================= */

:root {
    --barik-soft: rgba(161, 20, 20, 0.08);
    --ink-900: #0f172a;
    --ink-800: #1f2937;
    --ink-700: #374151;
    --ink-500: #6b7280;
    --surface-soft: #f9fafb;
    --radius-lg: 20px;
}
/* ============================= */

/* Section Wrapper               */

/* ============================= */

.bt-cat-section {
    padding: 56px 0;
    background: transparent;
    /* inherits background from surrounding section */
}
/* ============================= */

/* Header                        */

/* ============================= */

.bt-cat-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}
.bt-cat-heading {
    max-width: 540px;
}
.bt-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--barik-600);
}
.bt-kicker::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: var(--barik-600);
}
.bt-title {
    margin: 6px 0 4px;
    font-size: 26px;
    line-height: 1.25;
    color: var(--ink-900);
}
.bt-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--ink-500);
}
/* View all button */

.bt-view-all {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(161, 20, 20, 0.25);
    color: var(--barik-700);
    background: rgba(161, 20, 20, 0.04);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bt-view-all-icon {
    font-size: 16px;
    line-height: 1;
}
.bt-view-all:hover {
    background: var(--barik-600);
    color: #fff;
    border-color: var(--barik-600);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
/* On larger screens, place button to the right */

@media (min-width: 768px) {
    .bt-cat-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .bt-view-all {
        align-self: center;
    }
}
/* ============================= */

/* Category Grid                 */

/* ============================= */

/* Mobile: 2-column grid by default */

.bt-cat-grid {
    display: flex;
    gap: 16px;
    padding-bottom: 4px;
}
.bt-cat-grid::-webkit-scrollbar {
    height: 6px;
}
.bt-cat-grid::-webkit-scrollbar-track {
    background: transparent;
}
.bt-cat-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.8);
    border-radius: 999px;
}
/* Desktop: grid */

@media (min-width: 900px) {
    .bt-cat-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px;
        overflow: visible;
    }
}
/* ============================= */

/* Category Card                 */

/* ============================= */

.bt-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 240px;
    min-height: 180px;
    padding: 22px 22px 20px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid rgba(161, 20, 20, 0.18);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.bt-cat-card:focus-visible {
    outline: 2px solid var(--barik-600);
    outline-offset: 2px;
}
.bt-cat-card:hover {
    border-color: var(--barik-600);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    background: #fff;
}
/* Content */

.bt-cat-content {
    /*  max-width: 70%;*/
    z-index: 1;
}
.bt-cat-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: var(--ink-900);
}
.bt-cat-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--ink-700);
}
/* Image */

.bt-cat-image-shell {
    position: absolute;
    right: 0;
    top: 50px;
    width: 100%;
    max-width: 200px;
    pointer-events: none;
}

/* Tweak for very small screens */

@media (max-width: 400px) {
    .bt-cat-card {
        min-width: 210px;
        padding: 18px 18px 18px;
    }
    .bt-cat-content {
        /*    max-width: 66%;*/
    }
    .bt-cat-title {
        font-size: 17px;
    }
}
/* Larger desktop: 4 columns if needed */

@media (min-width: 1200px) {
    .bt-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
/* ============================= */

/* Mobile: 2-column grid, no scroll */

/* ============================= */

@media (max-width: 899px) {
    .bt-cat-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        overflow: visible;
    }
    .bt-cat-card {
        min-width: 0;
        width: 100%;
    }
}


.bt-cat-subtitle {
  display: none;
}


/* ============================= */
/* Carousel mode overrides       */
/* ============================= */

.bt-cat-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

/* Nav buttons hidden by default; shown only when carousel is active */
.bt-cat-nav {
    display: none;
    gap: 8px;
}

/* Show nav only when carousel is enabled */
.bt-cat-section.is-carousel .bt-cat-nav {
    display: inline-flex;
}

.bt-cat-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(161, 20, 20, 0.25);
    background: rgba(161, 20, 20, 0.04);
    color: var(--barik-700);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bt-cat-nav-btn:hover {
    background: var(--barik-600);
    border-color: var(--barik-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.bt-cat-nav-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Viewport: no scroll by default */
.bt-cat-viewport {
    overflow: visible;
}

/* Carousel ON (desktop only): enable horizontal scroll */
@media (min-width: 900px) {
    .bt-cat-section.is-carousel .bt-cat-viewport {
        overflow: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    /* Override grid rules with flex for carousel scrolling */
    .bt-cat-section.is-carousel .bt-cat-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 16px;
        overflow: visible;
    }

    .bt-cat-section.is-carousel .bt-cat-card {
        flex: 0 0 auto;
        min-width: 240px;
        scroll-snap-align: start;
    }
}

/* Mobile carousel: horizontal scroll with 2 cards visible at a time + nav buttons */
@media (max-width: 899px) {
    .bt-cat-section.is-carousel .bt-cat-viewport {
        overflow: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    /* Override mobile grid — use flex for horizontal scrolling */
    .bt-cat-section.is-carousel .bt-cat-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 12px;
        overflow: visible;
    }

    /* Each card takes ~half viewport width so 2 cards are visible at once */
    .bt-cat-section.is-carousel .bt-cat-card {
        flex: 0 0 calc(50% - 6px);
        min-width: 0;
        width: auto;
        scroll-snap-align: start;
    }

    /* Keep nav buttons visible on mobile */
    .bt-cat-section.is-carousel .bt-cat-nav {
        display: inline-flex;
    }
}

/* Drag cursor for carousel viewport on desktop */
.bt-cat-section.is-carousel .bt-cat-viewport {
    cursor: default;
}
@media (min-width: 900px) {
    .bt-cat-section.is-carousel .bt-cat-viewport {
        cursor: grab;
    }
    .bt-cat-section.is-carousel .bt-cat-viewport.is-dragging {
        cursor: grabbing;
        user-select: none;
    }
    .bt-cat-section.is-carousel .bt-cat-viewport.is-dragging * {
        user-select: none;
    }
}
