/* Product Buy Page Styles - Modern Dark Theme */

.product-buy-page {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    min-height: 100vh;
    position: relative;
}

.product-buy-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.product-buy-container {
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Enhanced Product Gallery */
.product-gallery .main-image {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.product-gallery img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-gallery .main-image:hover img {
    transform: scale(1.03);
}

/* Enhanced Discount Badge */
.discount-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 3rem;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 
        0 10px 25px rgba(238, 90, 36, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Enhanced Thumbnails */
.image-thumbnails .thumbnail {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.image-thumbnails .thumbnail:hover,
.image-thumbnails .thumbnail.active {
    opacity: 1;
    border-color: #667eea;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(102, 126, 234, 0.3);
}

/* Enhanced Vendor Card */
.vendor-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.vendor-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.vendor-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.vendor-name { 
    color: #fff; 
    font-weight: 700; 
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vendor-type { 
    color: rgba(255, 255, 255, 0.8); 
    font-size: 0.95rem; 
}

.vendor-rating .rating-stars { 
    color: #ffd700; 
    font-size: 1.8rem; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vendor-rating .rating-count { 
    color: #fff; 
    margin-left: 0.5rem; 
    font-weight: 600; 
}

/* Enhanced Product Details */
.product-details {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 2rem;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.sticky-summary { 
    position: sticky; 
    top: 2rem; 
}

/* Enhanced Typography */
.product-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.product-title-ar {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.product-description { 
    color: rgba(255, 255, 255, 0.85); 
    line-height: 1.7; 
    margin-bottom: 0.75rem; 
    font-size: 1.05rem;
}

.product-description-ar { 
    color: rgba(255, 255, 255, 0.75); 
    line-height: 1.7; 
    margin-bottom: 1.5rem; 
    font-size: 1rem;
}

.product-meta { 
    display: flex; 
    gap: 1.5rem; 
    margin-bottom: 1.5rem; 
    align-items: center;
}

.product-sku { 
    color: rgba(255, 255, 255, 0.6); 
    font-size: 0.95rem; 
    font-family: 'Courier New', monospace;
}

.limited-badge { 
    background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%); 
    color: #fff; 
    padding: 0.5rem 1rem; 
    border-radius: 2rem; 
    font-size: 0.85rem; 
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Pricing Section */
.pricing-section { 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); 
    border-radius: 1.5rem; 
    padding: 2rem; 
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.price-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.75rem; 
    padding: 0.5rem 0;
}

.price-label { 
    color: rgba(255, 255, 255, 0.8); 
    font-weight: 500; 
    font-size: 1rem;
}

.base-price, .discount-amount, .adjustment-amount { 
    color: #fff; 
    font-weight: 700; 
    font-size: 1.1rem;
}

.discount-amount { 
    color: #4ade80; 
    font-weight: 800;
}

.adjustment-amount { 
    color: #fbbf24; 
    font-weight: 800;
}

.total-row { 
    border-top: 2px solid rgba(255, 255, 255, 0.2); 
    padding-top: 1rem; 
    margin-top: 1rem; 
    margin-bottom: 0; 
}

.final-price { 
    color: #4ade80; 
    font-size: 1.8rem; 
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Enhanced Selection Sections */
.selection-section { 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); 
    border-radius: 1.5rem; 
    padding: 2rem; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.selection-title { 
    color: #fff; 
    font-weight: 700; 
    margin-bottom: 1.25rem; 
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selection-title i {
    color: #667eea;
    font-size: 1.4rem;
}

.selection-description { 
    color: rgba(255, 255, 255, 0.75); 
    margin-bottom: 1.25rem; 
    font-size: 1rem;
    line-height: 1.6;
}

.selection-limit { 
    color: rgba(255, 255, 255, 0.6); 
    font-size: 0.9rem; 
    margin-bottom: 1.25rem; 
    font-style: italic;
    padding: 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 0.75rem;
    border-left: 4px solid #ffc107;
}

.required-indicator { 
    color: #ef4444; 
    font-weight: 800;
    font-size: 1.2rem;
}

/* Enhanced Quantity Options */
.quantity-options { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.25rem; 
}

.quantity-option-card { 
    position: relative; 
}

.quantity-radio { 
    display: none; 
}

.quantity-label { 
    display: block; 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); 
    border: 2px solid rgba(255, 255, 255, 0.2); 
    border-radius: 1.25rem; 
    padding: 1.5rem; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quantity-label::before { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    opacity: 0; 
    transition: opacity 0.4s ease; 
    z-index: -1; 
}

.quantity-radio:checked + .quantity-label { 
    border-color: #667eea; 
    color: #fff; 
    transform: translateY(-4px);
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.4),
        0 0 0 2px rgba(102, 126, 234, 0.3);
}

.quantity-radio:checked + .quantity-label::before { 
    opacity: 0.15; 
}

.quantity-label:hover { 
    border-color: #667eea; 
    transform: translateY(-2px); 
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.option-main { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 0.75rem; 
}

.option-name { 
    font-weight: 700; 
    color: #fff; 
    font-size: 1.1rem;
}

.option-name-ar { 
    font-size: 1rem; 
    color: rgba(255, 255, 255, 0.8); 
    display: block; 
    margin-top: 0.25rem;
}

.option-details { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.option-quantity { 
    color: rgba(255, 255, 255, 0.7); 
    font-size: 0.95rem; 
}

.option-price { 
    color: #4ade80; 
    font-weight: 700; 
    font-size: 1.1rem;
}

.stock-warning { 
    color: #ef4444; 
    font-size: 0.85rem; 
    margin-top: 0.75rem; 
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    border-left: 3px solid #ef4444;
}

/* Enhanced Variation & Extra Options */
.variation-options, .extra-options { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.25rem; 
}

.variation-option-card, .extra-option-card { 
    position: relative; 
}

.variation-checkbox, .variation-radio, .extra-checkbox { 
    display: none; 
}

.variation-label, .extra-label { 
    display: block; 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); 
    border: 2px solid rgba(255, 255, 255, 0.2); 
    border-radius: 1.25rem; 
    padding: 1.5rem; 
    cursor: pointer; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    text-align: center; 
    position: relative; 
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.variation-label::before, .extra-label::before { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    opacity: 0; 
    transition: opacity 0.4s ease; 
    z-index: -1; 
}

.variation-checkbox:checked + .variation-label,
.variation-radio:checked + .variation-label,
.extra-checkbox:checked + .extra-label { 
    border-color: #667eea; 
    color: #fff; 
    transform: translateY(-4px);
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.4),
        0 0 0 2px rgba(102, 126, 234, 0.3);
}

.variation-checkbox:checked + .variation-label::before,
.variation-radio:checked + .variation-label::before,
.extra-checkbox:checked + .extra-label::before { 
    opacity: 0.15; 
}

.variation-label:hover, .extra-label:hover { 
    border-color: #667eea; 
    transform: translateY(-2px); 
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.option-image { 
    margin-bottom: 0.75rem; 
}

.option-img { 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.option-text { 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
}

.option-price-adj { 
    color: #fbbf24; 
    font-weight: 600; 
    font-size: 1rem;
}

/* Enhanced Actions Section */
.actions-section { 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); 
    border-radius: 1.5rem; 
    padding: 2rem; 
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.quantity-controls { 
    display: flex; 
    align-items: center; 
    gap: 1.25rem; 
    max-width: 220px; 
}

.quantity-btn { 
    width: 45px; 
    height: 45px; 
    border: none; 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)); 
    color: #fff; 
    border-radius: 50%; 
    font-size: 1.3rem; 
    font-weight: 800; 
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quantity-btn:hover { 
    background: linear-gradient(145deg, #667eea, #764ba2); 
    transform: scale(1.1); 
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.quantity-input { 
    width: 90px; 
    height: 45px; 
    text-align: center; 
    border: 2px solid rgba(255, 255, 255, 0.2); 
    border-radius: 0.75rem; 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
    font-weight: 700; 
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.quantity-input:focus { 
    outline: none; 
    border-color: #667eea; 
    background: rgba(255, 255, 255, 0.15); 
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.action-buttons { 
    display: flex; 
    gap: 1.25rem; 
    flex-wrap: wrap; 
    margin-top: 1.5rem;
}

.btn-buy { 
    flex: 1; 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%); 
    color: #fff; 
    border: none; 
    padding: 1.25rem 2.5rem; 
    border-radius: 1rem; 
    font-weight: 700; 
    font-size: 1.2rem; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-buy::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;
}

.btn-buy:hover::before {
    left: 100%;
}

.btn-buy:hover { 
    background: linear-gradient(135deg, #059669 0%, #10b981 100%); 
    transform: translateY(-3px); 
    box-shadow: 
        0 20px 40px rgba(16, 185, 129, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.2);
}

.btn-favorite, .btn-share { 
    width: 55px; 
    height: 55px; 
    border: 2px solid rgba(255, 255, 255, 0.3); 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)); 
    color: #fff; 
    border-radius: 1rem; 
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    font-size: 1.3rem;
}

.btn-favorite:hover, .btn-share:hover { 
    border-color: #667eea; 
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.3), rgba(102, 126, 234, 0.1)); 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Enhanced Focus States */
.quantity-label:focus, .variation-label:focus, .extra-label:focus, 
.btn-buy:focus, .btn-favorite:focus, .btn-share:focus { 
    outline: 3px solid #667eea; 
    outline-offset: 3px; 
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #fff;
    font-weight: 600;
}

.notification-message {
    flex: 1;
    margin-right: 1rem;
}

.notification-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.notification-info {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * { 
        transition: none !important; 
        animation: none !important;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .product-buy-container { 
        padding: 1.5rem; 
    }
    
    .product-details { 
        padding: 2rem; 
    }
    
    .quantity-options, 
    .variation-options, 
    .extra-options { 
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    }
}

@media (max-width: 768px) {
    .product-buy-container { 
        padding: 1rem; 
    }
    
    .product-details { 
        padding: 1.5rem; 
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .product-title-ar {
        font-size: 1.5rem;
    }
    
    .quantity-options,
    .variation-options,
    .extra-options { 
        grid-template-columns: 1fr; 
    }
    
    .action-buttons { 
        flex-direction: column; 
    }
    
    .btn-favorite, .btn-share { 
        width: 100%; 
        height: 50px; 
    }
    
    .discount-badge {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .product-buy-container { 
        padding: 0.75rem; 
    }
    
    .product-details { 
        padding: 1.25rem; 
    }
    
    .product-title {
        font-size: 1.75rem;
    }
    
    .product-title-ar {
        font-size: 1.25rem;
    }
    
    .pricing-section,
    .selection-section,
    .actions-section {
        padding: 1.5rem;
    }
    
    .quantity-controls {
        max-width: 100%;
    }
    
    .quantity-input {
        flex: 1;
    }
}


