/* Product Section */
.product-section {
    padding: 40px 0;
}

.product-gallery {
    position: relative;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary-color);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-old-price {
    text-decoration: line-through;
    color: var(--dark-gray);
    font-size: 1.4rem;
    margin-left: 10px;
}

.product-meta {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--medium-gray);
    border-bottom: 1px solid var(--medium-gray);
}

.meta-item {
    margin-bottom: 8px;
}

.meta-label {
    font-weight: 600;
    color: var(--heading-color);
    display: inline-block;
    width: 120px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: var(--light-gray);
    border: 1px solid var(--medium-gray);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--medium-gray);
    margin: 0 5px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 25px;
    font-weight: 500;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    font-weight: 500;
}

/* Product Tabs */
.product-tabs {
    margin: 50px 0;
}

.nav-tabs .nav-link {
    color: var(--heading-color);
    font-weight: 500;
    border: none;
    padding: 12px 20px;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: transparent;
}

.tab-content {
    padding: 25px;
    border: 1px solid var(--medium-gray);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Bestsellers Section - FIXED */
.bestsellers-section {
    background-color: var(--light-gray);
    padding: 60px 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 30px;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* FIXED: Equal height cards */
.bestsellers-section .row {
    display: flex;
    flex-wrap: wrap;
}

.bestsellers-section .col-md-3 {
    display: flex;
    margin-bottom: 25px;
}

.bestsellers-section .product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bestsellers-section .product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.bestsellers-section .product-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.bestsellers-section .product-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bestsellers-section .product-name {
    font-size: 1rem;
    font-weight: 600;
    height: 48px;
    margin-bottom: 8px;
    color: var(--heading-color);
    flex-grow: 1;
    min-height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bestsellers-section .product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.6rem;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
    
    .main-image {
        height: 300px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
    
    /* Mobile fix for bestsellers */
    .bestsellers-section .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .bestsellers-section .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}