/* ============================================
   SOFTWARE & TOOLS - SPECRACK STYLES
   ============================================ */

/* ----- Categories Grid ----- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: var(--card-light);
    border-radius: 20px;
    padding: 28px 20px 24px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 200px;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
}

body.dark .category-card {
    background: var(--card-dark);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.category-card:active {
    transform: scale(0.97);
}

/* CRITICAL - Prevent children from blocking clicks on the <a> tag */
.category-card * {
    pointer-events: none;
}

.category-count {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    background: rgba(59, 130, 246, 0.08);
    padding: 2px 12px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

body.dark .category-count {
    color: #64748b;
    background: rgba(59, 130, 246, 0.12);
}

.category-card:hover .category-count {
    background: rgba(59, 130, 246, 0.15);
}

/* ----- Category Icon Styles ----- */
.category-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-card:hover .category-icon-wrapper {
    background: rgba(59, 130, 246, 0.16);
    transform: scale(1.06);
}

.category-icon-wrapper svg {
    width: 34px;
    height: 34px;
    stroke: var(--primary);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper svg {
    stroke: var(--primary-dark);
}

.category-emoji {
    font-size: 34px;
    line-height: 1;
}

body.dark .category-icon-wrapper {
    background: rgba(59, 130, 246, 0.12);
}

body.dark .category-card:hover .category-icon-wrapper {
    background: rgba(59, 130, 246, 0.22);
}

.category-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-light);
}

body.dark .category-card h3 {
    color: var(--text-dark);
}

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

body.dark .category-card p {
    color: #94a3b8;
}

/* ----- Search & Filter Bar ----- */
.search-bar-wrapper {
    margin-bottom: 32px;
    background: var(--card-light);
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid var(--border-light);
}

body.dark .search-bar-wrapper {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-size: 15px;
    background: var(--bg-light);
    color: var(--text-light);
    transition: all 0.2s;
}

body.dark .search-bar input {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-bar input::placeholder {
    color: #94a3b8;
}

.clear-search {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s;
}

.clear-search:hover {
    color: var(--primary);
}

.search-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-filters select {
    padding: 8px 14px;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-size: 13px;
    background: var(--bg-light);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .search-filters select {
    background: var(--bg-dark);
    color: var(--text-dark);
    border-color: var(--border-dark);
}

.search-filters select:focus {
    outline: none;
    border-color: var(--primary);
}

.tool-count {
    font-size: 13px;
    color: #94a3b8;
    margin-left: auto;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 20px;
}

body.dark .tool-count {
    color: #64748b;
    background: rgba(59, 130, 246, 0.08);
}

/* ----- Tools Grid ----- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.tool-card {
    background: var(--card-light);
    border-radius: 20px;
    padding: 28px 18px 22px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.dark .tool-card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6, var(--primary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

body.dark .tool-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border-color: var(--primary);
}

/* ----- TOOL IMAGE WRAPPER ----- */
.tool-card .tool-image-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(59, 130, 246, 0.04);
    border-radius: 14px;
    margin: 0 auto 16px;
    overflow: hidden;
    flex-shrink: 0;
    padding: 10px;
}

body.dark .tool-card .tool-image-wrapper {
    background: rgba(59, 130, 246, 0.06);
}

.tool-card:hover .tool-image-wrapper {
    background: rgba(59, 130, 246, 0.08);
}

.tool-card .tool-image-wrapper img,
.tool-card .tool-image-wrapper svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.tool-card:hover .tool-image-wrapper img,
.tool-card:hover .tool-image-wrapper svg {
    transform: scale(1.05);
}

/* ----- Tool Card Content ----- */
.tool-card .tool-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-light);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

body.dark .tool-card .tool-name {
    color: var(--text-dark);
}

.tool-card .category-tag {
    font-size: 11px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

body.dark .tool-card .category-tag {
    background: rgba(59, 130, 246, 0.18);
}

/* ----- RATING + HEART SAME ROW ----- */
.tool-card .rating-heart-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2px;
}

.tool-card .rating {
    font-size: 14px;
    font-weight: 600;
    color: #f6ad55;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tool-card .rating .number {
    color: var(--text-light);
    font-weight: 500;
}

body.dark .tool-card .rating .number {
    color: var(--text-dark);
}

.tool-card .favorite-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    color: #94a3b8;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.tool-card .favorite-btn:hover {
    transform: scale(1.15);
}

.tool-card .favorite-btn.saved {
    color: #ef4444 !important;
}

/* ----- Card Actions (Review + Blog Buttons) ----- */
.tool-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    pointer-events: none;
    position: relative;
    z-index: 5;
}

