/**
 * Phase 29.3 — Premium Curved Fluid Commerce (glassmorphism).
 * Cards/wizard: 16px · CTA/qty pills: 30px · glass blur 20px
 *
 * Palette: brand rgb(161, 34, 115) / #A12273.
 */

.ar-shop {
  --ar-shop-r: 16px;
  --ar-shop-pill: 30px;
  --ar-shop-ink: #2a0a1f;
  --ar-shop-brand: #A12273;
  --ar-shop-deep: #3D0D28;
  --ar-shop-mid: #5C123B;
  --ar-shop-glass: rgba(61, 13, 40, 0.48);
  --ar-shop-glass-soft: rgba(255, 255, 255, 0.78);
  --ar-shop-glow: rgba(161, 34, 115, 0.22);
  --ar-shop-gold: #c9a227;
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 100%;
  min-height: 70vh;
  padding-bottom: 2rem;
  background:
    radial-gradient(ellipse 70% 45% at 12% 0%, rgba(161, 34, 115, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(161, 34, 115, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(201, 162, 39, 0.08) 0%, transparent 55%),
    linear-gradient(165deg, #2a0a1f 0%, #3D0D28 42%, #5C123B 100%);
}

body.page-template-template-shop,
body.page-template-template-shop-php {
  overflow-x: hidden;
  background: #2a0a1f;
}

.ar-shop-hero {
  padding: 2.5rem 0 1rem;
}

.ar-shop-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--ar-shop-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8d48b;
  background: rgba(201, 162, 39, 0.16);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ar-shop-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 3.8vw, 2.4rem);
  font-weight: 800;
  color: #faf9fc;
  letter-spacing: -0.02em;
}

.ar-shop-lead {
  margin: 0;
  max-width: 34rem;
  color: rgba(250, 249, 252, 0.78);
  font-size: 1rem;
  line-height: 1.7;
}

.ar-shop-shell {
  padding-top: 0.5rem;
}

/* Glass sliding step menu */
.ar-shop-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  border-radius: var(--ar-shop-pill);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(232, 180, 210, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16) inset, 0 8px 24px rgba(28, 22, 48, 0.22);
}

.ar-shop-steps li {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--ar-shop-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(250, 249, 252, 0.55);
  background: transparent;
  border: 1px solid transparent;
  cursor: default;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.ar-shop-steps li:hover {
  color: rgba(250, 249, 252, 0.92);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 13, 40, 0.22);
}

.ar-shop-steps li i {
  font-style: normal;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.ar-shop-steps li.is-active {
  color: #faf9fc;
  background: linear-gradient(135deg, rgba(161, 34, 115, 0.7), rgba(139, 28, 98, 0.45));
  border-color: rgba(201, 162, 39, 0.35);
  box-shadow: 0 0 0 1px rgba(161, 34, 115, 0.25), 0 10px 28px rgba(61, 13, 40, 0.3);
  transform: translateY(-2px);
}

.ar-shop-steps li.is-done {
  color: #e8d48b;
  border-color: rgba(201, 162, 39, 0.28);
  background: rgba(201, 162, 39, 0.1);
}

/* Two-column fluid layout */
.ar-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.25rem;
  align-items: start;
}

.ar-shop-main,
.ar-shop-aside {
  border-radius: var(--ar-shop-r);
  background: var(--ar-shop-glass-soft);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--ar-shop-glow);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 20px 48px rgba(13, 0, 26, 0.22);
}

.ar-shop-main {
  padding: 1.35rem 1.25rem 1.5rem;
  min-height: 28rem;
}

.ar-shop-aside {
  position: sticky;
  top: 6rem;
  padding: 1.2rem 1.15rem;
  background: var(--ar-shop-glass);
  color: #faf9fc;
}

.ar-shop-aside__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.ar-shop-aside dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.ar-shop-aside dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.ar-shop-aside dt {
  margin: 0;
  opacity: 0.7;
  font-weight: 600;
}

.ar-shop-aside dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
}

.ar-shop-aside__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--ar-shop-r);
  background: rgba(201, 162, 39, 0.14);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ar-shop-aside__total strong {
  font-size: 1.15rem;
  color: #e8d48b;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ar-shop-aside__total.is-bump strong {
  transform: scale(1.06);
}

