/* ========================================
   PRODUCT DETAIL PAGE STYLES
   ======================================== */

/* Breadcrumb */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb .separator {
    color: #999;
}

.breadcrumb span:last-child {
    color: var(--primary-color);
    font-weight: 600;
}

/* Loading Container */
.loading-container {
    text-align: center;
    padding: 100px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Not Found */
.product-not-found {
    text-align: center;
    padding: 100px 20px;
}

.product-not-found i {
    font-size: 80px;
    color: #ccc;
    margin-bottom: 20px;
}

.product-not-found h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-not-found p {
    color: #666;
    margin-bottom: 30px;
}

/* Product Detail Section */
.product-detail-section {
    padding: 60px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Product Images */
.product-images {
    position: relative;
}

.product-badge-detail {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    z-index: 10;
    text-transform: capitalize;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image-container:hover .main-image {
    transform: scale(1.05);
}

.wishlist-btn-detail {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wishlist-btn-detail:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

.wishlist-btn-detail i {
    font-size: 20px;
    color: var(--accent-color);
    transition: color 0.3s;
}

.wishlist-btn-detail:hover i {
    color: white;
}

.wishlist-btn-detail.active i {
    color: var(--accent-color);
}

.wishlist-btn-detail.active i::before {
    content: "\f004";
    font-weight: 900;
}

/* Thumbnails */
.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.thumbnail-item {
    aspect-ratio: 1/1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item.active {
    border-color: var(--accent-color);
}

.thumbnail-item:hover {
    border-color: var(--primary-color);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info-detail {
    /* Grid item */
}

.product-title-detail {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    display: flex;
    gap: 5px;
    color: #ffc107;
}

.stars i {
    font-size: 18px;
}

.rating-count {
    color: #666;
    font-size: 14px;
}

/* Pricing */
.product-pricing {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.compare-price {
    font-size: 1.5rem;
    color: #999;
    text-decoration: line-through;
}

.savings {
    display: inline-flex;
    align-items: center;
    background: #dcfce7;
    color: #16a34a;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Stock Status */
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
}

.stock-status.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

/* Short Description */
.short-description {
    margin-bottom: 30px;
}

.short-description p {
    color: #666;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Product Specifications */
.product-specifications {
    margin-bottom: 30px;
}

.spec-group {
    margin-bottom: 25px;
}

.spec-label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 15px;
}

.spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-option {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.spec-option:hover {
    border-color: var(--primary-color);
}

.spec-option.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.spec-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quantity Section */
.quantity-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.quantity-section label {
    font-weight: 600;
    color: var(--primary-color);
}

.quantity-controls-detail {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--primary-color);
}

.qty-btn:hover {
    background: var(--light-bg);
}

#quantityInput {
    width: 60px;
    height: 45px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

/* Action Buttons */
.product-actions-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-add-to-cart-detail,
.btn-buy-now {
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-add-to-cart-detail {
    background: var(--accent-color);
    color: white;
}

.btn-add-to-cart-detail:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-buy-now {
    background: var(--primary-color);
    color: white;
}

.btn-buy-now:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Product Features */
.product-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-item i {
    font-size: 24px;
    color: var(--accent-color);
    width: 30px;
}

.feature-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 15px;
    margin-bottom: 3px;
}

.feature-item p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Share Section */
.product-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-share span {
    font-weight: 600;
    color: var(--primary-color);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* Product Tabs */
.product-tabs {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #e0e0e0;
}

.tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--accent-color);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tabs-content {
    /* Container */
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description Tab */
#productDescription {
    line-height: 1.8;
    color: #666;
}

#productDescription p {
    margin-bottom: 20px;
}

/* Specifications Table */
.specs-table {
    width: 100%;
}

.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row-label {
    font-weight: 600;
    color: var(--primary-color);
}

.spec-row-value {
    color: #666;
}

/* Reviews */
.reviews-container {
    /* Container */
}

.review-item {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary-color);
}

.review-date {
    font-size: 14px;
    color: #999;
}

.review-rating {
    display: flex;
    gap: 3px;
    color: #ffc107;
}

.review-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.review-comment {
    color: #666;
    line-height: 1.6;
}

/* Care Instructions */
.care-instructions {
    max-width: 800px;
}

.care-instructions h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.care-section {
    margin-bottom: 30px;
}

.care-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.care-section h4 i {
    color: var(--accent-color);
}

.care-section ul {
    list-style: none;
    padding: 0;
}

.care-section li {
    padding: 10px 0 10px 30px;
    position: relative;
    color: #666;
    line-height: 1.6;
}

.care-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Related Products */
.related-products-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid #e0e0e0;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .product-title-detail {
        font-size: 1.8rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
    
    .product-actions-detail {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-images {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .spec-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .product-title-detail {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .quantity-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}