* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.product-images {
    flex: 1;
    min-width: 300px;
    position: relative;
    text-align: center;
    overflow: hidden;
}




.main-image {
    width: 400px; /* Set the main image size */
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.thumbnail-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.thumbnail:hover {
    border-color: #007bff;
}

.thumbnail.active {
    border-color: #ff6600;
    box-shadow: 0px 0px 10px rgba(255, 102, 0, 0.5);
}



.product-info {
    flex: 1;
    min-width: 300px;
    padding: 30px;
}

.product-path {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
}

.product-path a {
    color: #6c757d;
    text-decoration: none;
}

.product-path a:hover {
    color: #3d5afe;
}

.product-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-brand {
    font-size: 18px;
    color: #495057;
    margin-bottom: 15px;
}

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

.stars {
    color: #ffc107;
    font-size: 18px;
}

.review-count {
    color: #6c757d;
    font-size: 14px;
}

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

.current-price {
    font-size: 28px;
    font-weight: 600;
    color: #212529;
}

.original-price {
    font-size: 18px;
    color: #6c757d;
    text-decoration: line-through;
}

.discount {
    font-size: 16px;
    color: #28a745;
    font-weight: 500;
}

.product-description {
    margin-bottom: 25px;
    color: #495057;
    line-height: 1.7;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    font-size: 15px;
}

.meta-item {
    display: flex;
    gap: 10px;
}

.meta-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.meta-value {
    color: #6c757d;
}

.product-colors {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #343a40;
}

.color-options {
    display: flex;
    gap: 12px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 0 1px #dee2e6;
}

.color-option.active::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #3d5afe;
    border-radius: 50%;
}

.product-quantity {
    margin-bottom: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    width: max-content;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e9ecef;
}

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

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

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

.btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #3d5afe;
    color: white;
}

.btn-primary:hover {
    background: #3151e8;
}

.btn-secondary {
    background: #212529;
    color: white;
}

.btn-secondary:hover {
    background: #343a40;
}

.btn-outline {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #212529;
}

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-icon {
    padding: 12px;
}

.product-delivery {
    margin-bottom: 30px;
    padding: 15px;
    background: #f1f3f5;
    border-radius: 4px;
}

.delivery-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 14px;
}

.related-products {
    margin: 40px 0;
    padding: 20px;
}

.related-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.related-products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 300px)); /* Min 200px, Max 300px */
    gap: 20px;
    justify-content: center; /* Center items if fewer than full row */
}

.related-product-card {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%; /* Ensures card fits within grid cell */
    max-width: 300px; /* Matches grid max */
    min-width: 200px; /* Matches grid min */
}

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

.related-product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
}

.related-product-name {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
    height: 40px;
    overflow: hidden;
}

.related-product-price {
    font-size: 18px;
    color: #0066cc;
    font-weight: bold;
    margin-bottom: 10px;
}

.add-to-cart-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #004d99;
}

@media (max-width: 768px) {
    .related-products-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .related-product-name { font-size: 14px; }
    .related-product-price { font-size: 16px; }


    .product-meta {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}