/* Product Detail Page Styles */

/* Main Image Container */
.main-image-container {
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #e9e9e9;
    border-radius: 5px;
    overflow: hidden;
}

.main-image {
    width: 100%;
    transition: transform 0.3s;
}

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

/* Small Thumbnails */
.small-images {
    display: flex;
    flex-direction: column;
    height: 400px;
    overflow-y: auto;
}

.small-img-item {
    cursor: pointer;
    border: 1px solid #e9e9e9;
    border-radius: 5px;
    padding: 3px;
    transition: border-color 0.3s;
}

.small-img-item:hover, 
.small-img-item.active {
    border-color: #007bff;
}

.small-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Badges */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff5722;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

.bestseller-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffc107;
    color: #333;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

/* Product Title and Brand */
.product-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.brand-info {
    margin-bottom: 15px;
}

.brand-name {
    font-size: 16px;
    color: #666;
}

/* Ratings */
.stars {
    color: #ffc107;
}

.rating-count {
    color: #666;
    margin-left: 5px;
}

/* Price Styles */
.price-container {
    margin: 15px 0;
}

.main-price {
    font-size: 24px;
    font-weight: bold;
    color: #212529;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.price-range {
    font-size: 24px;
    font-weight: bold;
    color: #212529;
}

/* Size Selection */
.size-selection {
    margin-bottom: 20px;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.size-label {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.size-option {
    display: none;
}

.size-option:checked + .size-label {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Color Selection */
.color-selection {
    margin-bottom: 20px;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    display: none;
}

.color-label {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-option:checked + .color-label {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 5px;
    border: 1px solid #ddd;
}

/* Quantity Selector */
.quantity-section {
    margin-bottom: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.quantity-input {
    width: 60px;
    text-align: center;
    margin: 0 5px;
}

.btn-quantity {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-info {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

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

.btn-add-to-cart {
    flex: 2;
}

.btn-wishlist {
    flex: 1;
}

/* Shipping Info */
.shipping-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.shipping-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.shipping-option i {
    margin-right: 10px;
    color: #007bff;
}

/* Product Description */
.product-description {
    margin-top: 30px;
}

/* Tabs */
.nav-tabs {
    margin-bottom: 20px;
}

.nav-tabs .nav-link.active {
    font-weight: bold;
}

/* Specifications Table */
.specifications-table th {
    width: 30%;
}

/* Reviews */
.reviews-summary {
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.overall-rating {
    text-align: center;
}

.rating-value {
    font-size: 48px;
    margin-bottom: 5px;
}

.rating-breakdown {
    padding-left: 30px;
}

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

.rating-row span {
    width: 60px;
}

.rating-row .progress {
    flex: 1;
    margin: 0 10px;
    height: 10px;
}

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

.reviewer-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.write-review {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.rating-selector {
    font-size: 24px;
    color: #ffc107;
    cursor: pointer;
}

.rating-star {
    margin-right: 5px;
}

/* Related Products */
.section-title {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

.product-card {
    border: 1px solid #e9e9e9;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
}

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

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

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

.product-card .product-info {
    padding: 15px;
}

.product-card .product-title {
    font-size: 16px;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Add styles for disabled options */
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .small-images {
        flex-direction: row;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        margin-bottom: 20px;
    }
    
    .small-img-item {
        margin-right: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-add-to-cart, .btn-wishlist {
        flex: auto;
        width: 100%;
        margin-bottom: 10px;
    }
}