.related-products-section {
    padding: 60px 0;
    background-color: var(--bg-light, #f9f9f9);
    margin-top: 50px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark, #212121);
    margin: 0;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color, #3b82f6);
    border-radius: 2px;
}

.section-controls {
    display: flex;
    gap: 10px;
}

.slider-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background-color: var(--white, #fff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--text-dark, #212121);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background-color: var(--primary-color, #3b82f6);
    color: var(--white, #fff);
    transform: translateY(-2px);
}

.slider-arrow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.related-products-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0 -10px;
    position: relative;
}

/* For mobile screens */
@media (max-width: 767px) {
    .related-products-slider {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

/* Product Card Styles */
.product-card {
    background-color: var(--white, #fff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.new {
    background-color: var(--success-color, #10b981);
    color: white;
}

.badge.sale {
    background-color: var(--danger-color, #ef4444);
    color: white;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
}

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

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

.product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.4;
}
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-badge {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    text-transform: capitalize;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-badge.active {
    border: 2px solid #333;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* Example color classes - you can keep these if you're using them */
.color-red { background-color: #ff0000; }
.color-blue { background-color: #0000ff; }
.color-green { background-color: #00ff00; }
.color-yellow { background-color: #ffff00; color: #333; }
.color-black { background-color: #000000; }
.color-default { background-color: #cccccc; color: #333; }
.product-title a {
    color: var(--text-dark, #212121);
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title a:hover {
    color: var(--primary-color, #3b82f6);
}

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

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color, #3b82f6);
}

.original-price {
    font-size: 14px;
    color: var(--text-muted, #9ca3af);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    align-items: center;
    margin-top: auto;
    gap: 10px;
}

.action-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    background-color: var(--primary-color, #3b82f6);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: var(--primary-dark, #2563eb);
}

.action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
    background-color: transparent;
    color: var(--text-dark, #212121);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-icon:hover {
    background-color: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
}

.action-icon.active {
    background-color: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
}

/* Quick View Modal Styles */
.product-quickview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 50px 0;
}

.product-quickview-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    position: relative;
    margin: auto;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modal-open 0.3s ease-out;
}

@keyframes modal-open {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: var(--bg-light, #f9f9f9);
    color: var(--text-dark, #212121);
}

.modal-body {
    padding: 30px;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
    :root {
        --primary-color: #3a86ff;
        --secondary-color: #ff006e;
        --dark-color: #212529;
        --light-color: #f8f9fa;
        --success-color: #4bb543;
        --warning-color: #ffc107;
        --danger-color: #dc3545;
        --gray-color: #6c757d;
        --light-gray: #e9ecef;
    }

    /* Product Gallery */
    .product-gallery {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .main-image {
        width: 100%;
        height: 450px;
        overflow: hidden;
        position: relative;
        border-radius: 12px;
        background-color: var(--light-gray);
    }

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

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

    .thumbnails {
        display: flex;
        gap: 10px;
        margin-top: 15px;
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 10px;
    }

    .thumbnails::-webkit-scrollbar {
        height: 5px;
    }

    .thumbnails::-webkit-scrollbar-track {
        background: var(--light-gray);
        border-radius: 10px;
    }

    .thumbnails::-webkit-scrollbar-thumb {
        background: var(--gray-color);
        border-radius: 10px;
    }

    .thumbnail {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        flex-shrink: 0;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

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

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

    /* Product Info */
    .product-info {
        padding: 20px 0;
    }

    .product-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 10px;
        color: var(--dark-color);
    }

    .product-category {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 0.9rem;
        color: var(--gray-color);
        margin-bottom: 15px;
    }

    .product-category a {
        color: var(--primary-color);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .product-category a:hover {
        color: var(--secondary-color);
    }

    .product-price {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--dark-color);
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .product-price .original-price {
        font-size: 1.2rem;
        color: var(--gray-color);
        text-decoration: line-through;
    }

    .product-description {
        margin-bottom: 25px;
        line-height: 1.6;
        color: var(--gray-color);
    }

    /* Product Options */
    .product-options {
        margin-bottom: 30px;
    }

    .option-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 10px;
        color: var(--dark-color);
    }

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

    .color-option {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        cursor: pointer;
        position: relative;
        border: 2px solid var(--light-gray);
        transition: all 0.3s ease;
    }

    .color-option.active {
        border-color: var(--primary-color);
    }

    .color-option.active::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: white;
    }

    .color-black { background-color: #000; }
    .color-white { background-color: #fff; }
    .color-blue { background-color: #3a86ff; }
    .color-red { background-color: #ff006e; }

    .select-wrapper {
        position: relative;
        margin-bottom: 20px;
    }

    .custom-select {
        appearance: none;
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--light-gray);
        border-radius: 8px;
        background-color: white;
        font-size: 1rem;
        cursor: pointer;
        transition: border-color 0.3s ease;
    }
    .reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.average-rating {
    font-size: 48px;
    font-weight: bold;
    margin-right: 20px;
}

.rating-bars {
    flex-grow: 1;
    max-width: 400px;
}

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

.rating-label {
    width: 60px;
}

.progress-bar {
    height: 12px;
    background-color: #eee;
    border-radius: 10px;
    flex-grow: 1;
    margin: 0 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ffc107;
}

.rating-count {
    width: 30px;
    text-align: right;
}

.reviews-list {
    margin-top: 30px;
}

.review-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

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

.reviewer-name {
    font-weight: 600;
}

.verified-badge {
    font-size: 12px;
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

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

.review-rating {
    color: #ffc107;
}

.review-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.review-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

.review-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.review-image {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
}

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

.review-actions {
    margin-top: 15px;
}

.no-reviews {
    padding: 30px;
    text-align: center;
    color: #777;
}

@media (max-width: 768px) {
    .reviews-header {
        flex-direction: column;
    }
    
    .rating-overview {
        display: flex;
        margin-bottom: 20px;
        width: 100%;
    }
}
    .custom-select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .select-wrapper::after {
        content: '▼';
        font-size: 0.8rem;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        color: var(--gray-color);
    }

    /* Quantity Selector */
    .quantity-selector {
        display: flex;
        align-items: center;
        border: 1px solid var(--light-gray);
        border-radius: 8px;
        overflow: hidden;
        width: fit-content;
    }

    .quantity-btn {
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gray-color);
        transition: all 0.3s ease;
    }

    .quantity-btn:hover {
        background-color: var(--light-gray);
        color: var(--dark-color);
    }

    .quantity-input {
        width: 50px;
        height: 40px;
        border: none;
        text-align: center;
        font-size: 1rem;
        font-weight: 600;
    }

    .quantity-input:focus {
        outline: none;
    }

    /* Action Buttons */
    .action-buttons {
        display: flex;
        gap: 15px;
        margin-top: 30px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 12px 25px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: none;
    }

    .btn-primary {
        background-color: var(--primary-color);
        color: white;
    }

    .btn-primary:hover {
        background-color: #2a75e6;
        transform: translateY(-2px);
    }

    .btn-outline {
        background-color: transparent;
        border: 1px solid var(--light-gray);
        color: var(--dark-color);
    }

    .btn-outline:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        transform: translateY(-2px);
    }

    .btn-icon {
        width: 45px;
        height: 45px;
        padding: 0;
        border-radius: 50%;
    }

    /* Product Details Tabs */
    .product-tabs {
        margin-top: 60px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }

    .tabs-nav {
        display: flex;
        background-color: white;
        border-bottom: 1px solid var(--light-gray);
    }

    .tab-btn {
        padding: 15px 25px;
        font-weight: 600;
        cursor: pointer;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        transition: all 0.3s ease;
        color: var(--gray-color);
    }

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

    .tab-content {
        padding: 30px;
        background-color: white;
        display: none;
    }

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

    .tab-content h3 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 15px;
        color: var(--dark-color);
    }

    .features-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .features-list li {
        padding: 8px 0;
        position: relative;
        padding-left: 25px;
    }

    .features-list li::before {
        content: '✓';
        position: absolute;
        left: 0;
        color: var(--primary-color);
        font-weight: bold;
    }

    .specs-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .specs-list li {
        padding: 10px 0;
        display: flex;
        border-bottom: 1px solid var(--light-gray);
    }

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

    .specs-list span {
        font-weight: 600;
        width: 150px;
        color: var(--dark-color);
    }

    /* Reviews Section */
    .reviews-section {
        margin-top: 60px;
    }

    .reviews-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
    }

    .rating-overview {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .average-rating {
        font-size: 3rem;
        font-weight: 700;
        color: var(--dark-color);
    }

    .rating-bars {
        flex-grow: 1;
        max-width: 300px;
    }

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

    .rating-label {
        min-width: 60px;
        font-size: 0.9rem;
        color: var(--gray-color);
    }

    .progress-bar {
        flex-grow: 1;
        height: 8px;
        background-color: var(--light-gray);
        border-radius: 4px;
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        background-color: var(--primary-color);
    }

    .rating-count {
        min-width: 30px;
        font-size: 0.9rem;
        color: var(--gray-color);
        text-align: right;
    }

    .review-item {
        display: flex;
        gap: 20px;
        padding: 20px 0;
        border-bottom: 1px solid var(--light-gray);
    }

    .review-item:last-child {
        border-bottom: none;
    }

    .reviewer-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
    }

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

    .review-content {
        flex-grow: 1;
    }

    .reviewer-name {
        font-weight: 600;
        margin-bottom: 5px;
        color: var(--dark-color);
    }

    .review-date {
        font-size: 0.9rem;
        color: var(--gray-color);
        margin-bottom: 10px;
    }

    .review-stars {
        display: flex;
        gap: 2px;
        margin-bottom: 10px;
    }

    .review-stars i {
        color: var(--warning-color);
    }

    .review-text {
        line-height: 1.6;
        color: var(--gray-color);
    }

    /* Review Modal */
    .review-modal .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .review-modal .modal-header {
        border-bottom: 1px solid var(--light-gray);
        padding: 20px 30px;
    }

    .review-modal .modal-title {
        font-weight: 700;
        color: var(--dark-color);
    }

    .review-modal .modal-body {
        padding: 30px;
    }

    .review-modal .form-group {
        margin-bottom: 20px;
    }

    .review-modal label {
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
        color: var(--dark-color);
    }

    .review-modal .form-control {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--light-gray);
        border-radius: 8px;
        font-size: 1rem;
        transition: border-color 0.3s ease;
    }

    .review-modal .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .review-modal .modal-footer {
        border-top: 1px solid var(--light-gray);
        padding: 20px 30px;
    }

    /* Responsive */
    @media (max-width: 992px) {
        .main-image {
            height: 400px;
        }
    }

    @media (max-width: 768px) {
        .main-image {
            height: 350px;
        }
        
        .product-title {
            font-size: 1.8rem;
        }
        
        .product-price {
            font-size: 1.5rem;
        }
        
        .action-buttons {
            flex-direction: column;
        }
        
        .btn {
            width: 100%;
        }
        
        .reviews-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 20px;
        }
    }

    @media (max-width: 576px) {
        .main-image {
            height: 300px;
        }
        
        .thumbnail {
            width: 60px;
            height: 60px;
        }
        
        .tab-btn {
            padding: 10px 15px;
            font-size: 0.9rem;
        }
        
        .tab-content {
            padding: 20px;
        }
    }
    /* Additional styles for the slider functionality */
.related-products-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default for desktop */
    gap: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

/* Button disabled state */
.slider-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Smooth transition for products visibility */
.product-card {
    transition: all 0.3s ease;
}

/* For tablet screens */
@media (max-width: 1023px) {
    .related-products-slider {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* For mobile screens */
@media (max-width: 767px) {
    .related-products-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .slider-arrow {
        width: 36px;
        height: 36px;
    }
}
