/* =========================================
   Base Layout & Container
   ========================================= */
.spw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.spw-header {
    margin-bottom: 30px;
}

.spw-header h1 {
    font-size: 24px;
    margin: 0 0 5px 0;
    color: #333;
}

.spw-header p {
    color: #666;
    margin: 0;
}

.spw-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

@media (max-width: 768px) {
    .spw-content {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Products Section (Left Side)
   ========================================= */
.spw-products-section h2,
.spw-payment-section h2 {
    font-size: 18px;
    color: #2563eb;
    margin: 0 0 20px 0;
}

.spw-products-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 5px;
}

.spw-product-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spw-product-item:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.spw-product-item.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.spw-product-checkbox {
    flex-shrink: 0;
    padding-top: 3px;
}

.spw-product-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.spw-product-info h3 {
    font-size: 16px;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.spw-product-price {
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 8px;
}

.spw-product-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

/* =========================================
   Payment Section (Right Side)
   ========================================= */
.spw-payment-section {
    border-left: 1px solid #e5e7eb;
    padding-left: 30px;
}

@media (max-width: 768px) {
    .spw-payment-section {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-left: 0;
        padding-top: 30px;
    }
}

/* Order Summary Box */
.spw-order-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.spw-order-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.spw-order-line:last-child {
    border-bottom: none;
}

.spw-order-total {
    font-size: 20px;
    font-weight: 700;
    color: #0f6d52; /* OnePay Brand Green */
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #0f6d52;
}

.spw-amount-value {
    font-weight: 600;
}

.spw-delivery-charge-line {
    font-size: 14px;
    color: #64748b;
}

/* =========================================
   Form Styles
   ========================================= */
.spw-payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spw-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spw-form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.spw-form-group input[type="text"],
.spw-form-group input[type="email"],
.spw-form-group input[type="tel"],
.spw-form-group input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.spw-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.spw-form-group.has-error input {
    border-color: #ef4444;
}

.spw-error-message {
    font-size: 12px;
    color: #ef4444;
    display: none;
}

.spw-form-group.has-error .spw-error-message {
    display: block;
}

/* Form Row (City & Postcode) */
.spw-form-row {
    display: flex;
    gap: 15px;
}
.spw-form-row .spw-form-group {
    flex: 1;
}
@media (max-width: 600px) {
    .spw-form-row {
        flex-direction: column;
        gap: 20px;
    }
}

/* Terms Checkbox */
.spw-terms label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.spw-terms input[type="checkbox"] {
    margin-top: 2px;
}

.spw-terms a {
    color: #2563eb;
    text-decoration: none;
}

.spw-terms a:hover {
    text-decoration: underline;
}

/* Submit Button */
.spw-form-actions {
    margin-top: 10px;
}

.spw-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.spw-btn-primary:hover {
    background: #1d4ed8;
}

.spw-btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.required {
    color: #ef4444;
}