/* Products Page Enhancement Styles */

/* Enhanced Breadcrumb Navigation */
.tf-breadcrumb-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
}

.breadcrumb-wrapper {
    padding: 0 20px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 12px;
    color: #ccc;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
}

/* Main Products Layout */
.products-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Styles */
.products-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.sidebar-content {
    padding: 30px 25px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Search Input */
.search-product-wrap {
    position: relative;
}

.product-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.product-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(219, 18, 21, 0.15);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    position: relative;
    padding-left: 30px;
    transition: color 0.3s ease;
}

.filter-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.filter-checkbox:hover .checkmark {
    border-color: var(--primary);
}

.filter-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-checkbox input:checked ~ .checkmark:after {
    display: block;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Sort Select */
.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(219, 18, 21, 0.15);
    outline: none;
}

/* Reset Button */
.btn-reset-filters {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Main Products Area */
.products-main {
    flex: 1;
    min-width: 0;
}

.products-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.product-item:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.product-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.2;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.view-product-btn {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-product-btn:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-tag {
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Loading State */
.products-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.no-results p {
    font-size: 14px;
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .products-layout {
        flex-direction: column;
        gap: 25px;
    }
    
    .products-sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-content {
        padding: 25px 20px;
    }
    
    .category-filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px 20px;
    }
}

@media (max-width: 768px) {
    .breadcrumb-wrapper {
        padding: 0 15px;
    }
    
    .breadcrumb-list {
        font-size: 13px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .sidebar-title {
        font-size: 18px;
    }
    
    .product-info {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-filters {
        flex-direction: column;
        gap: 12px;
    }
}

/* Product Detail Modal Styles */
.modal-xl {
    max-width: 1200px;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 25px 30px 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* Product Gallery Styles */
.product-gallery {
    position: relative;
}

.main-image-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.image-slideshow {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.slide-container {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Navigation Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 18px;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.nav-prev {
    left: 15px;
}

.nav-next {
    right: 15px;
}

.nav-btn::before {
    content: '❮';
}

.nav-next::before {
    content: '❯';
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.thumbnail {
    min-width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Details Section */
.product-details {
    padding-left: 20px;
}

.product-category-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.product-description-full {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.product-features h4,
.product-specifications h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.feature-tag {
    background: #f8f9fa;
    color: #555;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.spec-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.spec-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-list .spec-label {
    font-weight: 600;
    color: #333;
}

.spec-list .spec-value {
    color: #666;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.product-actions .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Mobile Responsive for Modal */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .product-details {
        padding-left: 0;
        margin-top: 20px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nav-prev {
        left: 10px;
    }
    
    .nav-next {
        right: 10px;
    }
    
    .thumbnail {
        min-width: 60px;
        height: 60px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
}