

/* Additional styles for best seller feature */
.best-seller-card {
    border: 2px solid #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

.badge-best-seller {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    font-weight: bold;
}

.stat-best-seller {
    color: #ff6b6b;
    font-weight: bold;
}

.sales-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.sales-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.overlay-sales {
    margin-top: 10px;
    color: #ddd;
    font-size: 12px;
}

.inline-sales-stats {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #eee;
}

.sales-info {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-count {
    font-size: 11px;
    color: #28a745;
    margin-right: 5px;
}

.sort-tag {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
}
/* Page Layout */
.products-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
}

/* Breadcrumb */
.breadcrumb-section {
    padding: 20px 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--primary-color);
}

.breadcrumb-link i {
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-item i {
    font-size: 0.9rem;
}

.stat-item span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Active Filters */
.active-filters {
    background: white;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filters-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.clear-all-filters {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-all-filters:hover {
    color: #c0392b;
}

.filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}

.filter-tag:hover {
    background: rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.filter-tag.search-tag {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
    border-color: rgba(231, 76, 60, 0.2);
}

.filter-tag.search-tag:hover {
    background: rgba(231, 76, 60, 0.15);
}

.tag-icon {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.tag-text {
    white-space: nowrap;
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
}

.tag-remove:hover {
    opacity: 1;
}

/* Page Controls */
.page-controls {
    margin: 30px 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.results-info {
    flex: 1;
}

.results-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.count-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.count-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sorting-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.sort-select-wrapper {
    position: relative;
    min-width: 200px;
}

.sort-select {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.sort-select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 40px auto;
}

.empty-state-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 25px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.empty-state-actions .btn {
    min-width: 180px;
    padding: 12px 24px;
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    margin: 40px 0 60px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card.product-unavailable {
    opacity: 0.7;
}

.product-card.product-unavailable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.6);
    z-index: 5;
    pointer-events: none;
    border-radius: var(--radius-lg);
}

/* Product Image */
.product-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-offer {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: white;
}

.badge-soldout {
    background: rgba(108, 117, 125, 0.95);
    color: white;
}

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.product-card:hover .overlay-content {
    transform: translateY(0);
}

.btn-overlay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-overlay:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.05);
}

/* Product Info */
.product-info {
    padding: 20px;
}

.product-category {
    margin-bottom: 8px;
}

.category-text {
    display: inline-block;
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    margin-bottom: 12px;
}

.title-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.title-link:hover {
    color: var(--secondary-color);
}

/* Colors */
.product-colors {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.colors-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.colors-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.color-dot:hover {
    transform: scale(1.15);
}

/* Price */
.product-price {
    margin-bottom: 15px;
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.final-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
}

.final-price.single-price {
    font-size: 0.9rem;
}

.discount-percent {
    position: absolute;
    top: 15px;
    right: 10px;
    background: var(--success-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Availability */
.product-availability {
    margin-bottom: 15px;
}

.availability-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.availability-status.in-stock {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.availability-status.out-of-stock {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

/* Action Button */
.product-action {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-view-product {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-product:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-view-product i {
    font-size: 0.9rem;
}

/* Pagination */
.pagination-section {
    margin: 60px 0 40px;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.page-item.disabled .page-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    border-color: var(--border-color);
    transform: none;
}

.page-prev, .page-next {
    min-width: 100px;
}

.page-prev i, .page-next i {
    font-size: 0.8rem;
}

.page-ellipsis {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
}

.page-ellipsis:hover {
    background: transparent;
    color: var(--text-muted);
    transform: none;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .page-title {
        font-size: 2.4rem;
    }
    
    .products-grid .col-xl-3 {
        width: 25%;
    }
}

@media (max-width: 992px) {
    .page-header {
        padding: 50px 0;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .products-grid .col-lg-4 {
        width: 33.333%;
    }
    
    .pagination-wrapper {
        justify-content: center;
    }
    
    .page-info {
        text-align: center;
        width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .stat-item {
        width: fit-content;
    }
    
    .products-grid .col-md-6 {
        width: 50%;
    }
    
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .sorting-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-select-wrapper {
        min-width: 100%;
    }
    
    .empty-state-actions {
        flex-direction: column;
    }
    
    .empty-state-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 30px 0;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .products-grid .col-12 {
        width: 100%;
    }
    
    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .clear-all-filters {
        align-self: flex-end;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-prev, .page-next {
        min-width: 80px;
    }
}

/* Animation for product cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }
.product-card:nth-child(7) { animation-delay: 0.6s; }
.product-card:nth-child(8) { animation-delay: 0.7s; }

/* Loading state for filters */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}