/**
 * FORDIPS TECH - Enhanced Product Modal Styles
 * World-class e-commerce product experience
 */

/* ===== MODAL CONTAINER ===== */
.enhanced-product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.enhanced-product-modal.active {
    display: flex;
}

.enhanced-product-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.enhanced-product-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    background: white;
    border-radius: 16px;
    overflow-y: auto;
    z-index: 1;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* ===== PRODUCT LAYOUT ===== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 968px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

/* ===== IMAGE GALLERY SECTION ===== */
.product-gallery-section {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.gallery-main-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}

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

.gallery-main-image.zoomed {
    cursor: zoom-out;
}

.gallery-main-image.zoomed img {
    transform: scale(2);
    cursor: move;
}

.zoom-indicator {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gallery-main-image:hover .zoom-indicator {
    opacity: 1;
}

.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.gallery-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav-btn:hover {
    background: white;
    transform: scale(1.1);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.gallery-thumb {
    aspect-ratio: 1;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.gallery-thumb.active {
    border-color: #2563eb;
}

.gallery-thumb:hover {
    border-color: #60a5fa;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== PRODUCT INFO SECTION ===== */
.product-info-section {
    padding: 20px 0;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.product-badge-large {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.product-price-section {
    margin: 24px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.price-label {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    color: #2563eb;
}

.free-shipping-notice {
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.product-description {
    margin: 24px 0;
    padding: 20px;
    background: #f1f5f9;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
}

.product-description p {
    color: #475569;
    line-height: 1.8;
    margin: 0;
    font-size: 15px;
}

/* ===== VARIANTS CONTAINER ===== */
.variants-container {
    margin: 32px 0;
}

.variant-group {
    margin-bottom: 24px;
}

.variant-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

/* Color Selector */
.color-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-option.selected {
    border-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.color-option .check-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s;
}

.color-option.selected .check-mark {
    opacity: 1;
}

/* Option Selectors (Storage, Memory, etc.) */
.option-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.option-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.option-btn.selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.price-modifier {
    font-size: 12px;
    color: #10b981;
    font-weight: 700;
}

/* Vertical Option Selector (for bundles) */
.option-selector-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn-vertical {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn-vertical:hover {
    border-color: #2563eb;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.option-btn-vertical.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.option-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.option-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.option-price {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
}

/* ===== QUANTITY SECTION ===== */
.quantity-section {
    margin: 32px 0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-decrease,
.qty-increase {
    width: 48px;
    height: 48px;
    border: none;
    background: white;
    color: #2563eb;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-decrease:hover,
.qty-increase:hover {
    background: #eff6ff;
}

.qty-decrease:active,
.qty-increase:active {
    background: #dbeafe;
}

#productQuantity {
    width: 80px;
    height: 48px;
    border: none;
    border-left: 2px solid #e2e8f0;
    border-right: 2px solid #e2e8f0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
}

/* ===== PRODUCT ACTIONS ===== */
.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 32px 0;
}

.btn-add-to-cart-enhanced,
.btn-buy-now {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-add-to-cart-enhanced {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-add-to-cart-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

.btn-buy-now {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-buy-now:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .product-actions {
        grid-template-columns: 1fr;
    }
}

/* ===== SPECIFICATIONS SECTION ===== */
.specifications-section {
    margin: 40px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
}

.specifications-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #e2e8f0;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 12px 0;
}

.spec-label {
    font-weight: 600;
    color: #475569;
    width: 40%;
}

.spec-value {
    color: #1e293b;
}

/* ===== NOTIFICATIONS ===== */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    z-index: 100000;
    animation: slideInUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    max-width: 350px;
}

.notification-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.notification-toast.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .product-title {
        font-size: 24px;
    }

    .price-value {
        font-size: 28px;
    }

    .product-gallery-section {
        position: static;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .enhanced-product-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .product-detail-layout {
        padding: 16px;
        gap: 24px;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .color-option {
        width: 40px;
        height: 40px;
    }

    .option-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .quantity-controls {
        width: 100%;
    }

    .qty-decrease,
    .qty-increase {
        flex: 0 0 44px;
    }

    #productQuantity {
        flex: 1;
    }

    .notification-toast {
        right: 16px;
        left: 16px;
        bottom: 16px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.enhanced-product-content::-webkit-scrollbar {
    width: 8px;
}

.enhanced-product-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.enhanced-product-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.enhanced-product-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