.ar-shop-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Panels — SPA fade */
.ar-shop-panel {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ar-shop-panel.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.ar-shop-panel.is-entering {
  opacity: 0;
  transform: translateY(10px);
}

.ar-shop-panel[hidden] {
  display: none !important;
}

.ar-shop-panel__head {
  margin-bottom: 1.1rem;
}

.ar-shop-panel__head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ar-shop-ink);
}

.ar-shop-panel__head p {
  margin: 0;
  font-size: 0.9rem;
  color: #5c3a6e;
}

/* Product cards — single-select then optional qty */
.ar-shop-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ar-shop-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.85rem;
  border-radius: var(--ar-shop-r);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(161, 34, 115, 0.12);
  overflow: hidden;
  isolation: isolate;
  max-width: 100%;
  transition:
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    opacity 0.3s ease;
}

.ar-shop-row.is-idle:not(.is-selected) {
  opacity: 0.72;
}

.ar-shop-row:hover {
  border-color: rgba(161, 34, 115, 0.4);
  box-shadow:
    0 0 0 1px rgba(161, 34, 115, 0.18),
    0 12px 28px rgba(61, 13, 40, 0.14);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.78);
  opacity: 1;
}

.ar-shop-row.is-selected {
  border-color: rgba(161, 34, 115, 0.55);
  box-shadow:
    0 0 0 1px var(--ar-shop-glow),
    0 14px 32px rgba(61, 13, 40, 0.18);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.ar-shop-row__select {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.2rem;
  text-align: start;
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 0;
}

.ar-shop-row__img {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(61, 13, 40, 0.08);
  border: 1px solid rgba(161, 34, 115, 0.14);
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.ar-shop-row__img--ph {
  display: block;
  background:
    radial-gradient(circle at 30% 30%, rgba(161, 34, 115, 0.2), transparent 55%),
    rgba(61, 13, 40, 0.08);
}

.ar-shop-row:hover .ar-shop-row__img,
.ar-shop-row.is-selected .ar-shop-row__img {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(61, 13, 40, 0.18);
}

.ar-shop-confirm {
  margin: 0.25rem 0 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--ar-shop-r);
  background: rgba(161, 34, 115, 0.08);
  border: 1px solid rgba(161, 34, 115, 0.16);
}

.ar-shop-confirm__line {
  margin: 0;
  font-size: 0.9rem;
  color: #5c3a6e;
  line-height: 1.7;
}

.ar-shop-row__select:focus-visible {
  outline: 2px solid #A12273;
  outline-offset: 2px;
  border-radius: 12px;
}

.ar-shop-row__check {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2px solid rgba(161, 34, 115, 0.28);
  background: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.ar-shop-row.is-selected .ar-shop-row__check {
  border-color: #A12273;
  background: linear-gradient(135deg, #A12273, #8B1C62);
  box-shadow: 0 0 0 3px rgba(161, 34, 115, 0.18);
}

.ar-shop-row.is-selected .ar-shop-row__check::after {
  content: "";
  position: absolute;
  inset: 0.28rem;
  border-radius: 50%;
  background: #fff;
}

.ar-shop-row__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.ar-shop-row__cat {
  align-self: start;
  margin-bottom: 0.15rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--ar-shop-pill);
  font-size: 0.68rem;
  font-weight: 800;
  color: #A12273;
  background: rgba(161, 34, 115, 0.12);
  border: 1px solid rgba(161, 34, 115, 0.18);
}

.ar-shop-row__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ar-shop-ink);
}

.ar-shop-row__sub {
  font-size: 0.8rem;
  color: #5c3a6e;
}

