/* === ORDER MODAL - FORCE CORRECT LAYOUT === */
.order-modal {
    max-width: 1200px !important;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem !important;
}

/* CRITICAL: Override any grid layout from styles.css */
#order-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    grid-template-columns: unset !important;
}

/* Smooth scroll behavior */
.order-modal {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-tertiary);
}

.order-modal::-webkit-scrollbar {
    width: 8px;
}

.order-modal::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.order-modal::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* === FORM LAYOUT === */
#order-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form sections */
#order-form-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* === FORM SECTION - CARD STYLE === */
.form-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-section:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.form-section:hover::before {
    opacity: 1;
}

.form-section h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h3::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* === PRICE SUMMARY - DEPRECATED BLUE THEME (COMMENTED OUT) === 
.price-summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(30, 41, 59, 0.8)) !important;
    border: 2px solid var(--primary);
    padding: 2rem !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 0 !important;
    margin-top: 1rem !important;
}

.price-summary::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark), var(--primary));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
    filter: blur(10px);
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0 !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.price-row:hover {
    padding-left: 0.5rem;
    color: var(--primary-light);
}

.price-row span:last-child {
    font-weight: 600;
    color: var(--primary-light);
}

.price-row.total {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    color: white !important;
    padding-top: 1.5rem !important;
    margin-top: 1rem !important;
    border-top: 2px solid var(--primary) !important;
    border-bottom: none !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), transparent);
    padding: 1.5rem !important;
    margin: 1rem -1rem 0 !important;
    border-radius: 12px;
}

.price-row.total span:last-child {
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    animation: priceGlow 2s ease-in-out infinite;
}

@keyframes priceGlow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }

    50% {
        text-shadow: 0 0 30px rgba(245, 158, 11, 0.8), 0 0 40px rgba(245, 158, 11, 0.4);
    }
}
*/

/* === FORM ACTIONS BUTTONS === */
.form-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    padding: 1.125rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.form-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-actions button:hover::before {
    width: 300px;
    height: 300px;
}

.form-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
}

/* === UPLOAD AREA ENHANCEMENTS === */
.upload-area {
    border: 3px dashed rgba(99, 102, 241, 0.3) !important;
    border-radius: 16px !important;
    padding: 3.5rem 2rem !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), transparent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.upload-area::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
    transform: scale(1.02);
}

.upload-area:hover::after {
    opacity: 1;
}

.upload-area i {
    font-size: 4rem !important;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.upload-area p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-area span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === UPLOADED FILES GRID === */
.uploaded-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.file-preview {
    border: 2px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
    background: var(--bg-tertiary) !important;
    transition: all 0.3s ease;
    position: relative;
}

.file-preview:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.file-preview img {
    border-radius: 8px !important;
    height: 120px !important;
}

.file-remove {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: var(--danger) !important;
    transition: all 0.3s ease;
}

.file-remove:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* === RESPONSIVE - MOBILE === */
@media (max-width: 1024px) {
    #order-form {
        grid-template-columns: 1fr;
    }

    .price-summary {
        position: relative;
        top: 0;
        order: -1;
        /* Show price summary at top on mobile */
    }

    .form-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .order-modal {
        padding: 1.5rem !important;
    }

    .form-section {
        padding: 1.5rem;
    }

    .price-summary {
        padding: 1.5rem !important;
    }

    .form-actions button {
        padding: 1rem 1.5rem;
    }

    .uploaded-files {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* =============================================
   PRODUCT DETAILS (NEW E-COMMERCE LAYOUT)
   ============================================= */

.product-details-container {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    width: 100%;
    align-items: flex-start;
}

/* ===== LEFT PANE: GALLERY ===== */
.product-gallery {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex: 0 0 55%;
    max-width: 55%;
}

.product-thumbnails-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 80px;
    flex-shrink: 0;
    max-height: 600px;
    overflow-y: auto;
    /* Hide scrollbar for a cleaner look */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.product-thumbnails-vertical::-webkit-scrollbar {
    display: none;
}

.vertical-thumbnail {
    width: 100%;
    aspect-ratio: 3/4;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.vertical-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vertical-thumbnail.active {
    border-color: var(--primary);
}

.product-main-image-container {
    position: relative;
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 3/4;
}

.product-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Overlays on Main Image */
.best-seller-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #000;
    color: #fff;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #333;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}
.wishlist-btn:hover {
    transform: scale(1.1);
}

.cart-icon-btn {
    position: absolute;
    bottom: 45px; /* Above the caption */
    right: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    color: #333;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}
.cart-icon-btn:hover {
    transform: scale(1.1);
}

.model-height-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* ===== RIGHT PANE: PRODUCT INFO ===== */
.product-info-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
    flex: 1;
    padding-right: 15px;
}

.share-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    opacity: 0.8;
}
.share-btn:hover {
    opacity: 1;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f59e0b; /* Amber */
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.rating-stars span {
    color: var(--text-muted);
    font-weight: 400;
}

.product-price-section {
    margin-bottom: 1.5rem;
}

.product-price-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    display: block;
}

.tax-inclusive {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.discount-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981; /* Green */
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 2rem;
    cursor: pointer;
}

.color-selection h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.color-selection h4 span {
    font-weight: 400;
    color: var(--text-muted);
}

.color-swatches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.color-swatch-item {
    width: 55px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
}

.color-swatch-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.color-swatch-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.color-swatch-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Reusing existing .model-size-selection and .preview-quantity-section styling, 
   just ensure they fit well within the right pane */
.preview-quantity-section {
    margin-top: 1.5rem;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .product-details-container {
        flex-direction: column;
    }
    .product-gallery {
        max-width: 100%;
        flex: 1 1 100%;
    }
    .product-info-pane {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .product-gallery {
        flex-direction: column-reverse;
    }
    .product-thumbnails-vertical {
        flex-direction: row;
        width: 100%;
        height: 80px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .vertical-thumbnail {
        width: 60px;
        aspect-ratio: 3/4;
        height: 100%;
    }
}