/* ==========================================================================
   SMARTKID - KIDS E-COMMERCE SECTIONS STYLESHEET
   Matching "Shop By Age", "Shop Top Brands", and "Shop By Category"
   ========================================================================== */

/* Google Font Import (Fallback & Consistency) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&family=Albert+Sans:wght@600;700;800;900&display=swap');

/* --- Container & General Section Layout --- */
.smartkid-container {
    width: 100%;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.smartkid-section {
    padding-top: 36px;
    padding-bottom: 36px;
    position: relative;
    box-sizing: border-box;
}

.smartkid-section-title {
    font-family: 'Albert Sans', 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: #0c1c38;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0;
    margin-bottom: 26px;
}

/* ==========================================================================
   1. SHOP BY AGE SECTION
   ========================================================================== */
.shop-by-age-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.age-pill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    text-align: center;
    flex-shrink: 0;
}

.age-pill-card:hover {
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

/* Specific Colors matching screenshot */
.age-pill-0-12 {
    background-color: #4ebbf8;
}

.age-pill-1-3 {
    background-color: #7ece6f;
}

.age-pill-3-5 {
    background-color: #f78d52;
}

.age-pill-5-7 {
    background-color: #9d8ef4;
}

.age-pill-7-9 {
    background-color: #f35d84;
}

.age-pill-9plus {
    background-color: #fec935;
}

.age-pill-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.age-number {
    font-family: 'Albert Sans', 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #0b1a30;
    line-height: 1;
    letter-spacing: -0.5px;
}

.age-label {
    font-family: 'Albert Sans', 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #0b1a30;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 5px;
}

/* ==========================================================================
   2. SHOP TOP BRANDS SECTION
   ========================================================================== */
.shop-brands-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.brands-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    padding: 0;
    outline: none;
}

.brands-nav-btn:hover {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    transform: translateY(-50%) scale(1.08);
    border-color: #cbd5e1;
}

.brands-nav-btn.prev {
    left: -18px;
}

.brands-nav-btn.next {
    right: -18px;
}

.brands-nav-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.brands-slider-track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: 8px 4px;
    box-sizing: border-box;
}

.brands-slider-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.brand-card-item {
    flex: 1 0 calc(12.5% - 13px);
    min-width: 135px;
    max-width: 165px;
    height: 96px;
    background-color: #ffffff;
    border: 1.5px solid #eaedf3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.brand-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
}

.brand-card-item img {
    max-width: 88%;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.brand-card-item:hover img {
    transform: scale(1.06);
}

/* ==========================================================================
   3. SHOP BY CATEGORY SECTION
   ========================================================================== */
.shop-by-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

.category-tile-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    overflow: visible;
}

.category-tile-card:hover {
    transform: translateY(-6px) scale(1.02);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

.category-tile-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 18px;
    transition: transform 0.3s ease;
}

.category-tile-card:hover img {
    transform: scale(1.02);
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */

/* Large Tablets / Small Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
    .smartkid-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .smartkid-section-title {
        font-size: 24px;
        margin-bottom: 22px;
    }

    .shop-by-age-grid {
        gap: 16px;
    }

    .age-pill-card {
        width: 110px;
        height: 110px;
    }

    .age-number {
        font-size: 24px;
    }

    .age-label {
        font-size: 11px;
    }

    .shop-by-category-grid {
        gap: 18px;
    }
}

/* Tablets (max-width: 991px) */
@media (max-width: 991px) {
    .smartkid-section {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    /* Shop By Age: centered circles */
    .shop-by-age-grid {
        gap: 16px;
    }

    .age-pill-card {
        width: 100px;
        height: 100px;
    }

    .age-number {
        font-size: 22px;
    }

    .age-label {
        font-size: 10.5px;
    }

    /* Brands Slider */
    .brands-nav-btn {
        width: 38px;
        height: 38px;
    }

    .brands-nav-btn.prev {
        left: -12px;
    }

    .brands-nav-btn.next {
        right: -12px;
    }

    /* Shop By Category: 4 columns x 2 rows */
    .shop-by-category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

/* Mobile Devices (max-width: 640px) */
@media (max-width: 640px) {
    .smartkid-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .smartkid-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .smartkid-section-title {
        font-size: 20px;
        letter-spacing: 0.5px;
        margin-bottom: 18px;
    }

    /* Shop By Age: 3 circles per row */
    .shop-by-age-grid {
        gap: 12px;
    }

    .age-pill-card {
        width: 88px;
        height: 88px;
    }

    .age-number {
        font-size: 19px;
    }

    .age-label {
        font-size: 9.5px;
        margin-top: 3px;
    }

    /* Brands Slider */
    .brands-nav-btn {
        width: 34px;
        height: 34px;
        left: -8px;
    }

    .brands-nav-btn.next {
        right: -8px;
    }

    .brand-card-item {
        min-width: 120px;
        height: 84px;
        padding: 10px 14px;
    }

    .brand-card-item img {
        max-height: 44px;
    }

    /* Shop By Category: 4 columns in 2 rows */
    .shop-by-category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

/* Extra Small Phones (max-width: 420px) */
@media (max-width: 420px) {
    .shop-by-age-grid {
        gap: 8px;
    }

    .age-pill-card {
        width: 82px;
        height: 82px;
    }

    .age-number {
        font-size: 17px;
    }

    .age-label {
        font-size: 9px;
        margin-top: 2px;
    }

    .shop-by-category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
}

/* ==========================================================================
   4. TOY CATALOG & FILTER UTILITIES
   ========================================================================== */
.toy-age-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.toy-brand-tag {
    display: inline-block;
    color: #e11d48;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.toy-safety-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 8px;
}

.filter-age-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
    list-style: none;
}

.filter-age-pill-item input[type="checkbox"] {
    display: none;
}

.filter-age-pill-label {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-age-pill-item input[type="checkbox"]:checked + .filter-age-pill-label {
    background: #ff5722;
    color: #ffffff;
    border-color: #ff5722;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.filter-brand-logo-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-brand-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}