.ar-shop-row__price {
  align-self: center;
  font-weight: 800;
  color: #A12273;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Pill quantity — only visible after selection */
.ar-shop-qty {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  margin-inline-start: 2.1rem;
  border-radius: var(--ar-shop-pill);
  background: rgba(61, 13, 40, 0.08);
  border: 1px solid rgba(161, 34, 115, 0.18);
  animation: ar-shop-qty-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ar-shop-qty[hidden] {
  display: none !important;
}

.ar-shop-qty__hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5c3a6e;
  margin-inline-end: 0.25rem;
}

@keyframes ar-shop-qty-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ar-shop-qty__btn {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: var(--ar-shop-pill);
  background: #fff;
  color: #A12273;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.2s ease;
}

.ar-shop-qty__btn:hover,
.ar-shop-qty__btn:focus-visible {
  background: linear-gradient(135deg, #A12273, #8B1C62);
  color: #fff;
  outline: none;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(61, 13, 40, 0.22);
}

.ar-shop-qty__btn:active {
  transform: scale(0.94);
}

.ar-shop-qty__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.ar-shop-qty__val {
  min-width: 1.6rem;
  text-align: center;
  font-weight: 800;
  color: var(--ar-shop-ink);
  font-variant-numeric: tabular-nums;
}

/* Floating labels */
.ar-shop-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ar-shop-field--full {
  grid-column: 1 / -1;
}

.ar-shop-float {
  position: relative;
  display: block;
}

.ar-shop-float input,
.ar-shop-float textarea,
.ar-shop-float select {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-weight: 500;
  padding: 1.35rem 1rem 0.55rem;
  border-radius: var(--ar-shop-r);
  border: 1px solid rgba(161, 34, 115, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ar-shop-ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.ar-shop-float select {
  appearance: none;
  cursor: pointer;
  padding-top: 1.45rem;
}

.ar-shop-float textarea {
  min-height: 6rem;
  resize: vertical;
}

.ar-shop-float__label {
  position: absolute;
  inset-inline-start: 1rem;
  top: 1.05rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #5c3a6e;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), font-size 0.25s ease, color 0.25s ease, top 0.25s ease;
}

.ar-shop-float input:focus,
.ar-shop-float textarea:focus,
.ar-shop-float select:focus {
  outline: none;
  border-color: #A12273;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(161, 34, 115, 0.16);
}

.ar-shop-float input:focus + .ar-shop-float__label,
.ar-shop-float input:not(:placeholder-shown) + .ar-shop-float__label,
.ar-shop-float textarea:focus + .ar-shop-float__label,
.ar-shop-float textarea:not(:placeholder-shown) + .ar-shop-float__label,
.ar-shop-float--select .ar-shop-float__label {
  top: 0.35rem;
  font-size: 0.7rem;
  color: #A12273;
}

.ar-shop-field.is-invalid .ar-shop-float input,
.ar-shop-field.is-invalid .ar-shop-float textarea,
.ar-shop-field.is-invalid .ar-shop-float select {
  border-color: #b32d2e;
}

.ar-shop-field-error {
  display: block;
  margin: 0.35rem 0 0;
  color: #b32d2e;
  font-size: 0.8rem;
  font-weight: 700;
  font-style: normal;
}

/* Gateway chips */
.ar-shop-gateways {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.5rem 0 0.85rem;
}

.ar-shop-gw {
  position: relative;
  cursor: pointer;
  flex: 1 1 12rem;
}

.ar-shop-gw input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ar-shop-gw__chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--ar-shop-pill);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(161, 34, 115, 0.16);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.ar-shop-gw__chip strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ar-shop-ink);
}

.ar-shop-gw__chip em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: #5c3a6e;
}