.tool-card .card-actions a {
    pointer-events: auto;
    position: relative;
    z-index: 6;
}

.tool-card .btn-review,
.tool-card .btn-blog {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    border: 1px solid transparent;
    cursor: pointer;
}

.tool-card .btn-review {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    border-color: rgba(59, 130, 246, 0.2);
}

.tool-card .btn-review:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.tool-card .btn-blog {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.2);
}

.tool-card .btn-blog:hover {
    background: #8b5cf6;
    color: white;
    transform: translateY(-2px);
}

body.dark .tool-card .btn-review {
    background: rgba(59, 130, 246, 0.2);
}

body.dark .tool-card .btn-blog {
    background: rgba(139, 92, 246, 0.2);
}

/* ----- Empty State ----- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

body.dark .empty-state {
    color: #94a3b8;
}

.empty-state strong {
    color: var(--text-light);
}

body.dark .empty-state strong {
    color: var(--text-dark);
}

/* ============================================
   POPUP (MODAL)
   ============================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: var(--card-light);
    border-radius: 28px;
    max-width: 820px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 28px 32px 32px;
    position: relative;
    animation: slideUp 0.35s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

body.dark .popup-content {
    background: var(--card-dark);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.popup-tool-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
}

.popup-title-area {
    flex: 1;
}

.popup-title-area h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-light);
}

body.dark .popup-title-area h2 {
    color: var(--text-dark);
}

.popup-title-area p {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

body.dark .popup-title-area p {
    color: #94a3b8;
}

.popup-rating {
    margin-top: 6px;
}

.popup-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 0 4px;
    flex-shrink: 0;
}

.popup-close:hover {
    color: var(--primary);
}

/* ----- Popup Tabs ----- */
.popup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}

body.dark .popup-tabs {
    border-bottom-color: var(--border-dark);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.2s;
}

body.dark .tab-btn {
    color: #94a3b8;
}

.tab-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* ----- Popup Tab Content ----- */
.popup-tab-content {
    min-height: 180px;
    margin-bottom: 16px;
}

.popup-tab-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-light);
}

body.dark .popup-tab-content h3 {
    color: var(--text-dark);
}

.popup-tab-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-tab-content ul li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark .popup-tab-content ul li {
    border-bottom-color: var(--border-dark);
    color: var(--text-dark);
}

.popup-tab-content ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: 700;
}

.popup-tab-content .pros-list li::before {
    content: "✅";
}

.popup-tab-content .cons-list li::before {
    content: "❌";
}

/* ----- Read Full Review Button in Popup ----- */
.btn-review-full {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: #ffffff !important;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-review-full:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* ----- Popup Actions Layout ----- */
.popup-actions-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.popup-actions-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ----- Popup Actions ----- */
.popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
    margin-top: 8px;
}

body.dark .popup-actions {
    border-top-color: var(--border-dark);
}

.popup-favorite-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}

