 /* ===== Categories Page Styles ===== */
@import 'common.css';

/* Main Container */
.categories-page {
    background-color: #F9FAFB;
    min-height: 100vh;
}

/* Header */
.page-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
}

.page-header .back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-header .back-btn i {
    font-size: 24px;
    color: #171716;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #171716;
    flex: 1;
    text-align: center;
    margin: 0;
}

.page-header .cart-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.page-header .cart-btn i {
    font-size: 24px;
    color: #171716;
}

.page-header .cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f59207;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.page-header .cart-badge span {
    color: #f5f3f0;
    font-size: 10px;
    font-weight: 700;
}

/* Search Section */
.search-section {
    background-color: #FFFFFF;
    padding: 0 20px 16px 20px;
    border-bottom: 1px solid #F3F4F6;
}

.search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #F8FAFC;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid #E2E8F0;
}

.search-container i {
    font-size: 20px;
    color: #64748B;
}

.search-container input {
    flex: 1;
    font-size: 16px;
    color: #171716;
    margin-left: 12px;
    border: none;
    background: transparent;
    outline: none;
}

.search-container .clear-search {
    cursor: pointer;
    padding: 4px;
}

.search-container .clear-search i {
    font-size: 16px;
    color: #64748B;
}

/* Categories Section */
.categories-section {
    padding: 12px 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    min-height: 80px;
    display: block;
}

/* Content wrapper */
.content {
    display: block;
    min-height: 200px;
}

.categories-scroll {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

/* Category Item - Matching Mobile App */
.category-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #F9FAFB;
    border-radius: 12px;
    padding: 8px;
    margin-right: 4px;
    width: 140px;
    height: 55px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.category-item:hover {
    background-color: #f4f5f2;
}

.category-item.active {
    background-color: #f4f5f2;
    border-color: #f59207;
}

.category-image-container {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 6px;
    background-color: #F3F4F6;
    flex-shrink: 0;
}

.category-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.category-name {
    font-size: 11px;
    font-weight: 600;
    color: #171716;
    margin-bottom: 1px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.category-item.active .category-name {
    color: #f59207;
}

.category-badge {
    background-color: #f59207;
    border-radius: 8px;
    padding: 1px 4px;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-count {
    font-size: 11px;
    color: #FFFFFF;
    font-weight: 600;
    text-align: center;
}

/* Brands Section */
.brands-section {
    padding: 8px 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    max-width: 100%;
    overflow-x: auto;
}

.brands-scroll {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 0 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.brands-scroll::-webkit-scrollbar {
    height: 4px;
}

.brands-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.brands-scroll::-webkit-scrollbar-thumb {
    background: #f59207;
    border-radius: 2px;
}

.brand-btn {
    background-color: #FFF7ED;
    padding: 6px 10px;
    border-radius: 4px;
    margin-right: 6px;
    border: 1px solid #FFEDD5;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.brand-btn:hover {
    background-color: #FFEDD5;
}

.brand-btn.active {
    background-color: #FFEDD5;
    border-color: #f59207;
    border-width: 2px;
}

.brand-btn span {
    font-size: 12px;
    font-weight: 600;
    color: #f59207;
}

.brand-btn.active span {
    color: #EA580C;
    font-weight: 700;
}

/* Products Section */
.products-section {
    flex: 1;
    background-color: #FFFFFF;
}

.section-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    max-width: 100%;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #171716;
}

.clear-filter {
    font-size: 14px;
    color: #f59207;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
}

.clear-filter:hover {
    text-decoration: underline;
}

/* Progress Bar */
.progress-section {
    padding: 8px 12px;
    background-color: #FFFFFF;
    max-width: 100%;
}

.progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-bg {
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #f59207;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-status {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.progress-status.loading {
    color: #6B7280;
    font-size: 13px;
    font-weight: 500;
}

.progress-status.loading i {
    font-size: 16px;
    color: #f59207;
}

.progress-status.complete {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    justify-content: center;
    background-color: #D1FAE5;
    padding: 6px 12px;
    border-radius: 20px;
    align-self: center;
}

.progress-status.complete i {
    font-size: 20px;
    color: #10B981;
}

.progress-status.complete span {
    font-size: 13px;
    color: #10B981;
    font-weight: 600;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    flex: 1;
}

.loading-container i {
    font-size: 48px;
    color: #f59207;
    margin-bottom: 16px;
}

.loading-container .loading-text {
    font-size: 16px;
    color: #6B7280;
    margin-top: 0;
}

.loading-container .loading-subtext {
    font-size: 14px;
    color: #94A3B8;
    margin-top: 8px;
    text-align: center;
}

/* Products Grid */
.products-scroll-view {
    flex: 1;
}

.products-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 12px;
}

/* Product Card - Matching index.html styles */
.product-card {
    background: #FFFFFF;
    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;
    display: block;
    width: calc(50% - 6px);
}

@media (min-width: 480px) {
    .product-card {
        width: calc(33.333% - 8px);
    }
}

@media (min-width: 768px) {
    .product-card {
        width: calc(25% - 9px);
    }
}

@media (min-width: 1024px) {
    .product-card {
        width: calc(20% - 9.6px);
    }
}

@media (min-width: 1440px) {
    .product-card {
        width: calc(16.666% - 10px);
    }
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card .product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f8f9fa;
}

.product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-card .product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1;
}

.product-card .product-wishlist i {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s ease;
}

.product-card .product-wishlist:hover i,
.product-card .product-wishlist.active i {
    color: #EF4444;
}

.product-card .product-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EF4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-card .product-info {
    padding: 16px;
}

.product-card .product-brand {
    font-size: 12px;
    color: #f59207;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-card .product-title {
    font-size: 14px;
    font-weight: 600;
    color: #171716;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.product-card .product-rating i {
    color: #FBBF24;
    font-size: 13px;
}

.product-card .product-rating span {
    font-size: 13px;
    color: #64748B;
}

.product-card .product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-card .product-price {
    font-size: 18px;
    font-weight: 700;
    color: #171716;
}

.product-card .product-original-price {
    font-size: 14px;
    color: #94A3B8;
    text-decoration: line-through;
}

/* Add to Cart Button - Matching index.html exactly */
.product-card .add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    background: white;
    color: #171716;
    border-radius: 35px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    border: 2px solid #171716;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card .add-to-cart-btn:hover {
    background: #171716;
    color: white;
}

/* Empty State */
.category-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
}

.category-empty-state i {
    font-size: 64px;
    color: #D1D5DB;
    margin-bottom: 16px;
}

.category-empty-state .empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #171716;
    margin-top: 16px;
    margin-bottom: 8px;
}

.category-empty-state .empty-text {
    font-size: 16px;
    color: #6B7280;
    text-align: center;
    margin-bottom: 24px;
}

/* Suggestions Section */
.suggestions-section {
    width: 100%;
    margin-top: 20px;
}

.suggestions-title {
    font-size: 18px;
    font-weight: 600;
    color: #171716;
    margin-bottom: 16px;
    text-align: center;
}

.suggestions-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .category-item {
        width: 120px;
        height: 50px;
        padding: 6px;
    }
    
    .category-image-container {
        width: 30px;
        height: 30px;
    }
    
    .category-name {
        font-size: 10px;
    }
}
