/* UA cart drawer + account/admin/affiliate pages — minimal, matches dark brand */

.ua-noscroll { overflow: hidden; }

.ua-cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0; transition: opacity .25s ease;
}
.ua-cart-overlay.is-open { opacity: 1; }

/* Hard-enforce [hidden] — inline display styles were leaking through and covering the page. */
[hidden] { display: none !important; }

/* Modal overlay — used for admin edit modal. Flex-centered only when shown. */
.ua-modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
}

.ua-cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: #0b0b0b;
  color: #eaeaea;
  z-index: 9999;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.5);
}
.ua-cart-drawer.is-open { transform: translateX(0); }

.ua-cart__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #222;
}
.ua-cart__header h2 { margin: 0; font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase; }
.ua-cart__close {
  background: none; border: 0; color: inherit; font-size: 2rem; line-height: 1;
  cursor: pointer;
}

.ua-cart__body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.ua-cart__empty { opacity: .5; text-align: center; padding: 40px 0; }

.ua-cart-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #1b1b1b;
}
.ua-cart-item__img { width: 72px; height: 72px; object-fit: cover; background: #111; border-radius: 4px; }
.ua-cart-item__info { flex: 1; min-width: 0; }
.ua-cart-item__name { margin: 0 0 2px; font-size: .9rem; }
.ua-cart-item__variant { margin: 0 0 4px; font-size: .78rem; opacity: .6; }
.ua-cart-item__price { margin: 0 0 6px; font-size: .88rem; }
.ua-cart-item__qty { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.ua-cart-item__qty button {
  background: #1a1a1a; border: 1px solid #2b2b2b; color: inherit;
  width: 26px; height: 26px; border-radius: 4px; cursor: pointer;
}
.ua-cart-item__qty button.ua-cart-item__remove { width: auto; padding: 0 10px; opacity: .6; }
.ua-cart-item__qty button.ua-cart-item__remove:hover { opacity: 1; }

.ua-cart__footer {
  padding: 18px 22px;
  border-top: 1px solid #222;
  display: flex; flex-direction: column; gap: 8px;
}
.ua-cart__discount { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.ua-cart__discount input {
  flex: 1; background: #141414; border: 1px solid #2b2b2b; color: inherit;
  padding: 8px 10px; border-radius: 4px; font-size: .85rem;
}
.ua-cart__discount button {
  background: #eaeaea; color: #000; border: 0; padding: 8px 12px; border-radius: 4px;
  cursor: pointer; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
.ua-cart__member-perk {
  border: 1px solid #2b2b2b;
  background: #111;
  border-radius: 4px;
  padding: 10px;
  margin: 2px 0 6px;
}
.ua-cart__member-perk-title {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ua-cart__member-perk-copy {
  margin: 2px 0 8px;
  font-size: .76rem;
  opacity: .62;
}
.ua-cart__member-items { display: grid; gap: 6px; }
.ua-cart__member-item {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #303030;
  border-radius: 4px;
  color: #eaeaea;
  background: #171717;
  text-align: left;
  font-size: .78rem;
}
.ua-cart__member-item.is-selected {
  border-color: #eaeaea;
  background: #eaeaea;
  color: #000;
}
.ua-cart__row { display: flex; justify-content: space-between; font-size: .9rem; }
.ua-cart__row--total { font-size: 1.05rem; font-weight: 600; margin-top: 4px; }
.ua-cart__checkout {
  margin-top: 12px; padding: 14px 18px;
  background: #eaeaea; color: #000; border: 0;
  font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  cursor: pointer; border-radius: 4px;
}
.ua-cart__checkout:disabled { opacity: .5; cursor: wait; }
.ua-cart__note { margin: 4px 0 0; font-size: .72rem; opacity: .5; text-align: center; }
.ua-link { background: none; border: 0; color: #9aa; cursor: pointer; font-size: .78rem; text-decoration: underline; }

/* -------- generic account/admin layout -------- */
.ua-page { max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; }
.ua-page h1 { font-size: 1.4rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 24px; }
.ua-card { background: #121212; border: 1px solid #222; border-radius: 6px; padding: 20px 22px; margin-bottom: 18px; }
.ua-form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.ua-form label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.ua-form input, .ua-form select, .ua-form textarea {
  background: #0b0b0b; border: 1px solid #2b2b2b; color: inherit;
  padding: 10px 12px; border-radius: 4px; font-size: .95rem;
}
.ua-form button[type="submit"], .ua-btn {
  background: #eaeaea; color: #000; border: 0; padding: 12px 18px;
  font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  cursor: pointer; border-radius: 4px;
}
.ua-btn--outline { background: transparent; color: #eaeaea; border: 1px solid #2b2b2b; }
.ua-select-button {
  min-height: 43px;
  padding-right: 42px;
  font-family: inherit;
  line-height: 1;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eaeaea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 16px center / 14px 14px,
    transparent;
}
.ua-select-button option {
  background: #0b0b0b;
  color: #eaeaea;
}
.ua-msg { font-size: .85rem; padding: 10px 12px; border-radius: 4px; }
.ua-msg--err { background: rgba(200,40,40,.15); color: #ff8888; }
.ua-msg--ok  { background: rgba(40,180,100,.15); color: #88ffaa; }

.ua-checkout-page {
  max-width: 1540px;
  padding: 48px clamp(18px, 4vw, 56px) 96px;
}
.ua-checkout-shell {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(760px, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.ua-checkout-copy {
  position: sticky;
  top: calc(var(--header-height, 76px) + 24px);
  padding-top: 20px;
}
.ua-checkout-copy h1 {
  margin-bottom: 10px;
  max-width: 320px;
}
.ua-checkout-copy p {
  max-width: 440px;
  color: #aaa;
  line-height: 1.5;
}
.ua-checkout-card {
  width: 100%;
  min-height: 760px;
  padding: clamp(18px, 2vw, 28px);
}
.ua-embedded-checkout {
  width: 100%;
  min-height: 720px;
}
@media (max-width: 1200px) {
  .ua-checkout-shell {
    grid-template-columns: 1fr;
  }
  .ua-checkout-copy {
    position: static;
    padding-top: 0;
  }
  .ua-checkout-card {
    min-height: 680px;
  }
}
@media (max-width: 760px) {
  .ua-checkout-page {
    padding: 28px 12px 56px;
  }
  .ua-checkout-card {
    padding: 10px;
    min-height: 640px;
  }
  .ua-embedded-checkout {
    min-height: 620px;
  }
}

.ua-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ua-table th, .ua-table td { padding: 10px 12px; border-bottom: 1px solid #1d1d1d; text-align: left; }
.ua-table th { opacity: .6; font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.ua-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.ua-badge--paid { background: rgba(80,140,255,.2); color: #9ec0ff; }
.ua-badge--fulfilled { background: rgba(40,180,100,.2); color: #88ffaa; }
.ua-badge--refunded { background: rgba(200,40,40,.2); color: #ff8888; }

.ua-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.ua-stat { background: #121212; border: 1px solid #222; border-radius: 6px; padding: 16px 18px; }
.ua-stat__label { font-size: .72rem; opacity: .6; text-transform: uppercase; letter-spacing: .1em; }
.ua-stat__value { font-size: 1.5rem; margin-top: 4px; font-weight: 600; }

.ua-nav { display: flex; gap: 16px; font-size: .85rem; margin-bottom: 24px; border-bottom: 1px solid #222; padding-bottom: 12px; }
.ua-nav a { color: inherit; opacity: .6; text-decoration: none; }
.ua-nav a.is-active, .ua-nav a:hover { opacity: 1; }

.ua-copyable { display: flex; align-items: center; gap: 8px; }
.ua-copyable input { flex: 1; font-family: monospace; }

.admin-line-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-size: .82rem;
}
.admin-line-item + .admin-line-item { border-top: 1px solid #1a1a1a; }
.admin-line-item img {
  width: 44px; height: 44px; object-fit: cover;
  background: #0a0a0a; border-radius: 4px; flex-shrink: 0;
}
.admin-line-item__name { font-weight: 500; }
.admin-line-item__variant {
  display: inline-block;
  margin-top: 2px;
  font-size: .72rem;
  opacity: .6;
  background: #1a1a1a;
  padding: 2px 8px;
  border-radius: 3px;
}
