body, html {
    height: 100%!important;
}

/* ================= CART PAGE ================= */
.cart-page {
  padding: 60px 10%;
}

.cart-page h1 {
  font-size: 32px;
  margin-bottom: 30px;
}

/* layout */
.cart-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* ================= ITEMS ================= */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-item {
  display: flex;
  gap: 20px;
  align-items: center;

  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 15px;

  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);

  transition: all 0.4s ease;
}

.cart-item {
  overflow: hidden;
}

/* IMAGE */
.cart-img img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

/* INFO */
.cart-info {
  flex: 1;
}

.cart-info h3 {
  margin-bottom: 6px;
}

.meta {
  display: flex;
  gap: 15px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.desc {
  font-size: 13px;
  color: #64748b;
}

/* RIGHT SIDE */
.cart-actions {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* REMOVE BUTTON */
.remove-btn {
  background: #ef4444;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

.remove-btn:hover {
  background: #dc2626;
}

/* ================= SUMMARY ================= */
.cart-summary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);

  position: sticky;
  top: 100px;
}

.cart-summary h2 {
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  color: #cbd5f5;
}

.summary-row.total {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  margin-top: 15px;
}

.checkout-btn {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(45deg, #38bdf8, #22c55e);
  color: #000;
  transition: 0.2s;
  display: flex;
  justify-content: center;
}

.checkout-btn:hover {
  transform: scale(1.05);
}

.checkout-btn:active {
  transform: scale(0.95);
}

/* ================= MOBILE ================= */
@media (max-width: 900px) {
  .cart-wrapper {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: relative;
    top: 0;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item img {
    width: 100%;
  }

  .item-price {
    align-self: flex-end;
  }
}

.cart-item.removing {
  opacity: 0;
  transform: translateX(50px);
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* SUMMARY ITEMS */
.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-name {
  color: #cbd5f5;
}

.summary-price {
  font-weight: 500;
}

/* spacing before totals */
#summaryItems {
  margin-bottom: 15px;
}

/* IMAGE WRAPPER */
.cart-img {
  width: 180px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.cart-img img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.cart-item:hover .cart-img img {
  transform: scale(1.05);
}

/* OVERLAY */
.img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;

  opacity: 0;
  transition: 0.3s ease;
}

/* SHOW ON HOVER */
.cart-img:hover .img-overlay {
  opacity: 1;
}

/* IMAGE ZOOM */
.cart-img:hover img {
  transform: scale(1.1);
}

/* BUTTON STYLE */
.img-overlay button {
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.img-overlay button:hover {
  background: #38bdf8;
  color: black;
}

/* BUTTONS */
.preview-btn,
.detail-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
  width: -webkit-fill-available;
  max-width: 80px;
  text-align: center;
}

.preview-btn {
  background: #38bdf8;
  color: #000;
}

.detail-btn {
  background: #22c55e;
  color: #000;
}

.preview-btn:hover,
.detail-btn:hover {
  transform: scale(1.1);
}

/* ================= MOBILE CART ================= */
@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  /* IMAGE FULL WIDTH */
  .cart-img {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
  }

  .cart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* OVERLAY BUTTONS */
  .img-overlay {
    position: absolute;

    display: flex;
    gap: 10px;
  }

  .img-overlay button {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
  }

  /* INFO FULL WIDTH */
  .cart-info {
    width: 100%;
  }

  .cart-info h3 {
    font-size: 16px;
  }

  .meta {
    font-size: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .desc {
    font-size: 13px;
  }

  /* ACTIONS BELOW */
  .cart-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .price {
    font-size: 16px;
    font-weight: bold;
  }

  .remove-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* overlay */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);

  display: flex;
  justify-content: center;
  align-items: flex-end;

  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 999;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* bottom sheet */
.modal-sheet {
  width: 100%;
  max-width: 500px;
  background: #111;
  color: white;

  border-radius: 20px 20px 0 0;
  padding: 20px;

  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.modal.show .modal-sheet {
  transform: translateY(0);
}

/* drag handle (visual only) */
.sheet-handle {
  width: 40px;
  height: 5px;
  background: #555;
  border-radius: 10px;
  margin: 0 auto 10px;
}

/* cart summary */
.cart-summary {
  font-size: 14px;
  height: fit-content;
}

.cart-summary .item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  opacity: 0.9;
}

.cart-summary .total {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #333;
  font-size: 16px;
}

/* buttons */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.cancel {
  flex: 1;
  background: #6b7280;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
}

.confirm {
  flex: 1;
  background: linear-gradient(45deg, #38bdf8, #22c55e);
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
}

/* spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.confirm.loading .spinner {
  opacity: 1;
}

.confirm.loading .btn-text {
  opacity: 0;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* hide mobile buttons by default (desktop) */
.mobile-actions {
  display: none;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

  /* hide overlay buttons */
  .img-overlay {
    display: none !important;
  }

  /* show mobile buttons */
  .mobile-actions {
    display: flex;
    gap: 8px;
  }

  /* layout fix */
  .cart-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
  }

  /* buttons row */
  .mobile-actions {
    order: 1;
  }

  .price {
    order: 2;
    margin-left: auto;
  }

  .remove-btn {
    order: 3;
    width: 100%;
    text-align: center;
  }

  /* smaller buttons */
  .preview-btn,
  .detail-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.mobile-actions button {
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 8px;
  transition: 0.2s;
}

.mobile-actions button:hover {
  background: #38bdf8;
  color: black;
}

/* EMPTY CART */
.empty-cart {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    /* ICON */
    .empty-cart i {
        font-size: 150px;
        color: dimgray;
        margin-bottom: 20px;
        opacity: 0.8;
    }

    /* TITLE */
    .empty-cart h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    /* TEXT */
    .empty-cart p {
        color: #94a3b8;
        margin-bottom: 20px;
    }

/* BUTTON */
.browse-btn {
    background: linear-gradient(45deg, #38bdf8, #22c55e);
    color: black;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.2s;
}

    .browse-btn:hover {
        transform: scale(1.05);
    }

    .browse-btn:active {
        transform: scale(0.95);
    }

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

    .modal.show {
        display: flex;
    }

/* MAIN */

.checkout-modal {
    width: 100%;
    max-width: 1100px;
    background: #0f172a;
    border-radius: 24px;
    overflow: hidden;
    animation: modalShow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

@keyframes modalShow {

    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* HEADER */

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

    .checkout-header h2 {
        color: white;
        margin: 0;
        font-size: 28px;
    }

    .checkout-header p {
        color: #94a3b8;
        margin-top: 6px;
    }

.close-modal {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: #1e293b;
    color: white;
    cursor: pointer;
    transition: 0.25s;
}

    .close-modal:hover {
        background: #334155;
    }

/* ================= MODAL ================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.checkout-modal {
    width: 100%;
    max-width: 1180px;
    background: #16181d;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: 0 40px 100px rgba(0,0,0,.45);
}

/* ================= HEADER ================= */

.checkout-header {
    padding: 28px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

    .checkout-header h2 {
        color: #fff;
        font-size: 2rem;
        margin-bottom: 6px;
    }

    .checkout-header p {
        color: #9ca3af;
        font-size: 1rem;
    }

.close-modal {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 16px;
    background: #23262f;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: .2s;
}

    .close-modal:hover {
        background: #2d313d;
    }

/* ================= BODY ================= */

.checkout-body {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}

/* ================= LEFT ================= */

.payment-methods {
    padding: 34px;
    border-right: 1px solid rgba(255,255,255,.06);
}

.crypto-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 34px;
}

.crypto-main-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(135deg,#f7931a,#ffca61);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: white;
    flex-shrink: 0;
}

.crypto-header h3 {
    color: white;
    font-size: 1.7rem;
    margin-bottom: 8px;
}

.crypto-header p {
    color: #9ca3af;
    line-height: 1.6;
}

.crypto-info-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.crypto-info-card {
    display: flex;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    background: #1d212a;
    border: 1px solid rgba(255,255,255,.05);
}

.crypto-info-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #282e3a;
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.crypto-info-card h4 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.crypto-info-card p {
    color: #9ca3af;
    line-height: 1.7;
    font-size: .95rem;
}

/* ================= RIGHT ================= */

.deposit-section {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.deposit-top {
    margin-bottom: 30px;
}

    .deposit-top h3 {
        color: #fff;
        font-size: 1.6rem;
        margin-bottom: 18px;
    }

.deposit-total {
    background: #202530;
    border-radius: 22px;
    padding: 22px;
}

    .deposit-total span {
        color: #9ca3af;
        display: block;
        margin-bottom: 10px;
    }

    .deposit-total strong {
        color: #fff;
        font-size: 2.4rem;
    }

/* ================= AMOUNT ================= */

.amount-box {
    margin-bottom: 24px;
}

    .amount-box label {
        color: #c5cad5;
        display: block;
        margin-bottom: 12px;
    }

.amount-input {
    height: 68px;
    border-radius: 18px;
    background: #202530;
    border: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
}

    .amount-input span {
        color: #9ca3af;
        font-size: 1.2rem;
    }

    .amount-input input {
        flex: 1;
        background: none;
        border: none;
        outline: none;
        color: white;
        font-size: 1.2rem;
    }

/* ================= NETWORK ================= */

.network-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.network-row {
    background: #202530;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.network-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .network-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
    }

.currency-icon {
    background: rgba(39,117,202,.12);
    padding: 5px;
}

.network-chain-icon {
    background: rgba(243,186,47,.12);
    padding: 5px;
}

.network-row span {
    color: #9ca3af;
    font-size: .95rem;
}

.network-row strong {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.pending-status {
    color: #ffcc66 !important;
}

/* ================= FEATURES ================= */

.deposit-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
}

    .feature-item i {
        color: #38bdf8;
    }

/* ================= BUTTON ================= */

.deposit-btn {
    width: 100%;
    height: 68px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: black;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: .25s;
}

    .deposit-btn:hover {
        transform: translateY(-2px) scale(1.05);
    }

    .deposit-btn:active {
        transform: translateY(-2px) scale(0.9);
    }

/* ================= RESPONSIVE ================= */

@media(max-width:950px) {

    .checkout-body {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }
}

@media(max-width:650px) {

    .checkout-header,
    .payment-methods,
    .deposit-section {
        padding: 22px;
    }

    .crypto-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .deposit-total strong {
        font-size: 2rem;
    }

    .crypto-main-icon {
        width: 72px;
        height: 72px;
        font-size: 2rem;
    }
}

.checkout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    .checkout-modal-overlay.show {
        display: flex;
    }

.checkout-modal-container {
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #111827;
}

.checkout-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.checkout-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.purchase-order-info {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.order-id {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: #0d6efd;
}

.order-warning {
    margin-top: 20px;
    padding: 15px;
    background: #fff8e5;
    border-left: 4px solid orange;
    border-radius: 5px;
}

.btn-copy {
    margin-left: 10px;
    cursor: pointer;
}