/* =================================================
   SHOP BY CATEGORY PAGE
   ================================================= */

.view-id-shop_by_category {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.category-search-filter-wrapper,
.view-id-shop_by_category .view-filters {
    max-width: 1400px;
    margin: 30px auto 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

.category-search-filter-wrapper .views-exposed-form {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.category-search-filter-wrapper .views-exposed-form form {
    width: 100%;
    box-sizing: border-box;
}

.path-shop-by-category .category-search-filter-wrapper .views-exposed-form .d-flex {
    padding: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
}

.category-search-filter-wrapper .form-item,
.category-search-filter-wrapper [class*="form-item-"] {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.category-search-filter-wrapper input[type="text"],
.category-search-filter-wrapper .form-text {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.category-search-filter-wrapper .form-actions,
.category-search-filter-wrapper [data-drupal-selector="edit-actions"] {
    flex-shrink: 0;
    margin-bottom: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    padding: 20px 24px 40px 24px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    height: 180px;
    box-sizing: border-box;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #c40000;
}

.category-card__image {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 8px;
    background: #f9f9f9;
}


.category-card__image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card__image img {
    transform: scale(1.1);
}

.category-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #222 !important;
    text-align: center;
    transition: color 0.3s ease;
    margin-top: 5px;
    line-height: 1.2;
}

.category-card:hover .category-card__name {
    color: #c40000 !important;
}

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        padding: 25px 24px 40px 24px;
    }
}

@media (max-width: 768px) {

    .category-search-filter-wrapper,
    .view-id-shop_by_category .view-filters {
        padding: 0 30px;
        margin-top: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 20px 30px 30px 30px;
    }

    .category-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {

    .category-search-filter-wrapper,
    .view-id-shop_by_category .view-filters {
        padding: 0 30px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px 30px 30px 30px;
    }

    .category-card__name {
        font-size: 13px;
    }
}

/* =================================================
   SECTION 3: WHY CHOOSE REDFOX FOR TOOL CATEGORIES
   ================================================= */
.category-why-choose-section {
    background: #f8f9fa;
    padding: 60px 30px;
    margin-top: 50px;
    border-top: 1px solid #eaeaea;
}

.category-why-choose-container {
    max-width: 1400px;
    margin: 0 auto;
}

.category-why-choose-header {
    text-align: center;
    margin-bottom: 40px;
}

.category-why-choose-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.category-why-choose-subtitle {
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.category-why-choose-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.category-feature-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    border: 1px solid #eef0f2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.category-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: #c40000;
}

.category-feature-icon {
    width: 64px;
    height: 64px;
    background: #fff0f0;
    color: #c40000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.category-feature-card:hover .category-feature-icon {
    background: #c40000;
    color: #ffffff;
}

.category-feature-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.category-feature-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 1024px) {
    .category-why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .category-why-choose-section {
        padding: 35px 30px;
    }

    .category-why-choose-title {
        font-size: 22px;
    }

    .category-why-choose-subtitle {
        font-size: 14px;
    }

    .category-why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-feature-card {
        padding: 16px 10px;
    }

    .category-feature-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 10px auto;
    }

    .category-feature-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-feature-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .category-feature-desc {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* =================================================
   SECTION 4: PREMIUM EXPERT CTA BANNER
   ================================================= */
.category-expert-cta-section {
    max-width: 1400px;
    margin: 50px auto 60px auto;
    padding: 0 24px;
    box-sizing: border-box;
    width: 100%;
}

.category-expert-cta-banner {
    position: relative;
    width: 100%;
    min-height: 450px;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.category-expert-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(245, 245, 247, 0.96) 0%, rgba(245, 245, 247, 0.88) 45%, rgba(245, 245, 247, 0.2) 75%);
    z-index: 1;
}

.category-expert-cta-container {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 50px 60px;
    box-sizing: border-box;
}

.category-expert-cta-content {
    max-width: 45%;
}

.category-expert-cta-title {
    font-size: 32px;
    font-weight: 800;
    color: #111111;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.category-expert-cta-desc {
    font-size: 16px;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 28px;
    font-weight: 400;
}

.category-expert-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #c40000;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 0, 0, 0.3);
}

.category-expert-cta-btn:hover {
    background: #990000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 0, 0, 0.4);
    color: #ffffff !important;
}

.category-expert-cta-btn svg {
    transition: transform 0.3s ease;
}

.category-expert-cta-btn:hover svg {
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    .category-expert-cta-container {
        padding: 40px;
    }

    .category-expert-cta-content {
        max-width: 55%;
    }

    .category-expert-cta-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .category-expert-cta-section {
        padding: 0 10px;
        margin: 35px auto 40px auto;
    }

    .category-expert-cta-banner {
        min-height: 380px;
        background-position: center;
    }

    .category-expert-cta-overlay {
        background: linear-gradient(180deg, rgba(245, 245, 247, 0.94) 0%, rgba(245, 245, 247, 0.88) 60%, rgba(245, 245, 247, 0.4) 100%);
    }

    .category-expert-cta-container {
        padding: 30px 24px;
    }

    .category-expert-cta-content {
        max-width: 100%;
    }

    .category-expert-cta-title {
        font-size: 24px;
    }

    .category-expert-cta-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .category-expert-cta-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .category-expert-cta-section {
        padding: 0 10px;
    }

    .category-expert-cta-container {
        padding: 24px 18px;
    }

    .category-expert-cta-title {
        font-size: 20px;
    }
}