.ar-shop-gw__mark {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid rgba(161, 34, 115, 0.25);
  display: grid;
  place-items: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ar-shop-gw__mark svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ar-shop-gw:hover .ar-shop-gw__chip,
.ar-shop-gw input:focus-visible + .ar-shop-gw__chip {
  border-color: rgba(161, 34, 115, 0.45);
  transform: translateY(-2px);
}

.ar-shop-gw input:checked + .ar-shop-gw__chip {
  background: linear-gradient(135deg, rgba(161, 34, 115, 0.12), rgba(161, 34, 115, 0.1));
  border-color: rgba(161, 34, 115, 0.55);
  box-shadow: 0 0 0 1px var(--ar-shop-glow), 0 10px 24px rgba(61, 13, 40, 0.14);
}

.ar-shop-gw input:checked + .ar-shop-gw__chip .ar-shop-gw__mark {
  background: linear-gradient(135deg, #A12273, #8B1C62);
  border-color: transparent;
  transform: scale(1.05);
}

.ar-shop-gw input:checked + .ar-shop-gw__chip .ar-shop-gw__mark svg {
  opacity: 1;
  transform: scale(1);
  color: #fff;
}

.ar-shop-success {
  margin: 0.85rem 0;
  padding: 1.1rem 1.15rem;
  border-radius: var(--ar-shop-r);
  border: 1px solid rgba(26, 127, 55, 0.3);
  background: rgba(26, 127, 55, 0.08);
}

.ar-shop-success h3 {
  margin: 0 0 0.35rem;
  color: #1a7f37;
}

.ar-shop-form-error {
  margin: 0.65rem 0 0;
  color: #b32d2e;
  font-weight: 700;
}

.ar-shop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Capsule CTAs inside shop */
.ar-shop .ar-btn,
.ar-shop .ar-btn--signal,
.ar-shop .ar-btn--ghost,
.ar-shop .ar-shop-pay {
  border-radius: var(--ar-shop-pill) !important;
  padding-inline: 1.35rem;
}

.ar-shop .ar-btn--signal {
  background: linear-gradient(135deg, #A12273, #8B1C62);
  border: 0;
  color: #fff;
  box-shadow: 0 10px 24px rgba(61, 13, 40, 0.3);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, filter 0.3s ease;
}

.ar-shop .ar-btn--signal:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(61, 13, 40, 0.32), 0 0 24px rgba(161, 34, 115, 0.35);
  filter: brightness(1.06);
}

.ar-shop .ar-btn--ghost {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(161, 34, 115, 0.2);
  color: #A12273;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.ar-shop .ar-btn--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(161, 34, 115, 0.45);
  box-shadow: 0 8px 20px rgba(61, 13, 40, 0.12);
}

.ar-shop-pay.is-loading .ar-shop-pay__label {
  display: none;
}

.ar-shop-pay.is-loading .ar-shop-pay__wait {
  display: inline !important;
}

/* Mobile sticky total + bottom sheet (aside hidden on small screens) */
.ar-shop-mobile-total {
  display: none;
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem 0.7rem 1.1rem;
  border-radius: var(--ar-shop-pill);
  background: rgba(42, 10, 61, 0.9);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--ar-shop-glow);
  color: #faf9fc;
  box-shadow:
    0 12px 32px rgba(13, 0, 26, 0.4),
    0 0 28px rgba(161, 34, 115, 0.18);
}

.ar-shop-mobile-total__details {
  appearance: none;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.14);
  color: #e8d48b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--ar-shop-pill);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ar-shop-mobile-total__details:hover,
.ar-shop-mobile-total__details[aria-expanded="true"] {
  background: rgba(201, 162, 39, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.25);
}

.ar-shop-mobile-total__sum {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-size: 0.72rem;
  opacity: 0.85;
}

.ar-shop-mobile-total strong {
  color: #e8d48b;
  font-size: 1.05rem;
  opacity: 1;
}

.ar-shop-sheet {
  display: none;
}

.ar-shop-sheet:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 120;
}

.ar-shop-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(10, 0, 20, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.ar-shop-sheet__panel {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: min(78vh, 32rem);
  overflow: auto;
  padding: 1.15rem 1.25rem 1.5rem;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(42, 10, 61, 0.96), rgba(26, 0, 51, 0.98));
  border: 1px solid rgba(161, 34, 115, 0.35);
  border-bottom: 0;
  color: #faf9fc;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  animation: ar-shop-sheet-up 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ar-shop-sheet-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.ar-shop-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.ar-shop-sheet__head p {
  margin: 0;
  font-weight: 800;
  font-size: 1rem;
}

.ar-shop-sheet__close {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #faf9fc;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ar-shop-sheet__dl {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.65rem;
}

.ar-shop-sheet__dl > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.ar-shop-sheet__dl dt {
  margin: 0;
  opacity: 0.7;
  font-weight: 600;
}

.ar-shop-sheet__dl dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
}

/* Digital proforma (print-friendly) */
.ar-shop-proforma {
  margin: 1.15rem 0 0;
  padding: 1.25rem 1.2rem;
  border-radius: var(--ar-shop-r);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(161, 34, 115, 0.2);
  color: var(--ar-shop-ink);
  box-shadow: 0 12px 32px rgba(13, 0, 26, 0.1);
}

.ar-shop-proforma__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(161, 34, 115, 0.14);
}

.ar-shop-proforma__brand {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #A12273;
}

.ar-shop-proforma__legal {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #5c3a6e;
}

.ar-shop-proforma__badge {
  text-align: end;
}

.ar-shop-proforma__badge span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #A12273;
}

.ar-shop-proforma__badge em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a6d00;
  padding: 0.2rem 0.55rem;
  border-radius: var(--ar-shop-pill);
  background: rgba(201, 162, 39, 0.16);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ar-shop-proforma__meta {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: #5c3a6e;
}

.ar-shop-proforma__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ar-shop-proforma__table th,
.ar-shop-proforma__table td {
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid rgba(161, 34, 115, 0.1);
  text-align: start;
  vertical-align: top;
}

