/* Product Detail Modal Styles */

/* Modal Container and Backdrop */
.product-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-detail-modal.active {
    visibility: visible;
    opacity: 1;
}

.product-detail-modal .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-detail-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    margin: auto;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.product-detail-modal.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.modal-close i {
    font-size: 20px;
    color: #374151;
}

/* Modal Content Grid */
.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 90vh;
    overflow: hidden;
}

/* Product Images Section */
.product-images-section {
    padding: 48px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 
                0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

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

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image-container:hover .main-product-image {
    transform: scale(1.1);
}

.image-zoom-overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.image-zoom-overlay:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.thumbnail-item.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info Section */
.product-info-section {
    padding: 48px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Product Header */
.product-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
}

.product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.product-badges .badge {
    display: none;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-bestseller {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-featured {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.badge-limited {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Product Meta */
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-stars {
    color: #fbbf24;
    font-size: 18px;
    display: flex;
    gap: 2px;
}

.rating-text {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

.product-sku {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
}

.product-sku span {
    color: #6b7280;
    font-weight: 600;
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    padding: 24px;
    border-radius: 16px;
    margin: 8px 0;
}

.price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.current-price {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    font-family: 'Inter', sans-serif;
}

.original-price {
    display: none;
    font-size: 22px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

.discount-badge {
    display: none;
    background: #ef4444;
    color: white;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stock-status i {
    font-size: 20px;
    color: #10b981;
}

.stock-status.out-of-stock i {
    color: #ef4444;
}

#modal-stock-status {
    font-weight: 600;
    color: #10b981;
    font-size: 15px;
}

.stock-status.out-of-stock #modal-stock-status {
    color: #ef4444;
}

.stock-quantity {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Description Tabs */
.description-tabs {
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #374151;
    background: rgba(37, 99, 235, 0.05);
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-btn i {
    font-size: 18px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Product Description */
.product-description {
    color: #4b5563;
    line-height: 1.8;
    font-size: 15px;
}

.product-description p {
    margin-bottom: 16px;
}

.product-description h3,
.product-description h4 {
    color: #111827;
    margin: 24px 0 12px 0;
    font-weight: 600;
}

.product-description ul,
.product-description ol {
    margin: 16px 0;
    padding-left: 24px;
    color: #4b5563;
}

.product-description li {
    margin-bottom: 8px;
}

/* Specifications */
.specifications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 15px;
}

.spec-value {
    color: #111827;
    font-weight: 500;
    font-size: 15px;
}

/* Shipping Info */
.shipping-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shipping-item {
    display: flex;
    gap: 16px;
    align-items: start;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.shipping-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.shipping-item i {
    font-size: 24px;
    color: #2563eb;
    margin-top: 4px;
}

.shipping-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #111827;
}

.shipping-item p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* Product Actions Section */
.product-actions-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-label {
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-btn:active {
    background: #d1d5db;
}

.qty-btn i {
    color: #6b7280;
    font-size: 14px;
}

.qty-input {
    width: 70px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.action-btn {
    padding: 1.25rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.action-btn span {
    position: relative;
    z-index: 1;
}

.action-btn i {
    position: relative;
    z-index: 1;
    font-size: 18px;
}

/* Add to Cart Button */
.action-btn.add-to-cart {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    width: 100%;
}

.action-btn.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.action-btn.add-to-cart:active {
    transform: translateY(0);
}

/* Buy Now Button */
.action-btn.buy-now {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    width: 100%;
}

.action-btn.buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

/* View Details Button */
.action-btn.view-full {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.action-btn.view-full:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Additional Actions */
.additional-actions {
    display: flex;
    gap: 16px;
}

.secondary-action {
    flex: 1;
    padding: 14px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
}

.secondary-action:hover {
    color: #2563eb;
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.secondary-action i {
    font-size: 18px;
}

.wishlist-btn.active i {
    color: #ef4444;
}

/* Shop Info Section */
.shop-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.shop-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.shop-badge i {
    color: #6366f1;
    font-size: 20px;
}

.shop-stats {
    display: flex;
    gap: 20px;
}

.shop-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6b7280;
}

.shop-stats .stat i {
    color: #fbbf24;
}

.contact-shop-btn {
    padding: 12px 24px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-shop-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        height: 100vh;
    }
    
    .product-images-section {
        padding: 24px;
        max-height: 40vh;
    }
    
    .main-image-container {
        aspect-ratio: 4/3;
    }
    
    .product-info-section {
        padding: 24px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tab-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        white-space: nowrap;
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .price-section {
        flex-direction: column;
        align-items: start;
    }
    
    .shop-info-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-shop-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Notification Styles */
.demo-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 400px;
}

.demo-notification.show {
    right: 20px;
}

.demo-notification.success {
    border-left: 4px solid #10b981;
}

.demo-notification.error {
    border-left: 4px solid #ef4444;
}

.demo-notification.info {
    border-left: 4px solid #3b82f6;
}
