html, body { overflow-x: hidden; max-width: 100%; }
:root {
    --onyx: #000000; --ivory: #FAFAFA; --green: #262626; --green-deep: #000000;
    --gold: #E31E24; --gold-soft: #FF6B6B; --taupe: #6B6B6B; --hairline: #E5E5E5; --card: #FFFFFF;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'IBM Plex Sans', sans-serif; color: var(--onyx); background: var(--ivory); }
  a { color: inherit; text-decoration: none; }
  button, select, input { font-family: inherit; cursor: pointer; }

  .nav { position: sticky; top: 0; z-index: 50; background: #000000; color: var(--ivory); border-bottom: 1px solid rgba(227,30,36,0.25); }
  .nav-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap:16px; flex-wrap: nowrap; }
  .logo { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 1.5rem; display: flex; align-items: baseline; gap: 8px; }
  .logo .logo-sub { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 0.62rem; letter-spacing: 0.1em; opacity: 0.55; text-transform: uppercase; }

  .page-head { background: linear-gradient(180deg, var(--green-deep), var(--onyx)); color: var(--ivory); padding: 46px 24px; }
  .page-head-inner { max-width: 1100px; margin: 0 auto; }
  .breadcrumb { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--gold-soft); margin-bottom: 10px; }
  .breadcrumb a { color: var(--gold-soft); } .breadcrumb a:hover { text-decoration: underline; }
  .page-head h1 { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 2.2rem; text-transform: uppercase; }

  .layout { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
  @media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

  .panel { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 26px; margin-bottom: 24px; }
  .panel h3 { font-family: 'Big Shoulders Display', sans-serif; font-size: 1.2rem; text-transform: uppercase; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
  .step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--onyx); font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-grid .full { grid-column: 1/-1; }
  .field label { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--taupe); margin-bottom: 7px; font-family: 'IBM Plex Mono', monospace; }
  .field input { width: 100%; border: 1px solid var(--hairline); border-radius: 6px; padding: 10px 12px; font-size: 1rem; margin-bottom: 14px; }
  .field input:focus { outline: none; border-color: var(--gold); }
  .add-address-link { background: none; border: none; color: var(--gold); font-weight: 700; font-size: 0.88rem; cursor: pointer; padding: 4px 0; }
  .add-address-link:hover { text-decoration: underline; }

  .address-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; background: var(--ivory); border: 1px solid var(--hairline); border-radius: 8px; padding: 16px 18px; }
  .address-card-text { font-size: 0.86rem; line-height: 1.6; color: var(--onyx); }
  .address-card-text b { display: block; font-size: 0.92rem; margin-bottom: 2px; }
  .edit-address-btn { background: none; border: 1px solid var(--hairline); border-radius: 6px; padding: 6px 14px; font-size: 0.78rem; font-weight: 600; color: var(--onyx); cursor: pointer; flex-shrink: 0; }
  .edit-address-btn:hover { border-color: var(--gold); color: var(--gold); }

  .address-list-modal-box { max-width: 560px; }
  .address-list-item {
    position: relative; display: flex; align-items: flex-start; gap: 14px;
    border: 1px solid var(--hairline); border-radius: 10px; padding: 16px 44px 16px 16px;
    margin-bottom: 14px; cursor: pointer; transition: border-color 0.15s;
  }
  .address-list-item:hover { border-color: var(--gold); }
  .address-list-item.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
  .address-list-item input[type="radio"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; cursor: pointer; }
  .address-list-item-body { font-size: 0.86rem; line-height: 1.6; color: var(--onyx); flex: 1; }
  .address-list-item-body b { font-size: 0.92rem; }
  .address-list-item-body .phone { color: var(--taupe); font-weight: 500; margin-left: 4px; }
  .address-default-tag {
    display: inline-block; margin-top: 8px; background: #FBEAEA; color: #C0392B;
    font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 5px;
  }
  .address-edit-link {
    position: absolute; top: 16px; right: 16px; background: none; border: none;
    color: var(--green); font-size: 0.78rem; font-weight: 600; text-decoration: underline; cursor: pointer;
  }
  .address-edit-link:hover { color: var(--gold); }
  .address-delete-link {
    position: absolute; top: 40px; right: 16px; background: none; border: none;
    color: #C0392B; font-size: 0.78rem; font-weight: 600; text-decoration: underline; cursor: pointer;
  }
  .address-delete-link:hover { color: #96281B; }
  .add-new-address-pill {
    width: 100%; background: var(--onyx); color: var(--ivory); border: none;
    padding: 13px; border-radius: 24px; font-weight: 700; font-size: 0.9rem; cursor: pointer; margin-top: 6px;
  }
  .add-new-address-pill:hover { background: var(--green); }

  .modal-overlay {
    position: fixed; inset: 0; background: rgba(10,10,10,0.55); z-index: 500;
    display: none; align-items: center; justify-content: center; padding: 24px;
  }
  .modal-overlay.show { display: flex; }
  .modal-box {
    background: var(--card); border-radius: 14px; width: 100%; max-width: 620px;
    max-height: 90vh; overflow-y: auto; padding: 28px 30px 30px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
  }
  .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
  .modal-header h3 { font-family: 'Big Shoulders Display', sans-serif; font-size: 1.2rem; text-transform: uppercase; }
  .modal-close { background: none; border: none; font-size: 1.1rem; color: var(--taupe); cursor: pointer; }
  .modal-close:hover { color: var(--onyx); }

  .modal-field { margin-bottom: 14px; }
  .modal-field label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 6px; color: var(--onyx); }
  .modal-field select, .modal-field input {
    width: 100%; border: 1px solid var(--hairline); border-radius: 6px; padding: 10px 12px; font-size: 0.88rem;
  }
  .modal-field select:focus, .modal-field input:focus { outline: none; border-color: var(--gold); }
  .modal-section-label { font-size: 0.8rem; font-weight: 700; margin: 18px 0 10px; color: var(--onyx); }
  .modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .modal-grid .full { grid-column: 1 / -1; }
  .modal-grid .phone-row { display: flex; gap: 8px; }
  .modal-grid .phone-row select { flex: 0 0 100px; border: 1px solid var(--hairline); border-radius: 6px; padding: 10px 8px; font-size: 0.85rem; }
  .modal-grid .phone-row input { flex: 1; }

  .modal-checkbox { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; margin: 16px 0 6px; cursor: pointer; }
  .modal-checkbox.inline { margin: 0; }
  .phone-error-note { color: #C0392B; font-size: 0.78rem; margin-top: -6px; display: none; }
  .phone-error-note.show { display: block; }
  .messaging-apps-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.84rem; }
  .messaging-apps-label { color: var(--taupe); font-size: 0.78rem; }
  .modal-error { color: #C0392B; font-size: 0.8rem; margin-bottom: 10px; display: none; }
  .modal-error.show { display: block; }
  .modal-actions { display: flex; gap: 12px; margin-top: 10px; }
  .modal-confirm { flex: 1; background: var(--onyx); color: var(--ivory); border: none; padding: 13px; border-radius: 8px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
  .modal-confirm:hover { background: var(--green); }
  .modal-cancel { flex: 1; background: none; border: 1px solid var(--hairline); padding: 13px; border-radius: 8px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
  .modal-cancel:hover { border-color: var(--taupe); }

  .pay-groups { display: flex; flex-direction: column; gap: 18px; }
  .pay-group-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--taupe); margin: 16px 0 8px; }
  .pay-group-label:first-child { margin-top: 0; }
  .pay-grid { display: flex; flex-direction: column; gap: 10px; }
  .pay-card { border: 1.5px solid var(--hairline); border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; transition: border-color 0.15s, background 0.15s; }
  .pay-icon { width: 34px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; font-weight: 700; flex-shrink: 0; letter-spacing: 0.02em; }
  .pay-icon-logo { background: #fff; border: 1px solid var(--hairline); overflow: hidden; }
  .pay-icon-logo img { width: 100%; height: 100%; object-fit: contain; }
  .pay-icon-crypto { width: 40px; height: 40px; border-radius: 50%; }
  .pay-card:hover { border-color: var(--gold-soft); }
  .pay-card.selected { border-color: var(--gold); background: rgba(227,30,36,0.06); }
  .pay-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--taupe); position: relative; flex-shrink: 0; order: -1; }
  .pay-card.selected .pay-dot { border-color: var(--gold); }
  .pay-card.selected .pay-dot::after { content: ''; position: absolute; inset: 3px; background: var(--gold); border-radius: 50%; }
  .pay-label { font-size: 0.9rem; font-weight: 700; }
  .pay-sub { font-size: 0.7rem; color: var(--taupe); font-family: 'IBM Plex Mono', monospace; }
  .pay-card-text { flex: 1; }
  .mini-card-icons { display: flex; gap: 5px; margin-top: 6px; }
  .mini-card-icon { width: 26px; height: 17px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace; font-size: 0.5rem; font-weight: 700; }
  .mini-card-icon-logo { background: #fff; border: 1px solid var(--hairline); overflow: hidden; }
  .mini-card-icon-logo img { width: 100%; height: 100%; object-fit: contain; }

  .modal-header.centered { text-align: center; position: relative; display: block; }
  .modal-header.centered .modal-close { position: absolute; top: -6px; right: -6px; font-size: 1.2rem; }
  .modal-trust-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--green); font-size: 0.8rem; margin-top: 6px; }
  .payment-modal-box { max-width: 640px; }
  .card-modal-box { max-width: 480px; }
  .card-brands-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; flex-wrap: nowrap; }
  .card-brands-row .pay-icon { width: 36px; height: 24px; font-size: 0.6rem; opacity: 0.35; transition: opacity 0.15s, transform 0.15s; }
  .card-brands-row .pay-icon.active { opacity: 1; transform: scale(1.08); }
  .card-number-field { position: relative; }
  .card-type-label {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 700;
    color: var(--green); pointer-events: none;
  }
  html[dir="rtl"] .card-type-label { right: auto; left: 12px; }
  .modal-confirm.full-width { width: 100%; }
  .trust-block { background: var(--ivory); border: 1px solid var(--hairline); border-radius: 8px; padding: 14px 16px; margin: 16px 0; }
  .trust-block-title { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: var(--green); margin-bottom: 10px; }
  .trust-list { list-style: none; padding: 0; margin: 0; }
  .trust-list li { font-size: 0.76rem; color: var(--taupe); padding: 3px 0 3px 20px; position: relative; }
  .trust-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
  .card-modal-error { color: #C0392B; font-size: 0.8rem; margin-bottom: 10px; display: none; }
  .card-modal-error.show { display: block; }

  .card-fields { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--hairline); }
  .card-fields.show { display: block; }
  .crypto-fields { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--hairline); }
  .crypto-fields.show { display: block; }
  .crypto-fields-inline { display: none; margin: -2px 0 2px; padding: 14px; border: 1.5px solid var(--gold-soft); border-top: none; border-radius: 0 0 8px 8px; background: rgba(227,30,36,0.04); }
  .crypto-fields-inline.show { display: block; }
  .stripe-trust-inline {
    display: none; align-items: flex-start; gap: 10px; margin: -2px 0 2px; padding: 12px 14px;
    border: 1.5px solid var(--gold-soft); border-top: none; border-radius: 0 0 8px 8px;
    background: rgba(227,30,36,0.04); font-size: 0.8rem; line-height: 1.5; color: var(--onyx);
  }
  .stripe-trust-inline.show { display: flex; }
  .stripe-trust-inline svg { flex-shrink: 0; margin-top: 1px; color: var(--gold); }
  .crypto-warning { background: #FCF6E3; border: 1px solid #E9D9A0; color: #6b5a1c; font-size: 0.78rem; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; line-height: 1.5; }
  .crypto-network { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--taupe); margin-bottom: 8px; }
  .crypto-network-picker { display: flex; gap: 8px; margin-bottom: 12px; }
  .network-btn { border: 1.5px solid var(--hairline); background: #fff; color: var(--onyx); padding: 7px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
  .network-btn.active { border-color: var(--gold); background: rgba(227,30,36,0.1); color: var(--onyx); }
  .crypto-address-row { display: flex; gap: 8px; }
  .crypto-address-row input { flex: 1; font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; border: 1px solid var(--hairline); border-radius: 6px; padding: 10px 12px; background: var(--ivory); color: var(--onyx); }
  .crypto-address-row button { background: var(--onyx); color: var(--ivory); border: none; padding: 0 18px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
  .crypto-address-row button:hover { background: var(--green); }
  .crypto-address-row button.copied { background: var(--green); }

  .summary-line { display: flex; justify-content: space-between; font-size: 0.86rem; padding: 8px 0; color: var(--taupe); }
  .summary-line.total { color: var(--onyx); font-weight: 700; border-top: 1px solid var(--hairline); margin-top: 8px; padding-top: 14px; font-size: 1rem; }
  .summary-line.total b { font-family: 'IBM Plex Mono', monospace; color: var(--onyx); font-size: 1.2rem; }

  .place-order-btn { width: 100%; background: var(--onyx); color: var(--ivory); border: none; padding: 15px; border-radius: 8px; font-weight: 700; font-size: 0.92rem; margin-top: 16px; }
  .place-order-btn:hover { background: var(--green); }

  .checkout-hint { font-size: 0.72rem; color: var(--taupe); margin-top: 14px; line-height: 1.6; font-family: 'IBM Plex Mono', monospace; }
  .error-note { color: #C0392B; font-size: 0.78rem; margin-top: 10px; display: none; }
  .error-note.show { display: block; }

  .confirm-panel { display: none; text-align: center; padding: 6px 2px 2px; }
  .confirm-panel.show { display: block; }

  .confirm-badge {
    width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #1E7A3C, var(--green-deep));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 6px rgba(38,38,38,0.08), 0 10px 24px -8px rgba(0,0,0,0.45);
    animation: confirmPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .confirm-icon { width: 36px; height: 36px; color: var(--ivory); stroke-width: 2.4; }
  .confirm-icon path {
    stroke-dasharray: 24; stroke-dashoffset: 24;
    animation: confirmCheck 0.4s 0.35s ease-out forwards;
  }
  @keyframes confirmPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  @keyframes confirmCheck { to { stroke-dashoffset: 0; } }
  @media (prefers-reduced-motion: reduce) {
    .confirm-badge { animation: none; }
    .confirm-icon path { animation: none; stroke-dashoffset: 0; }
  }

  .confirm-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--taupe); margin-bottom: 6px; }
  .confirm-panel h3 { font-size: 1.4rem; margin-bottom: 14px; justify-content: center; }

  .order-id {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'IBM Plex Mono', monospace; color: var(--gold-soft); font-size: 0.82rem;
    background: var(--onyx); border-radius: 999px; padding: 8px 16px; margin-bottom: 22px;
  }
  .order-id::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

  .confirm-detail { text-align: left; background: var(--ivory); border: 1px solid var(--hairline); border-radius: 10px; padding: 4px 16px; margin-bottom: 20px; font-size: 0.84rem; }
  .confirm-detail div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .confirm-detail div:last-child { border-bottom: none; }
  .confirm-detail span:first-child { color: var(--taupe); flex-shrink: 0; }
  .confirm-detail span:last-child { text-align: right; font-weight: 600; color: var(--onyx); }
  .confirm-detail div.confirm-items { flex-direction: column; align-items: flex-start; gap: 4px; }
  .confirm-detail div.confirm-items span:first-child { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'IBM Plex Mono', monospace; }
  .confirm-detail div.confirm-items span:last-child { text-align: left; font-weight: 500; line-height: 1.5; }
  .confirm-detail div.confirm-total span:last-child { font-family: 'IBM Plex Mono', monospace; font-size: 1.05rem; color: var(--green); }

  .confirm-next {
    display: flex; align-items: flex-start; gap: 10px; text-align: left;
    background: rgba(38,38,38,0.05); border: 1px solid rgba(38,38,38,0.12); border-radius: 10px;
    padding: 12px 14px; margin-bottom: 20px; font-size: 0.78rem; color: var(--green); line-height: 1.5;
  }
  .confirm-next svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

  .continue-btn { width: 100%; background: var(--onyx); color: var(--ivory); border: none; padding: 13px; border-radius: 8px; font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: background 0.15s; }
  .continue-btn:hover { background: var(--green); }

  footer { background: var(--card); border-top: 1px solid var(--hairline); }
  .footer-bottom { max-width: 1240px; margin: 0 auto; padding: 24px; font-size: 0.78rem; color: var(--taupe); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
  .nav-select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,0.04); color: var(--ivory);
    border: 1px solid rgba(227,30,36,0.35);
    font-size: 0.76rem; font-family: 'IBM Plex Mono', monospace;
    padding: 6px 26px 6px 10px; border-radius: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23F5D76E' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 8px center;
  }
  .nav-select option { background: #14161a; color: var(--ivory); }
  .nav-select-fix { color-scheme: dark; }
  .nav-select-fix option { background: #14161a; color: #FAFAFA; }

  .account-link { display:inline-flex; align-items:center;
    color: var(--ivory); font-size: 0.82rem; font-weight: 600; opacity: 0.9;
    border: 1px solid rgba(227,30,36,0.35); border-radius: 20px; padding: 6px 14px; white-space: nowrap;
  }
  .account-link:hover { opacity: 1; color: var(--gold-soft); border-color: var(--gold); }

  .nav-dropdown { position: relative; }
  .nav-dropdown > span { cursor: default; opacity: 0.85; display: inline-flex; align-items: center; gap: 4px; }
  .nav-dropdown:hover > span { opacity: 1; color: var(--gold-soft); }
  .nav-dropdown-panel {
    position: absolute; top: 100%; left: 0; margin-top: 14px; background: #16171A; border: 1px solid rgba(227,30,36,0.25);
    border-radius: 8px; padding: 6px 0; min-width: 190px; box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; z-index: 60;
  }
  .nav-dropdown-panel::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; pointer-events: auto; }
  .nav-dropdown:hover .nav-dropdown-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-dropdown-panel a { display: block; padding: 10px 18px; font-size: 0.84rem; color: var(--ivory); opacity: 0.9; }
  .nav-dropdown-panel a:hover { background: rgba(255,255,255,0.06); color: var(--gold-soft); opacity: 1; }


#accountNavDropdownPanel { left: auto; right: 0; }

.nav-inner > * { flex-shrink: 0; }
.nav-links a, .nav-select, .account-link, .nav-dropdown > span { white-space: nowrap; }
.logo-full { height: 68px !important; width: auto !important; max-width: 300px !important; max-height: 68px !important; object-fit: contain !important; display: block !important; }
.footer-social-row-compact { max-width: 1240px; margin: 0 auto; padding: 18px 24px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .footer-social-label { font-size: 0.82rem; font-weight: 700; color: var(--onyx); } .footer-social-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.15s; } .footer-social-icon:hover { transform: translateY(-2px); }
