/* =========================================
   1. GLOBAL WRAPPER & CARD
   ========================================= */
.quick-order-wrapper {
    width: 100%;
    max-width: 980px;
    margin: 30px auto; 
    padding: 45px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    border: 1px solid #f0f0f0;
}

/* Titles & Description */
.qo-main-title { 
    font-size: 30px;
    font-weight: 800; 
    color: #1a202c;
    text-align: center; 
    margin-bottom: 12px; 
    letter-spacing: -0.5px;
}

.qo-sub-title { 
    font-size: 16px;
    color: #718096;
    text-align: center; 
    margin-bottom: 45px; 
}

/* =========================================
   2. SECTION STYLING
   ========================================= */
.qo-section {
    margin-bottom: 40px;
}

.qo-label {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: #2d3748;
    display: block;
    border-left: 4px solid #004080;
    padding-left: 12px;
}

/* =========================================
   3. PRODUCT ROWS - FIXED LAYOUT
   ========================================= */
.qo-product-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    background: #fff;
    padding: 0;
    width: 100%;
}

.qo-select-wrapper {
    flex: 2;
    min-width: 180px;
    position: relative;
}

.qo-select-wrapper::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #a0aec0;
    border-bottom: 2px solid #a0aec0;
    position: absolute;
    right: 15px;
    top: 45%;
    transform: rotate(45deg);
    pointer-events: none;
}

.quick-order-form select, 
.quick-order-form input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 14px;
    color: #1a202c;
    appearance: none;
    transition: all 0.2s ease;
}

.quick-order-form select:focus, 
.quick-order-form input:focus {
    border-color: #004080;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 64, 128, 0.1);
    outline: none;
}

.qo-quantity {
    width: 80px !important;
    flex: 0 0 80px;
    text-align: center;
    font-weight: 600;
    background: #fff !important;
    border: 1px solid #e2e8f0;
}

/* =========================================
   4. DELETE BUTTON - FIXED
   ========================================= */
.qo-remove-product {
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    height: 42px !important;
    width: 80px !important;
    line-height: 42px !important;
    text-align: center !important;
    display: inline-block !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    flex: 0 0 80px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.qo-remove-product:hover {
    background: #fecaca !important;
    color: #991b1b !important;
}

/* =========================================
   5. ACF FIELDS CONTAINER
   ========================================= */
.qo-fields-container {
    width: 100%;
    margin-top: 15px;
    padding: 20px;
    background: #f9fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: none;
}

.qo-fields-loading {
    color: #718096;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
}

/* Product Fields Grid */
.product-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Full width field */
.field-item.full-width {
    width: 100%;
}

.field-item.full-width input {
    width: 100%;
}

/* Field Rows */
.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

/* Individual Field Items */
.field-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}

.field-item label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.field-item input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #ffffff;
    font-size: 14px;
    color: #1a202c;
}

.field-item input:focus {
    border-color: #004080;
    outline: none;
}

/* =========================================
   6. CHECKBOXES - DEFAULT HTML (NO CUSTOM STYLES)
   ========================================= */
.checkbox-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 25px !important;
    align-items: center !important;
    margin-top: 10px !important;
    width: 100%;
}

.field-item.checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-direction: row !important;
    min-width: auto !important;
}

/* Let browser handle checkbox appearance */
.field-item.checkbox input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    cursor: pointer !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    accent-color: #004080; /* optional: only changes tick color */
}

.field-item.checkbox label {
    font-size: 14px !important;
    color: #2d3748 !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

/* =========================================
   7. USER DETAILS GRID
   ========================================= */
.qo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* =========================================
   8. BUTTONS
   ========================================= */
.add-product-btn {
    background: transparent;
    border: 2px dashed #cbd5e0;
    color: #4a5568;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.add-product-btn:hover {
    border-color: #004080;
    color: #004080;
    background: #f8fafc;
}

.qo-submit-btn {
    width: 100%;
    background: #004080;
    color: #fff;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.qo-submit-btn:hover {
    background: #002856;
}

/* =========================================
   9. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    .qo-product-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qo-select-wrapper,
    .qo-quantity,
    .qo-remove-product {
        width: 100% !important;
        flex: auto !important;
    }
    
    .qo-grid {
        grid-template-columns: 1fr;
    }
    
    .field-row {
        flex-direction: column;
    }
    
    .checkbox-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .field-item {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .quick-order-wrapper { 
        padding: 25px; 
    }
    
    .qo-main-title { 
        font-size: 24px; 
    }
}