/* STRITA checkout */
.co {
  --accent: #ecebe6;
  --accent-2: #9b9a96;
  --glow: rgba(255, 255, 255, 0.1);
  --field: rgba(255, 255, 255, 0.035);
  --edge: rgba(255, 255, 255, 0.13);
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: var(--sans);
  color: var(--ink);
}
.co[hidden] { display: none; }
.co--crimson { --accent: #ffc1c7; --accent-2: #b01424; --glow: rgba(190, 20, 40, 0.3); --edge: rgba(255, 140, 150, 0.17); }
.co-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 4, 0.78);
  backdrop-filter: blur(16px) saturate(120%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.co-panel {
  position: relative;
  width: min(1160px, 100%);
  height: min(900px, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 1px solid var(--edge);
  background:
    radial-gradient(90% 60% at 85% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, rgba(20, 20, 22, 0.98), rgba(8, 8, 9, 0.99));
  box-shadow: 0 50px 140px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px) scale(0.975);
  transition: opacity 0.5s var(--ease), transform 0.65s var(--ease);
}
.co.open .co-backdrop { opacity: 1; }
.co.open .co-panel { opacity: 1; transform: none; }
.co-panel--done { width: min(620px, 100%); height: auto; max-height: calc(100dvh - 40px); }

.co-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.co-brand { font-family: var(--wide); font-size: 12px; letter-spacing: 0.5em; color: #f4f1ea; }
.co-secure { display: inline-flex; align-items: center; gap: 8px; font-family: var(--wide); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.co[dir="rtl"] .co-secure { letter-spacing: 0.05em; font-family: var(--sans); font-size: 12.5px; }
.co-x {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8e6e0;
  transition: background 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.co-x:hover { background: rgba(255, 255, 255, 0.07); border-color: #fff; transform: rotate(90deg); }

.co-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 100%; }

.co-form { padding: 34px clamp(22px, 4vw, 56px) 50px; display: grid; gap: 34px; align-content: start; }
.co-kicker { margin: 0; font-family: var(--wide); font-size: 10.5px; letter-spacing: 0.44em; color: var(--accent); opacity: 0.85; }
.co[dir="rtl"] .co-kicker { letter-spacing: 0.12em; font-size: 12px; }
.co-head h2, .co-done h2 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 0%, #dedcd6 42%, #8f8e8a 64%, #f3f1ec 84%, #b5b4b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.co[dir="rtl"] .co-head h2, .co[dir="rtl"] .co-done h2 { font-family: var(--head); letter-spacing: 0; line-height: 1.35; }
.co--crimson .co-head h2, .co--crimson .co-done h2 { background-image: linear-gradient(180deg, #fff 0%, #ffd9dc 40%, #c2394a 66%, #ffe3e6 86%, #e08a94 100%); }

.co-step { display: grid; gap: 16px; }
.co-step h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 2px;
  font-family: var(--head);
  font-weight: 400;
  font-size: 21px;
}
.co-step h3 span {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.1em;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--edge);
  color: var(--accent);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 60%);
}
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.co-field { position: relative; display: grid; gap: 8px; }
.co-field > label, .co-gov > label { font-size: 13px; color: #c9c7c1; letter-spacing: 0.02em; }
.co-field input, .co-field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: #f6f4ef;
  background: var(--field);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.co-field textarea { min-height: 76px; }
.co-field input::placeholder, .co-field textarea::placeholder { color: rgba(244, 241, 234, 0.3); }
.co-field input:hover, .co-field textarea:hover { border-color: rgba(255, 255, 255, 0.22); }
.co-field input:focus, .co-field textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.co-field.bad input, .co-field.bad textarea, .co-field.bad .co-gov-btn { border-color: #e0525e; box-shadow: 0 0 0 4px rgba(224, 82, 94, 0.12); }
.co-err { margin: 0; min-height: 0; font-size: 12.5px; color: #ff8a94; }
.co-err:empty { display: none; }
.co-phone { position: relative; display: flex; direction: ltr; }
.co-cc {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  color: #d9d7d1;
  letter-spacing: 0.04em;
}
.co-phone input { border-radius: 0 14px 14px 0; letter-spacing: 0.06em; }

/* governorate */
.co-gov { position: relative; }
.co-gov-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--field);
  color: #f6f4ef;
  font: inherit;
  font-size: 16px;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.co-gov-btn:hover { border-color: rgba(255, 255, 255, 0.24); }
.co-gov.open .co-gov-btn { border-color: var(--accent); background: rgba(255, 255, 255, 0.055); }
.co-gov-btn > svg:first-child { color: var(--accent); flex: none; }
.co-gov-btn span { flex: 1; }
.co-gov:not(.filled) .co-gov-btn span { color: rgba(244, 241, 234, 0.4); }
.co-gov-btn em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.co-gov-btn > svg:last-child { flex: none; opacity: 0.6; transition: transform 0.35s var(--ease); }
.co-gov.open .co-gov-btn > svg:last-child { transform: rotate(180deg); }
.co-gov-pop {
  position: absolute;
  z-index: 5;
  top: calc(100% - 18px);
  inset-inline: 0;
  border-radius: 18px;
  border: 1px solid var(--edge);
  background: rgba(16, 16, 18, 0.98);
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: co-pop 0.35s var(--ease);
}
@keyframes co-pop { from { opacity: 0; transform: translateY(-8px); } }
.co-gov-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: var(--muted); }
.co-gov-search input { flex: 1; background: none; border: 0; outline: none; color: #f6f4ef; font: inherit; font-size: 15px; padding: 4px 0; }
.co-gov-pop ul { list-style: none; margin: 0; padding: 6px; max-height: 290px; overflow-y: auto; scrollbar-width: thin; }
.co-gov-pop li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}
.co-gov-pop li span { flex: 1; }
.co-gov-pop li b { font-weight: 400; font-size: 13px; color: var(--muted); }
.co-gov-pop li:hover, .co-gov-pop li:focus { background: rgba(255, 255, 255, 0.07); }
.co-gov-pop li[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); }
.co-gov-pop li[aria-selected="true"] span::after { content: " ✓"; color: var(--accent); }
.co-fast { display: grid; color: #ffd36b; }
.co-fast svg { width: 15px; height: 15px; }
.co-none { color: var(--muted); cursor: default !important; }

/* shipping & payment cards */
.co-methods { display: grid; gap: 12px; }
.co-method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--field);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease);
}
.co-method:hover { border-color: rgba(255, 255, 255, 0.24); }
.co-method input { position: absolute; opacity: 0; pointer-events: none; }
.co-method.on {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.co-method:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.co-method::after {
  content: "";
  position: absolute;
  inset-inline-end: 18px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}
.co-method.on::after { border: 5px solid var(--accent); }
.co-m-icon {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}
.co-method--express .co-m-icon { color: #ffd36b; border-color: rgba(255, 211, 107, 0.3); background: radial-gradient(circle at 30% 20%, rgba(255, 211, 107, 0.18), transparent 70%); }
.co-m-copy { flex: 1; display: grid; gap: 4px; padding-inline-end: 26px; }
.co-m-copy strong { font-weight: 500; font-size: 16px; }
.co-m-copy small { font-size: 13px; color: #b5b3ad; line-height: 1.5; }
.co-late { color: #ffcf8a !important; }
.co-badge {
  justify-self: start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 211, 107, 0.35);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #ffd36b;
}
.co-method > b { font-family: var(--display); font-weight: 500; font-size: 17px; white-space: nowrap; margin-top: 18px; }
.co-free { color: #8fe3b0; letter-spacing: 0.06em; }
.co-cod { cursor: default; }
.co-cod::after { display: none; }
.co-hint { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 18px; border-radius: 16px; border: 1px dashed rgba(255, 255, 255, 0.16); color: var(--muted); font-size: 14px; }
.co-methods.bad .co-method { border-color: rgba(224, 82, 94, 0.6); }

.co-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.co-formerr { margin: 0; color: #ff8a94; font-size: 14px; }
.co-formerr:empty { display: none; }

/* summary */
.co-side { border-inline-start: 1px solid rgba(255, 255, 255, 0.07); background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%); }
.co-side-in { position: sticky; top: 0; padding: 34px 30px 30px; display: grid; gap: 20px; }
.co-side h3 { margin: 0; font-family: var(--wide); font-weight: 500; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); }
.co[dir="rtl"] .co-side h3 { font-family: var(--head); font-size: 18px; letter-spacing: 0; text-transform: none; color: #e8e6e0; }
.co-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.co-item { display: flex; align-items: center; gap: 14px; }
.co-thumb {
  position: relative;
  flex: none;
  width: 62px;
  height: 78px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 30%, #3a3a3c, #111 75%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
}
.co-item--crimson .co-thumb { background: radial-gradient(circle at 50% 30%, #5a1219, #140507 75%); }
.co-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 5px; box-sizing: border-box; object-fit: contain; }
.co-thumb i {
  position: absolute;
  top: -7px;
  inset-inline-end: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  background: #f4f1ea;
  color: #0a0a0a;
}
.co-i-name { flex: 1; display: grid; gap: 4px; min-width: 0; }
.co-i-name b { font-family: var(--wide); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; }
.co-i-name small { color: var(--muted); font-size: 12.5px; }
.co-i-price { font-size: 14px; white-space: nowrap; }
.co-freebar { display: grid; gap: 8px; font-size: 12.5px; color: #cfcdc7; }
.co-freebar i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
.co-freebar i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: transform 0.7s var(--ease); }
.co[dir="rtl"] .co-freebar i::after { transform-origin: right; }
.co-freebar.done { color: #8fe3b0; }
.co-freebar.done i::after { background: linear-gradient(90deg, #3aa86b, #8fe3b0); }
.co-sum { margin: 0; display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.co-sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.co-sum dt { color: #bdbbb5; }
.co-sum dd { margin: 0; }
.co-muted { color: var(--muted); font-size: 13px; }
.co-total { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); align-items: baseline; }
.co-total dt { font-size: 15px; color: #f4f1ea; }
.co-total dd { font-family: var(--display); font-size: 26px; font-weight: 500; }

.co-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 18px 24px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #0b0b0b;
  background: linear-gradient(180deg, #ffffff, #d9d7d1 55%, #f2f0ea);
  box-shadow: 0 18px 40px -16px rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.co--crimson .co-submit { color: #fff; background: linear-gradient(180deg, #d22a3a, #8d0f1b 60%, #b51d2c); box-shadow: 0 18px 40px -16px rgba(210, 40, 60, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.co-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: co-sheen 4s ease-in-out infinite 1s;
}
@keyframes co-sheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.co-submit:hover { transform: translateY(-2px); }
.co-submit:disabled { cursor: progress; opacity: 0.8; transform: none; }
.co-submit.busy .co-sub-l::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-inline-end: 10px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: co-spin 0.8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-sub-t { font-family: var(--display); font-size: 17px; }
.co-privacy { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--muted); }
.co-privacy svg { flex: none; }

.co-mobsum, .co-mobsum-body, .co-bar { display: none; }

/* success */
.co-done { padding: 40px clamp(24px, 6vw, 56px) 44px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.co-check { width: 96px; height: 96px; margin-bottom: 6px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 40%, transparent)); }
.co-check circle { stroke-dasharray: 340; stroke-dashoffset: 340; animation: co-draw 1s var(--ease) 0.15s forwards; stroke-width: 1.4; }
.co-check path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: co-draw 0.6s var(--ease) 0.85s forwards; }
@keyframes co-draw { to { stroke-dashoffset: 0; } }
.co-done h2 { margin-top: 2px; }
.co-done-sub { margin: 0; max-width: 28rem; color: #cfcdc7; font-size: 15.5px; line-height: 1.7; }
.co-ticket {
  width: 100%;
  margin-top: 14px;
  padding: 8px 22px;
  border-radius: 20px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.03);
  text-align: start;
}
.co-ticket div { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); font-size: 14px; }
.co-ticket div:last-child { border: 0; }
.co-ticket span { color: var(--muted); }
.co-ticket b { font-weight: 500; text-align: end; }
.co-ticket div:first-child b { font-family: var(--display); font-size: 18px; letter-spacing: 0.08em; color: var(--accent); }
.co-ticket-total b { font-family: var(--display); font-size: 20px; }
.co-done-actions { width: 100%; display: grid; gap: 10px; margin-top: 10px; }
.co-done-actions .co-submit { justify-content: center; }
.co-ghost {
  display: block;
  padding: 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e8e6e0;
  font-size: 14.5px;
  transition: border-color 0.3s, background 0.3s;
}
.co-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.05); }

/* phones: full-height sheet, summary folds in, sticky place-order bar */
@media (max-width: 900px) {
  .co { padding: 0; place-items: end stretch; }
  .co-panel { width: 100%; height: 100dvh; border-radius: 0; border: 0; transform: translateY(40px); }
  .co-panel--done { height: auto; max-height: 94dvh; border-radius: 26px 26px 0 0; }
  .co-grid { grid-template-columns: 1fr; }
  .co-side { display: none; }
  .co-form { padding: 24px 20px 120px; gap: 30px; }
  .co-row { grid-template-columns: 1fr; }
  .co-mobsum {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--edge);
    background: rgba(255, 255, 255, 0.04);
    color: #e8e6e0;
    font: inherit;
    font-size: 14px;
  }
  .co-mobsum span { flex: 1; text-align: start; }
  .co-mobsum b { font-family: var(--display); font-weight: 500; font-size: 16px; }
  .co-mobsum[aria-expanded="true"] svg { transform: rotate(180deg); }
  .co-mobsum-body:not([hidden]) { display: grid; gap: 16px; margin-top: -18px; padding: 18px 16px; border-radius: 0 0 14px 14px; border: 1px solid var(--edge); border-top: 0; }
  .co-bar {
    display: block;
    position: absolute;
    inset: auto 0 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(8, 8, 9, 0.96) 30%);
  }
  .co-method { padding: 16px; gap: 13px; }
  .co-m-icon { width: 40px; height: 40px; border-radius: 12px; }
  .co-method > b { font-size: 15px; }
  .co-secure { display: none; }
  .co-top { grid-template-columns: 1fr auto; padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .co-panel, .co-backdrop { transition: none; }
  .co-submit::after, .co-check circle, .co-check path { animation: none; stroke-dashoffset: 0; }
}
