/* =====================================================
   Frontend Styles - Dark Theme Order Section
   @version 2.1.0
   ===================================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
    --dark-text: #f1f5f9;
    --dark-text-muted: #94a3b8;
}

* { box-sizing: border-box; }

body {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0f172a;
    color: #f1f5f9;
    line-height: 1.6;
}

/* ---- Order Section Dark Theme ---- */
.order-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.order-form-card {
    border-radius: 16px !important;
    border: 1px solid #334155;
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.order-form-card h3 {
    color: #818cf8;
    font-weight: 700;
}

.order-form-card .form-label {
    color: #e2e8f0;
}

.order-form-card hr {
    border-color: #334155;
}

/* Product Radio Boxes (Single Mode) */
.product-radio-box {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #334155;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #0f172a;
}

.product-radio-box:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.product-radio-box.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 4px 15px rgba(99, 102, 241, 0.3);
}

.product-radio-box input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    accent-color: #6366f1;
}

.product-radio-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}

.product-name {
    font-weight: 600;
    font-size: 1rem;
    color: #f1f5f9;
}

.product-price {
    font-size: 1rem;
    color: #22c55e;
}

.product-price del {
    color: #64748b;
    margin-right: 5px;
}

/* Product Checkbox Boxes (Multi Mode) */
.product-checkbox-box {
    padding: 15px 20px;
    border: 2px solid #334155;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #0f172a;
    transition: all 0.3s ease;
}

.product-checkbox-box:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.product-checkbox-box:has(input:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.product-checkbox-box input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #6366f1;
}

.product-checkbox-box .product-name {
    color: #f1f5f9;
}

.product-checkbox-box .product-price {
    color: #22c55e;
}

/* Quantity Controls */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-controls .btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    background: #334155;
    border-color: #334155;
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.qty-controls .btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    transform: scale(1.05);
}

.qty-controls .form-control {
    border-radius: 10px;
    border: 2px solid #334155;
    font-weight: 600;
    background: #0f172a;
    color: #f1f5f9;
}

.qty-controls .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #0f172a;
    color: #f1f5f9;
}

/* Shipping Options */
.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shipping-options .form-check {
    padding: 12px 15px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
    transition: all 0.3s ease;
}

.shipping-options .form-check:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.shipping-options .form-check:has(input:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.shipping-options .form-check-input {
    accent-color: #6366f1;
}

.shipping-options .form-check-label {
    color: #e2e8f0;
}

/* Order Summary Card */
.order-summary-card {
    border-radius: 16px !important;
    border: 1px solid #334155;
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.order-summary-card h4 {
    color: #818cf8;
    font-weight: 700;
}

.order-summary-card .table {
    font-size: 0.9rem;
    color: #e2e8f0;
}

.order-summary-card .table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #94a3b8;
    background: #0f172a;
}

.order-summary-card .table td {
    border-color: #334155;
    color: #e2e8f0;
}

.order-summary-card .table code {
    background: #334155;
    color: #818cf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Form Controls Dark */
.order-form-card .form-control-lg {
    border-radius: 12px;
    border: 2px solid #334155;
    padding: 12px 16px;
    font-size: 1rem;
    background: #0f172a;
    color: #f1f5f9;
    transition: all 0.3s ease;
}

.order-form-card .form-control-lg:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #0f172a;
    color: #f1f5f9;
}

.order-form-card .form-control-lg::placeholder {
    color: #64748b;
}

/* Submit Button */
#submitBtn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #6366f1 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

#submitBtn:disabled {
    opacity: 0.7;
}

/* Order Error & Loading */
#orderError {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    border-radius: 8px;
}

#orderLoading .spinner-border {
    border-color: rgba(99, 102, 241, 0.3);
    border-top-color: #6366f1;
}

#orderLoading p {
    color: #94a3b8;
}

/* Price Display */
#subtotal-display,
#shipping-display,
#total-display {
    color: #22c55e;
    font-family: 'Hind Siliguri', sans-serif;
}
.order-summary-card .table td {
    background: #0f172a;
}



/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-section {
        text-align: center;
        padding: 40px 0;
    }

    .hero-image {
        margin-top: 20px;
        max-height: 250px;
    }

    .product-radio-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .order-summary-card {
        position: static !important;
        margin-top: 20px;
    }

    .benefit-card {
        min-height: auto;
    }

    .discounted-price {
        font-size: 2rem;
    }

    .cta-btn {
        padding: 10px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.4rem;
    }

    .product-radio-box {
        padding: 12px 15px;
    }

    .order-form-card {
        padding: 20px 15px !important;
    }
}

/* ---- Animations ---- */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
