/* Categories Section */
.categories-section {
    padding: 40px 0;
    /* Soft blue-purple gradient matching the reference */
    background: linear-gradient(180deg, #DEEFFF 0%, #F1F3F6 100%);
    overflow: hidden;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.categories-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #000;
}

.view-all-link {
    color: #2874f0;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Scroll Container */
.categories-slider-container {
    position: relative;
    display: flex;
    align-items: center;
}

.categories-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    /* Hide scrollbar spacing */
    scrollbar-width: none;
    /* Firefox */
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Brand Card */
.brand-card {
    min-width: 280px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #212121;
}

.brand-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* Sub-item within Card */
.cat-item {
    text-align: center;
}

.cat-item-img-box {
    width: 100%;
    aspect-ratio: 1;
    /* Square */
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cat-item-img-box img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

/* Text Placeholder for missing images */
.placeholder-text {
    font-size: 24px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
}

.placeholder-sub {
    font-size: 12px;
    color: #888;
}

.cat-item-name {
    font-size: 13px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.see-all-brand {
    margin-top: auto;
    color: #2874f0;
    font-size: 14px;
    font-weight: 500;
    display: block;
    padding-top: 10px;
}

/* Navigation Buttons (Optional for desktop hover) */
.cat-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    z-index: 5;
    display: none;
    /* Show on hover via JS or media query if needed, keeping simple for mobile first */
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
}

.cat-nav-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.cat-nav-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Desktop Hover */
.categories-slider-container:hover .cat-nav-btn {
    display: flex;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .brand-card {
        min-width: 85vw;
        /* Show mostly one card */
    }
}