/* Products Page Styles */
.products-page-section {
    background: #ffffff;
    min-height: 80vh;
    padding: 40px 0;
}

.products-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: left;
}

.products-controls {
    margin-bottom: 20px;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.filter-btn:hover {
    border-color: #dee2e6;
    background: #e9ecef;
}

.filter-btn.active {
    border-color: #ff6b35;
    background: #fff5f2;
    color: #ff6b35;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.sort-dropdown {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    min-width: 200px;
}

.results-info {
    margin-bottom: 30px;
}

.results-count {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

.products-container {
    min-height: 400px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: #f8f9fa;
}

.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-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff6b35;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.out-of-stock {
    background: #dc3545;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 50px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-add-cart, .btn-view-detail {
    flex: 1;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn-add-cart:hover, .btn-view-detail:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-add-cart:active {
    transform: translateY(0);
    background: #d44a1a;
}

/* No Results Styles */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    margin-bottom: 30px;
}

.search-icon {
    display: inline-block;
    position: relative;
}

.magnifying-glass {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
}

.lens {
    width: 50px;
    height: 50px;
    border: 4px solid #4285f4;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 15px;
}

.handle {
    width: 4px;
    height: 30px;
    background: #9c27b0;
    position: absolute;
    bottom: -10px;
    right: 5px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.no-results-text h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-results-text p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* Filter Dropdowns */
.filter-dropdowns {
    position: relative;
}

.filter-dropdown {
    position: fixed;
    top: auto;
    left: auto;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    min-width: 300px;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.filter-dropdown.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Mobile Dropdown Override */
@media (max-width: 768px) {
    .filter-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        min-width: 280px !important;
        z-index: 10000 !important;
        transform: translateY(-50%) !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .filter-dropdown.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(-50%) !important;
    }
}

.filter-content {
    padding: 20px;
}

.filter-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b35;
    cursor: pointer;
}

.filter-option span {
    font-size: 14px;
    color: #495057;
}

.price-range {
    margin-top: 15px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
}

.btn-apply-price {
    width: 100%;
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-apply-price:hover {
    background: #e55a2b;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #34495e;
    transform: translateY(-2px);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
    grid-column: 1 / -1;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Skeleton Loading */
.skeleton-loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f3f4;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-price {
    height: 24px;
    width: 80px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 15px;
}

.skeleton-button {
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cart Badge Styles */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    animation: cartBadgePulse 0.3s ease-out;
}

@keyframes cartBadgePulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Cart Animation */
@keyframes cartAnimation {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-buttons {
        display: flex;
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 80px;
        padding: 10px 12px;
        font-size: 12px;
        text-align: center;
    }
    
    .sort-section {
        display: none !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .product-card {
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 12px;
        min-height: 32px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .product-price {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .btn-add-cart {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .stock-badge {
        padding: 4px 8px;
        font-size: 10px;
        top: 8px;
        right: 8px;
    }
    
    .page-title {
        font-size: 2rem;
        text-align: center;
    }
    
}

@media (max-width: 480px) {
    .filters-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-buttons {
        display: flex;
        flex-direction: row;
        gap: 6px;
        justify-content: space-between;
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 70px;
        padding: 8px 6px;
        font-size: 11px;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 100px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-title {
        font-size: 11px;
        min-height: 28px;
        margin-bottom: 4px;
    }
    
    .product-price {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .btn-add-cart {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .stock-badge {
        padding: 3px 6px;
        font-size: 9px;
        top: 6px;
        right: 6px;
    }
    
}

