/*
 * CONNECTED — COD order form, cart order page and success page (Milestone 3).
 * Ported from the approved prototype (selectors unchanged; var(--x) → var(--cx-x)), plus small additions.
 * Loaded only on product pages, /order/ and /order/thanks/.
 */
body.kb .bnav,body.kb .sbar{transform:translateY(200%)}
.field input,.field select,.field textarea{height:50px;border:1.5px solid var(--cx-line);border-radius:11px;padding-inline:14px;background-color:#fff;width:100%;font-size:16px;scroll-margin-top:120px}
.field select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236B6573' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 14px center;padding-inline-end:14px;padding-inline-start:12px;padding-left:34px}
.field select:disabled{background-color:var(--cx-soft);color:var(--cx-muted)}
.field input:focus,.field select:focus{border-color:var(--cx-brand);outline:none;box-shadow:0 0 0 3px rgba(120,82,169,.15)}
.field.err input,.field.err select{border-color:var(--cx-sale);background-color:#FFF7F8}
.field .emsg{font-size:var(--cx-t-xs);color:var(--cx-sale);display:none;font-weight:500}
.field.err .emsg{display:block}
.row2{display:grid;gap:0 10px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.qty{display:inline-flex;align-items:center;border:1.5px solid var(--cx-line);border-radius:11px;height:50px;background:#fff;justify-self:start}
.qty button{width:46px;height:100%;font-size:20px;font-weight:500}
.qty span{min-width:28px;text-align:center;font-weight:700}
.dmeth{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.dm{border:1.5px solid var(--cx-line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;cursor:pointer;position:relative;background:#fff;min-height:74px;justify-content:center;line-height:1.45}
.dm input{position:absolute;opacity:0;pointer-events:none}
.dm b{font-size:var(--cx-t-sm)}
.dm span{font-size:var(--cx-t-xs);color:var(--cx-muted)}
.dm .fee{font-size:15px;font-weight:700;color:var(--cx-text);margin-top:2px}
.dm:has(input:checked){border-color:var(--cx-brand);background:var(--cx-tint);box-shadow:0 0 0 2px rgba(120,82,169,.15)}
.dm:has(input:focus-visible){outline:2px solid var(--cx-brand);outline-offset:2px}
.osum{background:#fff;border:1px solid var(--cx-form-line);border-radius:12px;padding:12px 14px;display:grid;gap:6px;margin:4px 0 14px;font-size:var(--cx-t-sm)}
.osum div{display:flex;justify-content:space-between;gap:10px}
.osum .grand{border-top:1px dashed var(--cx-form-line);padding-top:8px;margin-top:2px;font-size:17px;font-weight:700}
.osum .grand .num{color:var(--cx-brand-d)}
.osum .muted{color:var(--cx-muted)}
.osubmit{height:56px;font-size:17px}
.spin{width:18px;height:18px;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:none}
.busy .spin{display:block}
@keyframes spin{to{transform:rotate(360deg)}}
.co{display:grid;gap:20px;padding-block:14px 40px}
@media(min-width:960px){.co{grid-template-columns:1.2fr .8fr;gap:32px;align-items:start}.co-side{position:sticky;top:84px}}
.sum-line{display:flex;gap:12px;align-items:center;padding-block:10px;border-bottom:1px solid var(--cx-line)}
.sum-line img,.sum-line .ph{width:52px;height:65px;border-radius:8px;object-fit:cover;flex:none}
.sum-line .t{flex:1;min-width:0;line-height:1.45}
.sum-line .t b{display:block;font-size:var(--cx-t-sm);font-weight:600}
.sum-line .t span{font-size:var(--cx-t-xs);color:var(--cx-muted)}
.sum-line .p{font-weight:700;font-size:var(--cx-t-sm);white-space:nowrap}
.done{max-width:620px;margin:24px auto 40px;display:grid;gap:16px}
.done-top{text-align:center;display:grid;gap:8px;justify-items:center;padding:8px 0 4px}
.done .ok{width:84px;height:84px;border-radius:50%;background:var(--cx-ok);color:#fff;display:grid;place-items:center;box-shadow:0 0 0 10px var(--cx-ok-bg)}
.done .ok svg{width:42px;height:42px}
.done h1{font-size:26px;margin-top:14px}
.done-top p{margin:0;color:var(--cx-muted);font-size:var(--cx-t-md)}
.refbox{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1.5px dashed var(--cx-form-line);background:var(--cx-form-bg);border-radius:14px;padding:12px 14px}
.refbox small{display:flex;gap:6px;align-items:center;color:var(--cx-muted);font-size:var(--cx-t-xs)}
.refbox b{font-size:20px;letter-spacing:.04em;display:block}
.card{border:1px solid var(--cx-line);border-radius:16px;padding:16px}
.card h3{font-size:var(--cx-t-md);margin-bottom:6px}
.tot{display:grid;gap:6px;padding-top:12px;font-size:var(--cx-t-sm)}
.tot div{display:flex;justify-content:space-between;gap:10px}
.tot .grand{font-size:18px;font-weight:700;border-top:1px solid var(--cx-line);padding-top:10px;margin-top:4px}
.tot .grand .num{color:var(--cx-brand-d)}
.dest{display:grid;gap:6px;font-size:var(--cx-t-sm)}
.dest div{display:flex;gap:10px}
.dest span{color:var(--cx-muted);min-width:92px;flex:none}
.pledge{background:#FBFAF7;border:1px solid #ECE7DC;border-radius:16px;padding:20px 18px;display:grid;gap:12px;color:#3C3830;line-height:1.95}
.pledge p{margin:0}
.pledge .ayah{font-size:21px;font-weight:700;color:var(--cx-brand-d);text-align:center;line-height:1.9;padding:6px 0}
.pledge .ref{text-align:center;color:var(--cx-muted);font-size:var(--cx-t-sm)}
.cart-line{display:flex;gap:12px;padding-block:14px;border-bottom:1px solid var(--cx-line)}
.cart-line img,.cart-line .ph{width:64px;height:80px;border-radius:10px;object-fit:cover;flex:none}
.cart-line .t{flex:1;min-width:0;display:grid;gap:4px}
.cart-line .t b{font-size:var(--cx-t-sm);font-weight:600}
.cart-line .row{display:flex;justify-content:space-between;align-items:center}
.cart-line .qty{height:38px}
.cart-line .qty button{width:36px}
.cart-line .rm{font-size:var(--cx-t-xs);color:var(--cx-muted);text-decoration:underline;justify-self:start;padding:4px 0}
/* Additions */
.field input, .field select { color: var(--cx-text); box-shadow: none; margin: 0; }
.field input::placeholder { color: #9A93A5; }
.field select:disabled { background-color: var(--cx-soft); color: var(--cx-muted); }
#cPhone { text-align: right; }
.dm.na { opacity: .5; cursor: not-allowed; }
.dm.na .fee { font-size: var(--cx-t-xs); font-weight: 500; color: var(--cx-muted); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-err { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #FFF1F3; color: #9B1C2E; font-size: var(--cx-t-sm); font-weight: 500; }
.osubmit { gap: 10px; }
.osubmit[disabled] { opacity: .85; cursor: progress; }
.sbar .btn.busy .spin, .osubmit.busy .spin { display: block; }
.sbar .btn .spin { display: none; }
.sum-line img, .sum-line .ph { width: 52px; height: 65px; border-radius: 8px; object-fit: cover; flex: none; position: static; }
.sum-line .gone { color: var(--cx-sale); font-size: var(--cx-t-xs); font-weight: 700; }
.sum-line .qty { height: 34px; border-radius: 9px; margin-top: 4px; }
.sum-line .qty button { width: 32px; font-size: 17px; }
.sum-line .qty span { min-width: 22px; font-size: var(--cx-t-sm); }
.sum-line .rm { font-size: var(--cx-t-xs); color: var(--cx-muted); text-decoration: underline; margin-inline-start: 10px; }
.sum-line .t > div { display: flex; align-items: center; flex-wrap: wrap; }
.done .ok { margin-inline: auto; }
.refbox b { direction: ltr; }
.co .oform { scroll-margin-top: 90px; }
@media (max-width: 899px) {
	.field { margin-bottom: 10px; }
	.field input, .field select { height: 48px; }
	.dm { min-height: 66px; padding: 8px 10px; }
	.osum { margin: 2px 0 12px; }
	.osubmit { height: 52px; }
	.done { margin: 14px auto 28px; gap: 12px; }
	.done .ok { width: 68px; height: 68px; }
	.done .ok svg { width: 34px; height: 34px; }
	.done h1 { font-size: 22px; margin-top: 10px; }
	.pledge { padding: 16px 14px; }
	.pledge .ayah { font-size: 19px; }
}

.office-addr { margin: -4px 0 12px; font-size: var(--cx-t-xs); color: var(--cx-muted); }
.office-addr b { color: var(--cx-text); font-weight: 600; }

.paybox{border:1.5px solid var(--cx-brand)}
.paybox h3{margin-top:0}
.paybox p{margin:8px 0;line-height:1.7}
.paybox .refbox{margin:10px 0}
.paybox .refbox b{font-size:17px;white-space:nowrap;letter-spacing:.02em}
