/* Product Detail Page Styles */

/* Variation Selection */
.variation-select-btn {
    min-width: 120px;
    min-height: 70px;
    transition: all 0.3s ease;
    background: white;
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: visible;
}

.variation-select-btn:focus {
    outline: none !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

.variation-select-btn:hover:not(:disabled) {
    border-color: var(--primary-500);
    background-color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.variation-select-btn.selected {
    background: linear-gradient(135deg, var(--primary-500), #1d4ed8);
    color: white;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.variation-select-btn.selected::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 3px solid white;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.variation-select-btn:disabled {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #9ca3af;
    border-color: #d1d5db;
    cursor: not-allowed;
    position: relative;
    opacity: 0.7;
    transform: none;
}

.variation-select-btn:disabled::before {
    content: '✕';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 3px solid white;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Animation for selection */
.variation-select-btn.selected {
    animation: selectPulse 0.4s ease-out;
}

@keyframes selectPulse {
    0% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-3px);
    }
    100% {
        transform: scale(1) translateY(-2px);
    }
}

.dark .variation-select-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .variation-select-btn.selected {
    background-color: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

.dark .variation-select-btn:disabled {
    background-color: #1f2937;
    color: #6b7280;
    border-color: #374151;
}

/* Price Display */
.price-display {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
}

.dark .price-display {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
}

/* Quantity Selector */
.quantity-selector {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.quantity-selector:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .quantity-selector {
    background: #374151;
    border-color: #4b5563;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quantity-btn:hover {
    transform: scale(1.1);
}

.quantity-btn.increment:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.quantity-btn.decrement:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary-500) 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

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

/* Stock Status */
.stock-status {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-status.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Product Features */
.feature-item {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.dark .feature-item {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Service Features */
.service-feature {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-feature:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary-500);
    transform: translateY(-2px);
}

/* Image Gallery */
.product-image-main {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-image-main:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-image-thumb {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-image-thumb:hover {
    border-color: var(--primary-500);
    transform: scale(1.05);
}

.product-image-thumb.active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Tabs */
.tab-btn {
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.tab-btn.active::after,
.tab-btn:hover::after {
    width: 100%;
}

/* Reviews */
.review-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
}

.review-item:hover {
    border-left-color: var(--primary-500);
    background: rgba(59, 130, 246, 0.02);
}

/* Rating Stars */
.rating-star {
    transition: all 0.2s ease;
    cursor: pointer;
}

.rating-star:hover {
    transform: scale(1.2);
}

/* Product Tags */
.product-tag {
    background: linear-gradient(135deg, var(--primary-500) 0%, #1d4ed8 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.product-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .variation-select-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .add-to-cart-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .product-image-main {
        border-radius: 12px;
    }
    
    .feature-item {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Tooltip Improvements */
.tooltip .tooltiptext {
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip .tooltiptext::after {
    border-color: #1f2937 transparent transparent transparent;
}
