* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    line-height: 1.4;
}

/* Container */
.container-fluid {
    padding: 0 16px;
}

/* Categories Section */
.categories-section {
    background: white;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.categories-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 16px;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.categories-list {
    display: flex;
    gap: 16px;
    min-width: fit-content;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 12px;
}

.category-item:hover {
    transform: translateY(-2px);
    background: #f8f9fa;
}

.category-item.active {
    background: #fff5f5;
}

.category-image {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f0f0f0;
}

.category-item.active .category-image {
    border-color: #007c85;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-item.active .category-name {
    color: #007c85;
}

/* Products Section */

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover,
.product-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Product badges */
.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff3333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.product-badge.discount {
    background: #ff3333;
}

.product-badge.new {
    background: #10b981;
}

.product-badge.trending {
    background: #8b5cf6;
}

.product-info {
    padding: 12px;
}

.product-stats {
    font-size: 9px;
    color: #007c85;
    margin-bottom: 6px;
    font-weight: 500;
}

.product-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.current-price {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.original-price {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-stars {
    color: #fbbf24;
    font-size: 10px;
}

.rating-count {
    font-size: 9px;
    color: #666;
}

/* Loading */
.products-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007c85;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.products-loading p {
    color: #666;
    font-size: 14px;
}

/* No products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin: 20px 0;
}

.no-products i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.no-products h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.no-products p {
    color: #666;
    font-size: 14px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Responsive */
@media (max-width: 375px) {
    .container-fluid {
        padding: 0 12px;
    }
    
    .categories-scroll {
        padding: 0 12px;
    }
    
    .categories-list {
        gap: 12px;
    }
    
    .category-image {
        width: 50px;
        height: 50px;
    }
    
    .category-name {
        font-size: 10px;
        max-width: 56px;
    }
    
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 8px;
    }
}

/* Animation for new products */
.product-card.new-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-page {
    background: white;
}

/* Header */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn, .header-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.back-btn:hover, .header-action:hover {
    background: #e9ecef;
}

.header-action .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff3333;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categories-section .categories-scroll {
    padding: 4px 17px;
}

.category-item[data-category="all"] .category-image i {
    font-size: 24px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}