/* -------- 工具页面横幅（与资源屋统一） -------- */
.tools-hero {
    background: linear-gradient(145deg, #f0f4fa 0%, #e6edf6 100%);
    height: 300px;
    padding: 5rem 0 3rem;
    border-bottom: 1px solid rgba(0, 106, 205, 0.08);
    text-align: center;
}
.tools-hero .section-title {
    font-weight: 700;
    color: #0b1a33;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.tools-hero .section-sub {
    color: #4b5a6a;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.tools-hero .search-box {
    margin-bottom: 0;
}

/* -------- 工具页面主体 -------- */
.tools-section {
    padding: 3rem 0 60px;
    background: #f8faff;
}

/* 搜索框 */
.search-box {
    max-width: 580px;
    margin: 0 auto 1.8rem;
}
.search-box .input-group {
    background: #fff;
    border-radius: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}
.search-box .form-control {
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    border-radius: 60px 0 0 60px;
    background: transparent;
}
.search-box .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}
.search-box .btn-search {
    border: none;
    background: #006ACD;
    color: #fff;
    padding: 0 2rem;
    border-radius: 0 60px 60px 0;
    font-weight: 500;
    transition: background 0.2s;
}
.search-box .btn-search:hover {
    background: #0052a3;
}
.search-box .btn-search i {
    font-size: 1.2rem;
}

/* -------- 分类导航 -------- */
.favorite-filter-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: -1.5rem;
    margin-bottom: 0.55rem;
}
.favorite-filter-btn {
    border: 1px solid #f3cc72;
    border-radius: 999px;
    padding: 0.38rem 0.9rem;
    color: #9a6100;
    background: #fff8e7;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.favorite-filter-btn:hover,
.favorite-filter-btn.active {
    color: #9a6100;
    border-color: #e8af3f;
    background: #fff0c9;
    box-shadow: 0 3px 10px rgba(154, 97, 0, .12);
}
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.2rem;
    margin-bottom: 2rem;
}
.category-nav .cat-btn {
    border: none;
    background: transparent;
    padding: 0.4rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5a6a;
    border-radius: 30px;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}
.category-nav .cat-btn:hover {
    color: #006ACD;
    background: rgba(0, 106, 205, 0.04);
}
.category-nav .cat-btn.active {
    color: #fff;
    background: #006ACD;
    border-color: #006ACD;
    box-shadow: 0 4px 12px rgba(0, 106, 205, 0.2);
}

/* -------- 工具网格（一行 6 个） -------- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.tool-item {
    position: relative;
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.5rem 0.6rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    cursor: default;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tool-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 106, 205, 0.08);
    border-color: rgba(0, 106, 205, 0.15);
}
.tool-item .tool-favorite {
    position: absolute;
    z-index: 2;
    top: 0.62rem;
    right: 0.62rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    padding: 0;
    color: #97a6b7;
    border: 1px solid #e5ecf4;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.tool-item .tool-favorite:hover {
    color: #e09a00;
    border-color: #f3cc72;
    background: #fff8e7;
    transform: scale(1.08);
}
.tool-item .tool-favorite.is-favorited {
    color: #e09a00;
    border-color: #f3cc72;
    background: #fff4d9;
}
.tool-item .tool-favorite:disabled {
    cursor: wait;
    opacity: .6;
}
.tool-item .tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(0, 106, 205, 0.08);
    color: #006ACD;
    font-size: 2rem;
    margin-bottom: 0.6rem;
    transition: 0.2s;
}
.tool-item:hover .tool-icon {
    background: rgba(0, 106, 205, 0.15);
    transform: scale(1.05);
}
.tool-item .tool-name {
    font-weight: 600;
    color: #0b1a33;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    margin-bottom: 0.2rem;
}
.tool-item .tool-desc {
    font-size: 0.75rem;
    color: #8a98a8;
    margin-bottom: 0.4rem;
}
.tool-item .tool-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    min-width: 1.55rem;
    min-height: 1.55rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
}
.tool-item .tool-price i {
    font-size: 0.9rem;
}
.tool-item .tool-price img {
    width: 0.92rem;
    height: 0.92rem;
    object-fit: contain;
}
.tool-item .tool-price-paid {
    top: 0.76rem;
    left: -0.82rem;
    min-width: 3.2rem;
    height: 1.62rem;
    padding: 0.16rem 0.62rem 0.16rem 1rem;
    color: #9a6100;
    background: #fff4d9;
    box-shadow: 0 2px 6px rgba(154, 97, 0, 0.1);
    transform: rotate(-45deg);
}
.tool-item .tool-price-paid img {
    transform: rotate(45deg);
}
.tool-item .tool-usage {
    font-size: 0.7rem;
    color: #b0b8c0;
    background: #f0f4fa;
    padding: 0.15rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* 响应式 */
@media (max-width: 1199.98px) {
    .tool-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 991.98px) {
    .tool-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767.98px) {
    .tool-grid { grid-template-columns: repeat(3, 1fr); }
    .favorite-filter-bar { justify-content: center; }
    .category-nav { gap: 0.4rem 0.8rem; }
    .category-nav .cat-btn { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
}
@media (max-width: 575.98px) {
    .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .tool-item { padding: 1rem 0.4rem; }
    .tool-item .tool-icon { width: 48px; height: 48px; font-size: 1.6rem; }
    .tool-item .tool-name { font-size: 0.85rem; }
    .search-box .form-control { padding: 0.6rem 1.2rem; }
    .search-box .btn-search { padding: 0 1.2rem; }
}
