/* Main Products Page - Larger Categories & Better Readability */

.products-hero {
    position: relative;
    height: 45vh;
    min-height: 380px;
    width: 100%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.03) 50px,
            transparent 60px,
            #021334 30%,
            #051024 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.products-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(3, 185, 200, 0.12), transparent 70%);
}

.products-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
}

.products-hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.products-hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Categories Section */
.all-categories-section {
    padding: 5rem 2rem;
    background: #f8f9fc;
}

.categories-container {
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.section-line {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #03b9c8, #84cc16);
    margin: 0 auto 1rem;
    border-radius: 4px;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Categories Grid - All in one line on desktop */
.categories-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0.5rem;
}

/* Category Card - Larger size */
.category-card {
    background: transparent;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    width: 140px;
}

.category-card:hover {
    transform: translateY(-8px);
}

/* Circular Image Wrapper - Bigger */
.category-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f8f9fc);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Fat Border Effect - Thicker */
.category-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #03b9c8, #84cc16);
    z-index: -1;
    transition: all 0.3s ease;
}

.category-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f8f9fc);
    z-index: 0;
}

.category-card:hover .category-circle::before {
    inset: -7px;
    background: linear-gradient(135deg, #84cc16, #03b9c8);
}

/* Inner Content - Bigger icons */
.category-icon-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

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

.category-icon-wrapper i {
    font-size: 3.5rem;
    color: #03b9c8;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon-wrapper i {
    transform: scale(1.1);
    color: #84cc16;
}

/* Category Name - Larger & Readable */
.category-card h3 {
    font-family: var(--font-nav);
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

.category-card:hover h3 {
    color: #03b9c8;
}

/* Featured Products */
.featured-products {
    padding: 5rem 2rem;
    background: white;
}

.featured-container {
    max-width: 1400px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

/* Product Card - Larger */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e8ecf2;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #03b9c8;
}

.product-image {
    height: 260px;
    background: linear-gradient(135deg, #f5f7fc, #e8ecf2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #03b9c8, #059eaa);
    color: white;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 25px;
    font-weight: 500;
    z-index: 2;
}

.product-info {
    padding: 1.2rem;
}

.product-info h3 {
    font-family: var(--font-nav);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #1a1a2e;
    line-height: 1.3;
}

.product-category {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.6rem;
    letter-spacing: 0.3px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #03b9c8;
    margin-bottom: 1rem;
}

.view-detail-btn {
    width: 100%;
    background: transparent;
    border: 1.5px solid #03b9c8;
    color: #03b9c8;
    padding: 0.6rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-detail-btn:hover {
    background: #03b9c8;
    color: white;
    gap: 0.8rem;
}

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

/* Desktop (1200px+) - All categories in one line */
@media (min-width: 1200px) {
    .categories-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2.2rem;
    }

    .category-card {
        width: 170px;
    }

    .category-circle {
        width: 160px;
        height: 160px;
    }

    .category-icon-wrapper i {
        font-size: 4rem;
    }

    .category-card h3 {
        font-size: 0.95rem;
    }

    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Laptop (992px - 1200px) */
@media (max-width: 1200px) {
    .categories-grid {
        gap: 1.8rem;
    }

    .category-card {
        width: 130px;
    }

    .category-circle {
        width: 110px;
        height: 110px;
    }

    .category-icon-wrapper i {
        font-size: 3rem;
    }

    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.8rem;
    }

    .product-image {
        height: 230px;
    }
}

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .products-hero-content h1 {
        font-size: 2.5rem;
    }

    .products-hero-content p {
        font-size: 1rem;
    }

    .categories-grid {
        gap: 1.5rem;
    }

    .category-card {
        width: 120px;
    }

    .category-circle {
        width: 100px;
        height: 100px;
    }

    .category-icon-wrapper i {
        font-size: 2.8rem;
    }

    .category-card h3 {
        font-size: 0.8rem;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-image {
        height: 200px;
    }
}

/* Mobile (under 768px) - 2 categories per line with bigger size */
@media (max-width: 768px) {
    .all-categories-section {
        padding: 3rem 1rem;
    }

    .featured-products {
        padding: 3rem 1rem;
    }

    .products-hero {
        height: 35vh;
        min-height: 300px;
    }

    .products-hero-content h1 {
        font-size: 1.8rem;
    }

    .products-hero-content p {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    /* 2 categories per line on mobile - BIGGER */
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0.5rem;
    }

    .category-card {
        width: 100%;
        padding: 0.8rem;
    }

    .category-circle {
        width: 130px;
        height: 130px;
        margin: 0 auto 1rem;
    }

    .category-icon-wrapper i {
        font-size: 3.5rem;
    }

    .category-card h3 {
        font-size: 0.9rem;
        margin-top: 0.8rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-image {
        height: 240px;
    }

    .product-info h3 {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }
}

/* Small Mobile (480px - 640px) - Still 2 per line but optimized */
@media (max-width: 640px) and (min-width: 480px) {
    .category-circle {
        width: 110px;
        height: 110px;
    }

    .category-icon-wrapper i {
        font-size: 3rem;
    }

    .category-card h3 {
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile (under 480px) - 2 per line, slightly smaller */
@media (max-width: 480px) {
    .products-hero {
        height: 30vh;
        min-height: 260px;
    }

    .products-hero-content h1 {
        font-size: 1.5rem;
    }

    .products-hero-content p {
        font-size: 0.8rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .categories-grid {
        gap: 1rem;
    }

    .category-circle {
        width: 100px;
        height: 100px;
    }

    .category-icon-wrapper i {
        font-size: 2.8rem;
    }

    .category-card h3 {
        font-size: 0.75rem;
    }

    .product-image {
        height: 200px;
    }
}

/* Very Small Mobile (under 380px) */
@media (max-width: 380px) {
    .category-circle {
        width: 90px;
        height: 90px;
    }

    .category-icon-wrapper i {
        font-size: 2.5rem;
    }

    .category-card h3 {
        font-size: 0.7rem;
    }

    .product-info h3 {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .view-detail-btn {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

/* No horizontal scroll - categories wrap naturally */
.categories-grid {
    overflow-x: visible;
    flex-wrap: wrap;
}

/* Animation for hero */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.products-hero-content {
    animation: fadeInUp 0.8s ease-out;
}


/* Remove old loading indicator */
.loading {
    display: none !important;
}

/* Make sure categories grid is ready */
.categories-grid {
    min-height: 200px;
}

/* Category card animations */
.category-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for category cards */
.category-card:nth-child(1) {
    animation-delay: 0.05s;
}

.category-card:nth-child(2) {
    animation-delay: 0.1s;
}

.category-card:nth-child(3) {
    animation-delay: 0.15s;
}

.category-card:nth-child(4) {
    animation-delay: 0.2s;
}

.category-card:nth-child(5) {
    animation-delay: 0.25s;
}

.category-card:nth-child(6) {
    animation-delay: 0.3s;
}

.category-card:nth-child(7) {
    animation-delay: 0.35s;
}

.category-card:nth-child(8) {
    animation-delay: 0.4s;
}

.category-card:nth-child(9) {
    animation-delay: 0.45s;
}

.category-card:nth-child(10) {
    animation-delay: 0.5s;
}

.category-card:nth-child(11) {
    animation-delay: 0.55s;
}