/* Product Detail Page Styles */

/* Hero Section */
.product-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.breadcrumb-nav {
    position: relative;
    z-index: 10;
}

.breadcrumb-nav .breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    margin: 0;
    backdrop-filter: blur(10px);
}

.breadcrumb-nav .breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-nav .breadcrumb-item a:hover {
    color: #764ba2;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #6c757d;
    font-weight: 600;
}

/* Product Gallery */
.product-gallery {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-gallery:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.main-image-container {
    position: relative;
    overflow: hidden;
}

.main-image-wrapper {
    position: relative;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 1rem;
}

.overlay-actions .btn {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.overlay-actions .btn:hover {
    transform: scale(1.1);
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 5;
    animation: badgePulse 2s infinite;
}

.product-badge.discount {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.product-badge.featured {
    background: linear-gradient(45deg, #feca57, #ff9ff3);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3);
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    padding: 1rem;
    background: #f8f9fa;
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail-item:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.thumbnail-item.active {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.product-header {
    margin-bottom: 1.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-badge {
    display: inline-block;
}

.category-badge a {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.category-badge a:hover {
    transform: translateY(-2px);
    color: white;
}

/* Rating Section */
.rating-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.25rem;
    color: #ffc107;
    transition: transform 0.2s ease;
}

.star.filled {
    animation: starFill 0.5s ease;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.rating-text {
    color: #6c757d;
    font-size: 0.875rem;
}

.rating-count {
    color: #6c757d;
    font-size: 0.875rem;
}

.rating-actions .btn {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Price Section */
.price-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-original {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-current {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    color: #6c757d;
    font-size: 0.875rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.price-original .price-value {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1.25rem;
}

.price-savings {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
}

/* Stock Section */
.stock-section {
    margin-bottom: 2rem;
}

.stock-status {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 500;
}

.stock-status.available {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-status.limited {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.stock-status.unavailable {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stock-count {
    margin-right: auto;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Cart Section */
.cart-section {
    margin-bottom: 2rem;
}

.quantity-selector {
    margin-bottom: 1.5rem;
}

.quantity-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    background: white;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.quantity-input {
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.quantity-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.cart-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    min-width: 200px;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.buy-now-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.buy-now-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Product Stats */
.product-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.stat-item i {
    font-size: 1.25rem;
    color: #667eea;
    margin-bottom: 0.25rem;
}

/* Features Section */
.features-section {
    margin-bottom: 2rem;
}

.features-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

.feature-item i {
    color: #28a745;
    margin-left: 0.5rem;
}

/* Product Tabs */
.product-tabs-section {
    margin-top: 3rem;
}

.tabs-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.product-tabs {
    border-bottom: 2px solid #f8f9fa;
    padding: 0;
    margin: 0;
}

.product-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 1.5rem 2rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.product-tabs .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.product-tabs .nav-link.active {
    color: #667eea;
    background: white;
    border-bottom: 3px solid #667eea;
}

.product-tab-content {
    padding: 2rem;
}

/* Description Tab */
.description-content {
    line-height: 1.8;
    color: #2c3e50;
}

.description-text {
    font-size: 1.1rem;
}

.empty-description {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-description i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Reviews Tab */
.reviews-content {
    max-width: 800px;
}

.reviews-list {
    margin-bottom: 2rem;
}

.review-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.reviewer-name {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.review-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-content p {
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
}

.empty-reviews {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-reviews i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Add Review Section */
.add-review-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.add-review-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.review-form .form-group {
    margin-bottom: 1.5rem;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    direction: ltr;
}

.rating-input input[type="radio"] {
    display: none;
}

.star-label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #dee2e6;
    transition: color 0.2s ease;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.rating-input input[type="radio"]:checked ~ .star-label {
    color: #ffc107;
}

.login-prompt {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.prompt-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Related Products */
.related-products-content {
    max-width: 1200px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.related-product-card .product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.related-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .product-image img {
    transform: scale(1.1);
}

.related-product-card .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-card:hover .product-overlay {
    opacity: 1;
}

.related-product-card .product-info {
    padding: 1rem;
}

.related-product-card .product-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.related-product-card .product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-product-card .price-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.875rem;
}

.related-product-card .price-current {
    font-weight: 600;
    color: #667eea;
}

.empty-related {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-related i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Animations */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes starFill {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-title {
        font-size: 2rem;
    }
    
    .main-image {
        height: 300px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .add-to-cart-btn, .buy-now-btn {
        min-width: auto;
    }
    
    .product-tabs .nav-link {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .rating-section {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .product-info {
        padding: 1rem;
    }
    
    .product-tab-content {
        padding: 1rem;
    }
    
    .thumbnail-container {
        gap: 0.5rem;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
}

/* Product Items Section */
.product-items-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.product-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.product-item-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.product-item-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.product-item-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.item-image {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    font-size: 1.5rem;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.item-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.item-price {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.item-stock {
    font-size: 0.875rem;
}

.stock-available {
    color: #28a745;
}

.stock-limited {
    color: #ffc107;
}

.stock-unavailable {
    color: #dc3545;
}

.item-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.item-radio-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-radio-label:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

input[type="radio"][name="selectedItem"] {
    display: none;
}

input[type="radio"][name="selectedItem"]:checked + .item-radio-label {
    background: #28a745;
}

/* Product Form Section */
.product-form-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.form-field-group {
    margin-bottom: 1.5rem;
}

.form-field-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-field-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-field-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.form-field-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ComboBox Options Styling */
.form-field-select option {
    background: #fff;
    color: #333;
    padding: 8px 12px;
    font-size: 14px;
}

.form-field-select option:hover {
    background: #f8f9fa;
}

.form-field-select option:checked {
    background: #667eea;
    color: #fff;
}

.form-field-date {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-field-date:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-field-checkbox {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

/* Price Display */
.price-display {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.current-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 1rem;
    font-weight: 500;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Responsive adjustments for product items */
@media (max-width: 768px) {
    .product-items-grid {
        grid-template-columns: 1fr;
    }
    
    .product-item-card {
        padding: 0.75rem;
    }
    
    .item-image {
        width: 60px;
        height: 60px;
    }
    
    .item-selector {
        position: static;
        margin-top: 1rem;
        text-align: center;
    }
} 