/* =====================================================
   Form Elements - Enhanced
   ===================================================== */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.form-group:focus-within label { color: var(--accent); }

.form-group .required { color: var(--danger); margin-right: 2px; }

.form-control {
    width: 100%;
    padding: 13px 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.3s ease;
    direction: rtl;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: var(--bg-card);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%239e9893'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

textarea.form-control { resize: vertical; min-height: 80px; }

/* Form Sections */
.form-section {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.form-section .form-group:last-child { margin-bottom: 0; }

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.form-section .form-control {
    background: var(--bg-card);
}

/* Form Row - two fields side by side */
.form-row {
    display: flex;
    gap: 14px;
}

@media (max-width: 520px) {
    .form-row { flex-direction: column; gap: 0; }
}

/* =====================================================
   Checkout Layout
   ===================================================== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
    margin: 30px auto;
    max-width: 920px;
}

/* Payment */
.payment-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.payment-method:hover { box-shadow: var(--shadow-glow); }

.payment-method h4 { font-size: 15px; font-weight: 700; }
.payment-method p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Summary */
.summary-card {
    position: sticky;
    top: 90px;
    background: var(--gradient-card);
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.cart-item:hover { padding-right: 6px; }
.cart-item:last-of-type { border-bottom: none; }

.cart-item-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.cart-item:hover .cart-item-image { transform: scale(1.05); }

.cart-item-details { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-qty { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.summary-row .label { color: var(--text-secondary); }
.summary-row .value { font-weight: 600; transition: all 0.3s; }
.summary-row.delivery .value { color: var(--success); font-weight: 700; }

.summary-row.total {
    padding-top: 16px;
    margin-top: 10px;
    border-top: 2px dashed var(--border);
    font-size: 18px;
}

.summary-row.total .label { font-weight: 700; }
.summary-row.total .value { font-weight: 800; color: var(--accent); font-size: 22px; }

/* =====================================================
   Stepper - Enhanced
   ===================================================== */
.stepper {
    max-width: 500px;
    margin: 30px auto 10px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step { display: flex; align-items: center; gap: 8px; }

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 2px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step.active .step-number {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.step.completed .step-number {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.step-label { font-size: 13px; color: var(--text-muted); font-weight: 500; transition: all 0.3s; }
.step.active .step-label { color: var(--accent); font-weight: 700; }

.step-line {
    flex: 0 0 50px;
    height: 2px;
    background: var(--border);
    margin: 0 6px;
    position: relative;
    overflow: hidden;
}

.step-line::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 0.6s ease;
}

.step.completed + .step-line::after { width: 100%; }