body.dark .popup-favorite-btn {
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.popup-favorite-btn.saved {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #1a1a2e;
}

.popup-affiliate-btn {
    background: var(--primary);
    color: white;
    padding: 10px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.2s;
}

.popup-affiliate-btn:hover {
    background: var(--primary-dark);
}

/* ----- Promo Popup ----- */
.promo-popup {
    max-width: 480px;
    text-align: center;
}

.promo-popup .popup-header {
    justify-content: space-between;
    align-items: center;
}

.promo-popup .popup-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.promo-code-box {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    border: 2px dashed var(--primary);
}

body.dark .promo-code-box {
    background: var(--bg-dark);
}

.promo-code-box .code {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    word-break: break-all;
}

.promo-code-box .discount {
    font-size: 16px;
    color: #10b981;
    font-weight: 600;
    margin-top: 4px;
}

.promo-code-box .expiry {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

body.dark .promo-code-box .expiry {
    color: #94a3b8;
}

.promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.btn-copy-code {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy-code:hover {
    background: var(--primary-dark);
}

.btn-claim-offer {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-claim-offer:hover {
    background: #059669;
}

/* ----- Comparison ----- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 12px;
}

.comparison-item {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

body.dark .comparison-item {
    background: var(--bg-dark);
}

.comparison-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.comparison-item .price {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
}

/* ----- Favorites Section ----- */
.favorites-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--border-light);
}

body.dark .favorites-section {
    border-top-color: var(--border-dark);
}

.favorites-section .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.favorites-section .section-header h2 {
    margin-bottom: 2px;
}

.favorites-subtitle {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
}

body.dark .favorites-subtitle {
    color: #94a3b8;
}

.favorites-section .section-header .btn-share-favorites {
    margin-top: 4px;
    margin-left: 0;
}

.btn-share-favorites {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share-favorites:hover {
    background: var(--primary);
    color: white;
}

/* ----- Subcategories Bar (for category page) ----- */
.subcategories-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

body.dark .subcategories-bar {
    border-bottom-color: var(--border-dark);
}

.subcategory-link {
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid transparent;
}

body.dark .subcategory-link {
    color: #94a3b8;
}

.subcategory-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.subcategory-link.active {
    background: var(--primary);
    color: white;
}

/* ----- Back Button ----- */
.btn-back {
    display: inline-block;
    padding: 10px 28px;
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-back svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

/* ----- Section Header ----- */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 32px;
}

.section-header-icon {
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-light);
}

body.dark .section-header h2 {
    color: var(--text-dark);
}

.section-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

body.dark .section-header p {
    color: #94a3b8;
}

/* ============================================
   FEATURE CARDS - STYLES
   ============================================ */

/* Feature card container */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Individual feature card */
.feature-card {
    background: var(--bg-light);
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.dark .feature-card {
    background: var(--bg-dark);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card .feature-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.feature-card .feature-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    display: block;
    margin-bottom: 2px;
}

body.dark .feature-card .feature-name {
    color: var(--text-dark);
}

.feature-card .feature-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

body.dark .feature-card .feature-desc {
    color: #94a3b8;
}

/* Key benefits section */
.key-benefits {
    margin-top: 16px;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

body.dark .key-benefits {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
}

.key-benefits .benefits-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.key-benefits .benefits-icon {
    font-size: 18px;
}

.key-benefits .benefits-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

body.dark .key-benefits .benefits-title {
    color: var(--text-dark);
}

.key-benefits .benefits-text {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

body.dark .key-benefits .benefits-text {
    color: #94a3b8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .popup-content {
        padding: 20px 16px;
        max-height: 94vh;
    }
    .popup-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .popup-tabs {
        justify-content: center;
    }
    .tab-btn {
        font-size: 13px;
        padding: 6px 14px;
    }
    .popup-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .popup-actions .popup-affiliate-btn {
        text-align: center;
    }
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    .promo-popup {
        max-width: 100%;
    }
    .promo-code-box .code {
        font-size: 22px;
    }
    .category-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    .category-icon-wrapper svg {
        width: 28px;
        height: 28px;
    }
    .subcategories-bar {
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    .tool-card {
        padding: 22px 14px 18px;
    }

    .tool-card .tool-image-wrapper {
        width: 68px;
        height: 68px;
        padding: 8px;
        margin-bottom: 14px;
    }

    .tool-card .tool-image-wrapper img,
    .tool-card .tool-image-wrapper svg {
        width: 40px;
        height: 40px;
    }

    .tool-card .tool-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .tool-card .category-tag {
        font-size: 10px;
        padding: 3px 10px;
        margin-bottom: 4px;
    }

    .tool-card .favorite-btn {
        font-size: 18px;
    }

    .search-bar-wrapper {
        padding: 16px;
    }
    
    .search-bar {
        flex-wrap: wrap;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .search-filters {
        flex-wrap: wrap;
    }
    
    .tool-count {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    /* Feature cards responsive */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .feature-card {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 16px 12px;
    }
    .popup-tabs {
        gap: 4px;
    }
    .tab-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
    .category-icon-wrapper {
        width: 52px;
        height: 52px;
    }
    .category-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }

    .tool-card {
        padding: 16px 10px 14px;
        border-radius: 14px;
    }

    .tool-card .tool-image-wrapper {
        width: 56px;
        height: 56px;
        padding: 6px;
        margin-bottom: 12px;
    }

    .tool-card .tool-image-wrapper img,
    .tool-card .tool-image-wrapper svg {
        width: 32px;
        height: 32px;
    }

    .tool-card .tool-name {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .tool-card .category-tag {
        font-size: 9px;
        padding: 2px 8px;
        margin-bottom: 4px;
    }

    .tool-card .favorite-btn {
        font-size: 16px;
        padding: 2px 4px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .category-card {
        padding: 20px 12px 18px;
        min-height: 160px;
    }
    
    .category-card h3 {
        font-size: 15px;
    }
    
    .category-card p {
        font-size: 12px;
    }

    /* Feature cards responsive */
    .feature-card {
        padding: 10px 12px;
    }
    
    .feature-card .feature-name {
        font-size: 13px;
    }
    
    .feature-card .feature-desc {
        font-size: 12px;
    }
    
    .key-benefits {
        padding: 12px 14px;
    }
}