.ar-shop-proforma__table th {
  width: 36%;
  font-weight: 700;
  color: #5c3a6e;
}

.ar-shop-proforma__table td {
  font-weight: 700;
  color: var(--ar-shop-ink);
}

.ar-shop-proforma__foot {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(161, 34, 115, 0.22);
}

.ar-shop-proforma__foot p {
  margin: 0;
  font-size: 0.78rem;
  color: #5c3a6e;
  line-height: 1.7;
}

.ar-shop-proforma__sign {
  margin-top: 0.65rem !important;
  font-weight: 800 !important;
  color: #A12273 !important;
}

.ar-shop-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .ar-shop-proforma,
  .ar-shop-proforma * {
    visibility: visible !important;
  }

  .ar-shop-proforma {
    position: absolute;
    inset: 0;
    margin: 0;
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
  }

  .ar-shop-success__actions,
  .ar-shop-mobile-total,
  .ar-shop-sheet {
    display: none !important;
  }
}

@media (max-width: 960px) {
  .ar-shop-layout {
    grid-template-columns: 1fr;
  }

  .ar-shop-aside {
    display: none !important;
  }

  .ar-shop-mobile-total {
    display: flex;
  }

  .ar-shop {
    padding-bottom: 5.75rem;
  }
}

@media (max-width: 640px) {
  .ar-shop-row__select {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .ar-shop-row__price {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .ar-shop-row__img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .ar-shop-qty {
    margin-inline-start: 0;
    justify-content: space-between;
    width: 100%;
  }

  .ar-shop-fields {
    grid-template-columns: 1fr;
  }

  .ar-shop-nav {
    flex-direction: column-reverse;
  }

  .ar-shop-nav .ar-btn {
    width: 100%;
    justify-content: center;
  }

  .ar-shop-gw {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ar-shop-panel,
  .ar-shop-qty__btn,
  .ar-shop-gw__chip,
  .ar-shop-float__label,
  .ar-shop-aside__total strong,
  .ar-shop-row,
  .ar-shop .ar-btn--signal,
  .ar-shop .ar-btn--ghost {
    transition: none !important;
  }

  .ar-shop-row:hover,
  .ar-shop-row.is-selected,
  .ar-shop .ar-btn--signal:hover,
  .ar-shop .ar-btn--ghost:hover {
    transform: none;
  }

  .ar-shop-qty,
  .ar-shop-sheet__panel {
    animation: none !important;
  }
}

/* Vendor dashboard curved theme */
.ar-admin-sales .ar-admin-stat {
  border-radius: 16px !important;
}

.ar-admin-sales .widefat {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(161, 34, 115, 0.18);
}

.ar-admin-sales .ar-admin-stat strong {
  color: #A12273;
}

/* Phase 33 — AfraTel number preview card */
.ar-shop-numbers {
  margin: 0 0 1.15rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(161, 34, 115, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 244, 251, 0.92));
  box-shadow: 0 10px 28px rgba(61, 13, 40, 0.05);
}

.ar-shop-numbers__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ar-shop-numbers__ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  color: #A12273;
  background: rgba(161, 34, 115, 0.1);
  border: 1px solid rgba(161, 34, 115, 0.16);
}

.ar-shop-numbers__title {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1c1528;
}

.ar-shop-numbers__lead {
  margin: 0;
  color: #6a6478;
  font-size: 0.8rem;
  line-height: 1.65;
}

.ar-shop-numbers__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .ar-shop-numbers__list {
    grid-template-columns: 1fr;
  }
}

.ar-shop-numbers__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(28, 21, 40, 0.08);
  background: #fff;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ar-shop-numbers__item:hover {
  border-color: rgba(161, 34, 115, 0.28);
  transform: translateY(-1px);
}

.ar-shop-numbers__item.is-hot {
  border-color: rgba(161, 34, 115, 0.28);
  background: rgba(161, 34, 115, 0.05);
}

.ar-shop-numbers__tag {
  font-size: 0.68rem;
  font-weight: 750;
  color: #A12273;
}

.ar-shop-numbers__num {
  font-size: 0.86rem;
  font-weight: 800;
  color: #1c1528;
  font-variant-numeric: tabular-nums;
}

.ar-shop-numbers__hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: #6a6478;
}

.ar-shop-numbers__hint a {
  color: #A12273;
  font-weight: 700;
  text-decoration: none;
}

.ar-shop-numbers__hint a:hover {
  text-decoration: underline;
}
