  /* ============================================================
     DIGITALSTORE — CHECKOUT (Premium Vanilla CSS · BEM)
     ============================================================ */
  :root {
    --primary-color: #db2777;
    --primary-dark: #be185d;
    --primary-soft: #fce7f3;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --border: #e2e8f0;
    --success: #059669;
    --danger: #dc2626;
    --radius: 0px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 34px rgba(0, 0, 0, 0.09);
    --transition: 0.3s ease;
  }

  .checkout-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    max-width: 1280px;
    margin: 0 auto;
    padding: 140px 15px 72px;
  }

  /* ---------- Layout ---------- */
  .checkout__title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.7px;
    margin-bottom: 4px;
  }

  .checkout__subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 34px;
  }

  .checkout__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  /* ---------- Card ---------- */
  .checkout-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    transition: box-shadow var(--transition);
  }

  .checkout-card:hover {
    box-shadow: var(--shadow-hover);
  }

  .checkout-card:last-child {
    margin-bottom: 0;
  }

  .checkout-card__title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .checkout-card__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 800;
  }

  /* ---------- Product ---------- */
  .checkout-product {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px 0;
  }

  .checkout-product__thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
  }

  .checkout-product__info {
    flex: 1;
    min-width: 0;
  }

  .checkout-product__name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
  }

  .checkout-product__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
  }

  .checkout-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-color);
  }

  .checkout-tag--muted {
    background: #f1f5f9;
    color: var(--text-muted);
  }

  .checkout-product__price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-color);
  }

  .checkout-product__old-price {
    font-size: 13px;
    color: var(--text-soft);
    text-decoration: line-through;
    margin-right: 8px;
  }

  /* ---------- Quantity ---------- */
  .checkout-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .checkout-qty__btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .checkout-qty__btn:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
  }

  .checkout-qty__value {
    width: 40px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    font-weight: 700;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top: none;
    border-bottom: none;
    outline: none;
  }

  /* ---------- Coupon ---------- */
  .checkout-coupon {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
  }

  .checkout-coupon__input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
  }

  .checkout-coupon__input:focus {
    border-color: var(--primary-color);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
  }

  .checkout-coupon__btn {
    height: 38px;
    padding: 0 16px;
    background: var(--bg);
    color: var(--primary-color);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.3s;
  }

  .checkout-coupon__btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-soft);
  }

  /* ---------- Methods ---------- */
  .checkout-methods {
    display: grid;
    gap: 12px;
  }

  .checkout-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: var(--transition);
    width: 100%;
    text-align: left;
    cursor: pointer;
  }

  .checkout-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
  }

  .checkout-method--active {
    border-color: var(--primary-color);
    background: var(--primary-soft);
  }

  .checkout-method__icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
  }

  .checkout-method__icon--wallet {
    background: var(--primary-color);
  }

  .checkout-method__icon--bank {
    background: #1e3a8a;
  }

  .checkout-method__body {
    flex: 1;
    min-width: 0;
  }

  .checkout-method__name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 3px;
  }

  .checkout-method__desc {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
  }

  .checkout-method__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: var(--transition);
  }

  .checkout-method--active .checkout-method__radio {
    border-color: var(--primary-color);
  }

  .checkout-method--active .checkout-method__radio::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--primary-color);
  }

  /* ---------- Summary (right) ---------- */
  .checkout-summary {
    position: sticky;
    top: 24px;
  }

  .checkout-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 14px;
  }

  .checkout-summary__row strong {
    color: var(--text);
    font-weight: 600;
  }

  .checkout-summary__row--discount strong {
    color: var(--success);
  }

  .checkout-summary__divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
  }

  .checkout-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
  }

  .checkout-summary__total-label {
    font-size: 15px;
    font-weight: 700;
  }

  .checkout-summary__total-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
  }

  /* ---------- Buttons ---------- */
  .checkout-btn--primary {
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    height: 58px;
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 8px 22px rgba(219, 39, 119, 0.32);
    animation: pulse-glow 2.4s ease-in-out infinite;
    cursor: pointer;
  }

  .checkout-btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(219, 39, 119, 0.45);
    animation: none;
  }

  .checkout-btn--primary:disabled {
    background: #ccc;
    box-shadow: none;
    animation: none;
    cursor: not-allowed;
  }

  @keyframes pulse-glow {

    0%,
    100% {
      box-shadow: 0 8px 22px rgba(219, 39, 119, 0.28);
    }

    50% {
      box-shadow: 0 8px 34px rgba(219, 39, 119, 0.55);
    }
  }

  .checkout-summary__note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-soft);
    text-align: center;
    line-height: 1.6;
  }

  .checkout-summary__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }

  .checkout-summary__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
  }

  .cart-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-color);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
  }

  .cart-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  #ajax-cart-reload {
    position: relative;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 900px) {
    .checkout__grid {
      grid-template-columns: 1fr;
    }

    .checkout-summary {
      position: static;
    }
  }

  @media (max-width: 560px) {
    .checkout-container {
      padding: 20px 10px 48px;
    }

    .checkout-card {
      padding: 20px;
    }

    .checkout__title {
      font-size: 24px;
    }

    .checkout-product {
      flex-direction: column;
      align-items: flex-start;
    }

    .checkout-product__thumb {
      width: 100%;
      height: 160px;
    }
  }

  /* ---------- Upgrade Form ---------- */
  .checkout-item-wrapper {
    border-bottom: 1px dashed var(--border);
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  
  .checkout-item-wrapper:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .checkout-upgrade-form {
    background: linear-gradient(to right, #fdf2f8, #ffffff);
    border: 1px solid var(--primary-soft);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(219, 39, 119, 0.03);
  }

  .checkout-upgrade-form__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .checkout-upgrade-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .checkout-upgrade-form__full {
    grid-column: span 2;
  }

  .checkout-upgrade-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    transition: var(--transition);
    outline: none;
  }

  .checkout-upgrade-input::placeholder {
    color: var(--text-soft);
  }

  .checkout-upgrade-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
  }

  @media (max-width: 560px) {
    .checkout-upgrade-form__grid {
      grid-template-columns: 1fr;
    }
    .checkout-upgrade-form__full {
      grid-column: span 1;
    }
  }