/* Latest Devices Page Specific Styles */

/* Enhanced Navigation Cart Counter */
.nav-cart {
    position: relative;
}

.cart-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: 10px;
    background: #febd69;
    color: #0f1111;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 10px 20px;
    background: #f3f3f3;
    font-size: 14px;
    color: #565959;
    border-bottom: 1px solid #ddd;
}

.breadcrumb a {
    color: #007185;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #c7511f;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 8px;
    color: #888;
}

.breadcrumb .current {
    color: #0f1111;
    font-weight: 600;
}

/* Page Header */
.page-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 8px;
}

.result-count {
    font-size: 14px;
    color: #565959;
}

.result-count span {
    font-weight: 600;
    color: #0f1111;
}

/* Main Container Layout */
.main-container {
    display: flex;
    max-width: 1500px;
    margin: 0 auto;
    gap: 20px;
    padding: 0 20px;
    background: #f7f8f8;
    min-height: calc(100vh - 300px);
}

/* Filters Sidebar */
.filters-sidebar {
    width: 250px;
    background: #fff;
    padding: 20px;
    height: fit-content;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #e7e7e7;
    padding-bottom: 15px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f1111;
    margin-bottom: 12px;
}

.filter-section label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #0f1111;
    transition: color 0.2s;
}

.filter-section label:hover {
    color: #007185;
}

.filter-section input[type="checkbox"],
.filter-section input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Products Section */
.products-section {
    flex: 1;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sorting Options */
.sort-options {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e7e7e7;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
    gap: 10px;
}

.sort-options span {
    font-size: 14px;
    color: #0f1111;
    font-weight: 600;
}

.sort-options select {
    padding: 6px 12px;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.sort-options select:focus {
    border-color: #007185;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 100%;
}

/* Product Card Styling */
.product-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    border-color: #febd69;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Product Image Container */
.product-image {
    position: relative;
    text-align: center;
    margin-bottom: 15px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Product Badge */
.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #232f3e;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge:nth-of-type(1) {
    background: #ff9900;
    color: #0f1111;
}

.product-badge:nth-of-type(2) {
    background: #b12704;
}

.product-badge:nth-of-type(3) {
    background: #007185;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f1111;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info h3:hover {
    color: #007185;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stars {
    color: #ffa41c;
    font-size: 14px;
}

.review-count {
    color: #007185;
    font-size: 14px;
    cursor: pointer;
}

.review-count:hover {
    color: #c7511f;
    text-decoration: underline;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 21px;
    font-weight: 700;
    color: #b12704;
}

.original-price {
    font-size: 14px;
    color: #565959;
    text-decoration: line-through;
}

.discount {
    font-size: 12px;
    background: #cc0c39;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Product Description */
.product-description {
    font-size: 14px;
    color: #565959;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Features */
.product-features {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.feature {
    font-size: 12px;
    background: #e7f3ff;
    color: #007185;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid #bde0ff;
}

.feature:first-child {
    background: #d4ff8a;
    color: #0f1111;
    border-color: #b8e65c;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    border-radius: 3px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0f1111;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    font-family: 'Outfit', sans-serif;
}

.add-to-cart-btn:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
    border-color: #9c7e31;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.add-to-cart-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Load More Container */
.load-more-container {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #e7e7e7;
    background: #f8f9fa;
}

.load-more-btn {
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #0f1111;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.load-more-btn:hover {
    background: #f7f8f8;
    border-color: #999;
}

/* Hidden Products (for Load More functionality) */
.product-card.hidden {
    display: none;
}

/* Filter Animation */
.products-grid.filtering {
    opacity: 0.7;
    pointer-events: none;
}

.product-card.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    margin: 0;
    height: 0;
    padding: 0;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: 0 10px;
    }
    
    .filters-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .sort-options {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-header {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info h3 {
        font-size: 15px;
    }
    
    .current-price {
        font-size: 18px;
    }
    
    .filters-sidebar {
        padding: 15px;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading .product-card {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Success Animation for Add to Cart */
@keyframes addToCartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background: #d4ff8a; }
    100% { transform: scale(1); }
}

.add-to-cart-btn.added {
    animation: addToCartSuccess 0.3s ease;
    background: #d4ff8a !important;
    border-color: #b8e65c !important;
    color: #0f1111 !important;
}

/* Enhanced Hover Effects */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(254, 189, 105, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.product-card:hover::before {
    opacity: 1;
}

/* Scrollbar Styling for Sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}