/* Modern Categories Page - Dark Theme */

/* Search Section */
.categories-search-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 80px 20px 60px;
    margin-bottom: 0;
}

.categories-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.categories-title {
    font-size: 36px;
    font-weight: 400;
    color: #f1f5f9;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.categories-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    font-weight: 300;
}

/* Random Products Section */
.random-products-section {
    background: #1e293b;
    padding: 32px 20px;
    margin-bottom: 0;
}

.random-products-header {
    text-align: center;
    margin-bottom: 20px;
}

.random-products-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: #f1f5f9;
    margin: 0;
    letter-spacing: -0.3px;
}

.random-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.random-product-card {
    background: #334155;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    border: 1px solid #475569;
}

.random-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.2);
    text-decoration: none;
    border-color: #14b8a6;
}

.random-product-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.random-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.random-product-card:hover .random-product-image img {
    transform: scale(1.03);
}

/* Modern camera icon placeholder */
.random-product-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder-icon {
    font-size: 48px;
    color: rgba(20, 184, 166, 0.3);
    pointer-events: none;
}


.random-product-info {
    padding: 10px;
}

.random-product-title {
    font-size: 13px;
    font-weight: 400;
    color: #e2e8f0;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.random-product-price {
    font-size: 15px;
    font-weight: 500;
    color: #14b8a6;
    margin: 0;
}

/* Categories Grid Section */
.categories-grid-section {
    background: #0f172a;
    padding: 60px 20px 80px;
    margin-bottom: 0;
}

.categories-grid-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 32px;
}

.category-item {
    background: #1e293b;
    padding: 32px 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.category-item-alt {
    background: #0f172a;
    padding: 32px 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.category-item:hover,
.category-item-alt:hover {
    background: #334155;
    border-color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.category-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon-wrapper,
.category-item-alt:hover .category-icon-wrapper {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(20, 184, 166, 0.3);
}

.category-icon-wrapper i {
    font-size: 36px;
    color: white;
}

.category-icon-wrapper img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.category-icon {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
}

.category-item h2,
.category-item-alt h2 {
    font-size: 15px;
    font-weight: 400;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .categories-search-section {
        padding: 60px 20px 40px;
    }

    .categories-title {
        font-size: 28px;
    }

    .categories-subtitle {
        font-size: 14px;
    }

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

    .random-product-image {
        height: 140px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-item,
    .category-item-alt {
        min-height: 140px;
        padding: 24px 12px;
    }

    .category-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .category-icon-wrapper i {
        font-size: 28px;
    }

    .category-item h2,
    .category-item-alt h2 {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .categories-title {
        font-size: 24px;
    }

    .random-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

