/* Products Page Styles */
.products-section {
    padding: 60px 0;
}

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

.filter-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-category, .filter-sort {
    position: relative;
}

.filter-category select, .filter-sort select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
}

.filter-category:after, .filter-sort:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
}

.search-box button:hover {
    color: var(--primary-color);
}

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

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.product-card:hover .action-btn {
    transform: translateY(0);
    opacity: 1;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.action-btn:nth-child(1) {
    transition-delay: 0.1s;
}

.action-btn:nth-child(2) {
    transition-delay: 0.2s;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

.badge-new {
    background-color: var(--primary-color);
    color: #fff;
}

.badge-sale {
    background-color: #e74c3c;
    color: #fff;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

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

.current-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

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

.rating-count {
    font-size: 12px;
    color: #888;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart:hover {
    background-color: var(--primary-color-dark);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 5px;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover, .pagination a.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .prev-next {
    width: auto;
    padding: 0 15px;
}

/* Product Detail Styles */
.product-detail-section {
    padding: 60px 0;
}

.product-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.product-gallery {
    flex: 1 1 500px;
}

.main-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail.active, .thumbnail:hover {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    flex: 1 1 500px;
}

.product-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.product-meta {
    margin-bottom: 20px;
}

.product-meta .product-rating {
    margin-bottom: 10px;
    font-size: 16px;
}

.product-meta .product-category {
    font-size: 14px;
    margin-bottom: 0;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #666;
}

.product-details {
    margin-bottom: 30px;
}

.product-details h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.details-list {
    list-style: none;
}

.details-list li {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.details-list li:last-child {
    border-bottom: none;
}

.detail-name {
    width: 150px;
    font-weight: 500;
    color: #333;
}

.detail-value {
    flex: 1;
    color: #666;
}

.product-options {
    margin-bottom: 30px;
}

.product-options h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.color-options, .size-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.color-option.active {
    border-color: #333;
}

.color-option.active:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.size-option {
    padding: 5px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option:hover, .size-option.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-selector label {
    margin-right: 15px;
    font-weight: 500;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.buy-now {
    flex: 1;
    padding: 12px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.buy-now:hover {
    background-color: #222;
}

.detail-add-to-cart {
    flex: 1;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.detail-add-to-cart:hover {
    background-color: var(--primary-color-dark);
}

.wishlist-btn {
    width: 50px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    color: #e74c3c;
    border-color: #e74c3c;
}

.product-share {
    margin-top: 30px;
}

.product-share h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.share-links {
    display: flex;
    gap: 10px;
}

.share-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.share-link:hover {
    transform: translateY(-3px);
}

.share-facebook {
    background-color: #3b5998;
}

.share-twitter {
    background-color: #1da1f2;
}

.share-pinterest {
    background-color: #bd081c;
}

.share-instagram {
    background-color: #e1306c;
}

.product-tabs {
    margin-top: 60px;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-right: 20px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.tab-content p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
}

.specifications-list {
    list-style: none;
}

.specifications-list li {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.specifications-list li:last-child {
    border-bottom: none;
}

.spec-name {
    width: 200px;
    font-weight: 500;
    color: #333;
}

.spec-value {
    flex: 1;
    color: #666;
}

.review {
    margin-bottom: 30px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 500;
    color: #333;
}

.review-date {
    font-size: 14px;
    color: #888;
}

.review-content {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.related-products {
    margin-top: 80px;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .product-detail {
        flex-direction: column;
    }
    
    .main-image {
        height: 300px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .wishlist-btn {
        width: 100%;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
        margin-right: 0;
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-actions .action-btn {
        width: 35px;
        height: 35px;
    }
}