/* ======================================================================
   Product categories — Cohort 4 (FreshMart / Market Orange + Pine Forest)
   Rebuilt from sandbox Design-4. Self-contained palette + font stack
   scoped to .product-categories-4-strip so the cohort renders correctly
   even when mixed-and-matched with other cohorts' sections.

   Horizontal snap-scroll carousel: 6+ category cards in a slide strip.
   Class pattern: product-categories-4-{element}.
   ====================================================================== */

/* ---------- Cohort-4 palette + font stack scoped to the strip ---------- */
.product-categories-4-strip {
    --bs-body-bg:             #FFFFFF;
    --bs-body-color:          #1F2937;
    --bs-primary:             #E86A1C;
    --bs-primary-rgb:         232, 106, 28;
    --bs-light-primary:       #FFF1E4;
    --bs-tertiary-bg:         #FFF1E4;
    --bs-secondary:           #0F3A26;
    --bs-secondary-color:     #6B7280;
    --bs-secondary-bg:        #F6F7F9;
    --bs-border-color:        #E5E7EB;
    --bs-border-accent:       #E86A1C;
    --bs-heading-font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    background: var(--bs-body-bg);
}

/* ---------- Head — icon mark + eyebrow/title stack + right-side sub ---------- */
.product-categories-4-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bs-light-primary, var(--bs-tertiary-bg));
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-categories-4-eyebrow {
    display: block;
    color: var(--bs-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.product-categories-4-title {
    font-family: var(--bs-heading-font-family);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bs-body-color);
    margin: 0;
    letter-spacing: -0.015em;
}

.product-categories-4-sub {
    color: var(--bs-secondary-color);
    font-size: 0.88rem;
    font-style: italic;
}

/* ---------- Scroller — snap-scroll, hidden scrollbar styling ---------- */
.product-categories-4-scroller {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--bs-primary-rgb), 0.35) transparent;
    -webkit-overflow-scrolling: touch;
}
.product-categories-4-scroller::-webkit-scrollbar { height: 6px; }
.product-categories-4-scroller::-webkit-scrollbar-track { background: transparent; }
.product-categories-4-scroller::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.35);
    border-radius: 999px;
}
.product-categories-4-scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-primary-rgb), 0.6);
}

/* ---------- Card — horizontal flex (icon + body + cta), snap-aligned ---------- */
.product-categories-4-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: 56px 1fr 24px;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bs-secondary-bg);
    border: 1.5px solid var(--bs-border-color);
    border-radius: 14px;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.product-categories-4-card:hover,
.product-categories-4-card:focus {
    background: var(--bs-body-bg);
    border-color: var(--bs-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(var(--bs-primary-rgb), 0.14);
    text-decoration: none;
    color: var(--bs-body-color);
}

/* ---------- Icon — rounded square with warm tint ---------- */
.product-categories-4-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bs-light-primary, var(--bs-tertiary-bg));
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease;
}

.product-categories-4-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
}

.product-categories-4-card:hover .product-categories-4-icon,
.product-categories-4-card:focus .product-categories-4-icon {
    background: var(--bs-primary);
    color: var(--bs-body-bg);
}

/* ---------- Body ---------- */
.product-categories-4-body { min-width: 0; }

.product-categories-4-name {
    font-family: var(--bs-heading-font-family);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin: 0 0 2px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-categories-4-count {
    font-size: 0.78rem;
    color: var(--bs-secondary);
    font-weight: 600;
}

/* ---------- CTA arrow — slides on hover ---------- */
.product-categories-4-cta {
    color: var(--bs-secondary-color);
    transition: color 0.2s ease, transform 0.25s ease;
}

.product-categories-4-card:hover .product-categories-4-cta,
.product-categories-4-card:focus .product-categories-4-cta {
    color: var(--bs-primary);
    transform: translateX(4px);
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    .product-categories-4-title { font-size: 1.3rem; }
    .product-categories-4-card {
        flex-basis: 215px;
        padding: 12px 14px;
    }
    .product-categories-4-icon { width: 48px; height: 48px; border-radius: 12px; }
    .product-categories-4-icon img { width: 40px; height: 40px; }
    .product-categories-4-name { font-size: 0.96rem; }
}
