/* Products Page Styles */

/* Page Header */
.products-header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.products-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fbbf24' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.products-header .container {
    position: relative;
    z-index: 1;
}

.products-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.products-header .header-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
}

.products-header .breadcrumb {
    margin-bottom: 1.5rem;
}

.products-header .breadcrumb a,
.products-header .breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
}

.products-header .breadcrumb a:hover {
    color: #fbbf24;
}

.products-header .breadcrumb span:last-child {
    color: #fbbf24;
}

/* Category Banner */
.category-banner {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.category-image {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-image svg {
    width: 48px;
    height: 48px;
    color: #fbbf24;
}

.category-info h1 {
    margin-bottom: 0.5rem;
}

.product-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

/* Products Section */
.products-section {
    padding: 0 0 4rem;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Sidebar */
.products-sidebar {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.25rem;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.category-list a:hover {
    background: #f7fafc;
    color: #1a202c;
}

.category-list a.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a202c;
    font-weight: 600;
}

.category-list .count {
    background: #edf2f7;
    color: #718096;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

.category-list a.active .count {
    background: rgba(0, 0, 0, 0.15);
    color: #1a202c;
}

/* Filter Section */
.filter-group {
    margin-bottom: 1.25rem;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #4a5568;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #fbbf24;
}

/* Products Main */
.products-main {
    min-height: 400px;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.results-info {
    color: #718096;
    font-size: 0.95rem;
}

.results-info strong {
    color: #1a202c;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    background: white;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle button {
    background: white;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #a0aec0;
    transition: all 0.2s ease;
}

.view-toggle button:hover,
.view-toggle button.active {
    background: #fbbf24;
    color: #1a202c;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.product-card .product-image {
    position: relative;
    aspect-ratio: 1;
    background: #f7fafc;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-card .product-image .product-icon {
    width: 64px;
    height: 64px;
    color: #cbd5e0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-featured {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a202c;
}

.badge-sale {
    background: #f56565;
    color: white;
}

.badge-new {
    background: #48bb78;
    color: white;
}

.product-quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: #fbbf24;
    color: #1a202c;
}

.quick-action-btn svg {
    width: 18px;
    height: 18px;
}

.product-card .product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: #fbbf24;
}

.product-description {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.15rem;
}

.stars svg {
    width: 14px;
    height: 14px;
    color: #fbbf24;
    fill: #fbbf24;
}

.stars svg.empty {
    color: #e2e8f0;
    fill: #e2e8f0;
}

.rating-count {
    font-size: 0.8rem;
    color: #a0aec0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.current-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
}

.original-price {
    font-size: 1rem;
    color: #a0aec0;
    text-decoration: line-through;
}

.discount-percent {
    background: rgba(245, 101, 101, 0.1);
    color: #f56565;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-actions .btn svg {
    width: 18px;
    height: 18px;
}

.product-actions .btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a202c;
    border: none;
}

.product-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.product-actions .btn-outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.product-actions .btn-outline:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination li a:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.pagination li.active span {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: transparent;
    color: #1a202c;
}

.pagination li.disabled span {
    color: #cbd5e0;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .products-header {
        padding: 3rem 0;
    }
    
    .products-header h1 {
        font-size: 1.75rem;
    }
    
    .category-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .products-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .view-options {
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
}
