/* 
 * Pages - Product Detail Page Styles
 */

.product-detail-page {
    padding: 2rem 0 4rem;
}

.product-detail {
    margin-bottom: 3rem;
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.product-main-image {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-main-image img {
    width: 100%;
    display: block;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-badge.sale {
    background-color: #e74c3c;
}

.product-badge.featured {
    background-color: #3498db;
}

.product-badge.bestseller {
    background-color: #2ecc71;
}

.product-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.thumbnail-item.active, .thumbnail-item:hover {
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    padding: 1rem 0;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #777;
}

.product-meta a {
    color: #2ecc71;
}

.product-price-wrapper {
    margin-bottom: 1.5rem;
}

/* Account Type Display */
.account-type-display {
    margin-bottom: 1rem;
}

.account-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.account-badge.retail {
    background-color: #6c757d;
}

.account-badge.wholesale {
    background-color: #28a745;
}

.account-badge.professional {
    background-color: #9b59b6;
}

.account-badge.distributor {
    background-color: #e67e22;
}

.account-badge.student {
    background-color: #3498db;
}

.account-badge.admin {
    background-color: #e74c3c;
}

.product-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Price Comparison for Special Pricing */
.price-comparison {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

.retail-price-note {
    display: block;
    color: #666;
    margin-bottom: 0.5rem;
}

.original-price,
.original-sale {
    text-decoration: line-through;
    color: #999;
}

.special-savings {
    margin-top: 0.5rem;
}

.savings-amount {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

.product-short-description {
    margin-bottom: 1.5rem;
    color: #666;
}

.product-availability {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.in-stock {
    color: #2ecc71;
    display: flex;
    align-items: center;
}

.out-of-stock {
    color: #e74c3c;
    display: flex;
    align-items: center;
}

.in-stock svg, .out-of-stock svg {
    margin-right: 0.5rem;
}

.professional-note {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    background-color: #9b59b6;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    margin-right: 0.5rem;
}

/* Add to Cart Form */
.product-form {
    margin-bottom: 1.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    margin-right: 1rem;
    margin-bottom: 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #777;
}

.quantity-btn:hover {
    background-color: #f5f5f5;
}

.quantity-selector input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.product-actions:not(.buttons-features-row .product-actions) {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Product Features */
.product-features:not(.buttons-features-row .product-features) {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.feature-item {
    display: flex;
    align-items: center;
}

/* Product Share */
.product-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #777;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.share-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Product Tabs */
.product-tabs {
    margin: 3rem 0;
}

.tabs-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-item {
    margin-bottom: -1px;
}

.tab-link {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #777;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-link.active, .tab-link:hover {
    color: #2ecc71;
    border-bottom-color: #2ecc71;
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Product Description Content */
.product-description {
    line-height: 1.7;
    color: #555;
}

.ingredients-content {
    line-height: 1.7;
    color: #555;
}

.ingredients-content ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.ingredients-content ul li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.shipping-content ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.shipping-content ul li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

/* Reviews Section */
.reviews-container {
    margin-top: 1rem;
}

.reviews-summary {
    margin-bottom: 2rem;
}

.review-form-container {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 4px;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    margin-bottom: 1rem;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    width: 1.5rem;
    font-size: 1.5rem;
    color: #ddd;
    margin: 0 0.25rem;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: #ffc107;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
}

.related-products h2 {
    margin-bottom: 2rem;
    text-align: center;
}

/* Related Products Grid */
.related-products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.related-products .product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.related-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Related Products Image Container */
.related-products .product-image-container {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.related-products .product-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.related-products .product-image-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.related-products .product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.related-products .product-image-container:hover .product-img {
    transform: scale(1.05);
}

/* Related Products Actions */
.related-products .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-products .product-image-container:hover .product-actions {
    opacity: 1;
}

.related-products .quick-view-btn,
.related-products .add-to-cart-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.related-products .quick-view-btn:hover,
.related-products .add-to-cart-btn:hover {
    background: #2ecc71;
    color: white;
    transform: scale(1.1);
}

/* Related Products Content */
.related-products .product-content {
    padding: 1.5rem;
}

.related-products .product-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.related-products .product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-products .product-title a:hover {
    color: #2ecc71;
}

.related-products .product-category {
    margin-bottom: 0.75rem;
}

.related-products .product-category a {
    color: #666;
    font-size: 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.related-products .product-category a:hover {
    color: #2ecc71;
}

.related-products .product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-products .current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2ecc71;
}

.related-products .regular-price {
    font-size: 0.95rem;
    color: #999;
    text-decoration: line-through;
}

.related-products .sale-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e74c3c;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .product-gallery {
        margin-bottom: 2rem;
    }
    
    .product-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .product-tabs .nav-tabs {
        flex-direction: column;
    }
    
    .tab-link {
        text-align: center;
    }
    
    .product-detail .product-title {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    /* Related Products Mobile */
    .related-products .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .related-products .product-image-wrapper {
        padding-bottom: 85%; /* Slightly taller on mobile */
    }
    
    .related-products .product-actions {
        position: static;
        opacity: 1;
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
        padding: 0 10px;
    }
    
    .related-products .product-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .related-products .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .related-products .product-image-wrapper {
        padding-bottom: 90%;
    }
    
    .related-products h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}