        /* Universal font and reset – scoped safely */
        .pawnshop-listings-container,
        .pawnshop-listings-container * {
            font-family: 'Encode Sans SC', sans-serif !important;
            box-sizing: border-box;
        }

        :root {
            --nft-max-card-width: 160px;  
        }

        .section-container {
            background: rgba(30, 30, 30, 0.65);
            backdrop-filter: blur(8px);
            border-radius: 16px;
            padding: 10px 10px 10px 10px;
            margin-top: 10px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            max-width: 1440px;

        }
        
        @media (max-width: 1440px) {
            .section-container {
                margin-left: -20px;
                margin-right: -20px;
            }
        }

        .section-title {
            font-size: 1.8rem;
            color: #F3BB40;
            text-align: center;
            margin-top: 18px;
            margin-bottom: 0px;
            font-weight: 700;
            text-shadow: 0 2px 8px rgba(0,0,0,0.6);
        }

        .listing-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(var(--nft-max-card-width), 1fr));
            gap: 10px;
            max-width: 1400px;
            min-width: 110px;
            margin: 10px 0 0 0 !important;
            padding: 10px 0 0 0 !important;
            box-sizing: border-box; 
        }
        
        

        .listing-card {
            background: #323232;       
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4); 
            display: flex;
            flex-direction: column;
            color: white;   
            height: fit-content;
            align-self: start;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .listing-card:hover,
        .listing-card:focus-visible {
           transform: translateY(-5px);   
           box-shadow: 0 8px 20px rgba(0,0,0,0.5);
        }
        
        .listing-card.hidden-nft {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

        .listing-info {
            padding: 0 6px 6px 6px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .listing-card h4 {
            margin: 0 0 8px;
            color: white !important;   
            font-size: 18px;
        }

        .listing-card p {
            margin: 6px 0 0 0;
            font-size: 14px;
            color: #e0e0e0 !important;  
        }

        .listing-card p strong {
            color: white !important;    
        }

        .no-image {
            width: 100%;
            height: 250px;
            background: #404040;        
            display: flex;
            align-items: center;
            justify-content: center;
            color: #cccccc;
            font-size: 16px;
            border-radius: 8px;
        }

        .buttons {
            display: flex;
            flex-direction: column;
            gap: 0px;
            margin-top: 0px;
        }

        .listing-image-container {
            padding: 6px;
            background: #323232;       
            box-sizing: border-box;
        }

        .listing-image-container img,
        .listing-image-container .no-image {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);  
        }

        @media (min-width: 769px) {
            :root { --nft-max-card-width: 170px; }
        }

        @media (max-width: 768px) {
            :root { --nft-max-card-width: 150px; }
            .listing-grid { padding: 0 0px; }
        }

        @media (max-width: 480px) {
            :root { --nft-max-card-width: 150px; }
        }

        .buy-buttons-container {
            display: flex;
            flex-direction: row;
            gap: 16px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .buy-btn {
            padding: 12px;
            margin-top: 6px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            font-size: 15px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important; 
        }

        .buy-btn:hover {
            opacity: 0.90;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        }
        
        .buy-btn.modal {
            padding:12px 24px !important;
            font-size:1.1rem !important;
            min-width:100px !important;
            box-shadow:0 10px 25px rgba(0,0,0,0.6) !important;';
        }
        
        .direct-btn {
            background: #28a745;
            color: white;
        }
        
        @media (max-width: 768px) {
            .direct-btn.modal {
                margin-top: 0px;
            }
        }
        
        .direct-btn:hover {
            background: #228d3a;
            opacity: 0.90;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        }

        .broker-btn {
            background: #D5A438;
            color: white;
        }
        
       @media (max-width: 768px) {
           .broker-btn.modal {
                margin-top: 0px;
           }
        }
        
        .broker-btn:hover {
            background: #C69B2F;
            opacity: 0.90;
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        }
        
.pawnshop-listings-container .buy-btn.is-cancel-btn {
    background-color: #dc3545 !important;
    color: white !important;
}

.pawnshop-listings-container .buy-btn.is-cancel-btn:hover {
    background: #c82333 !important;
    opacity: 0.90;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

        .cancel-btn {
            background: #dc3545 !important;
            color: white !important;
            padding: 12px 24px !important;
            font-size: 1.1rem !important;
            font-weight: bold !important;
            border: none !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            box-shadow: 0 10px 25px rgba(0,0,0,0.6) !important;
            transition: all 0.3s ease !important;
        }

        .cancel-btn:hover {
            background: #c82333 !important;
            opacity: 0.90;
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
        }

        @media (max-width: 384px) {
            .buy-btn {
                padding: 12px 9px 12px 9px !important;
                margin-top: 6px;
                font-size: 15px;
            }
        }

        @media (max-width: 499px) {
            .listing-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                padding: 0 0px;
            }
            .listing-card { font-size: 14px; }
            .listing-card h4 { font-size: 16px; margin-bottom: 6px; }
            .listing-card p { font-size: 13px; margin: 4px 0; }
            .buy-btn { padding: 10px 8px; font-size: 14px; }
        }

        /* Modal overlay styles */
  #pawnshop-nftModalOverlay {
    display: none;           /* default state = hidden */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    padding: 20px;
    box-sizing: border-box;
  }

  #pawnshop-nftModalOverlay.visible {
    display: flex;
  }

  body.modal-open {
    overflow: hidden;
  }
/* Transaction Modal - properly hidden by default */
#txModalOverlay {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 2147483648;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#txModalOverlay.tx-modal-visible {
    opacity: 1;
    visibility: visible;
}

.tx-modal-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}
/* Remove italics globally across the entire pawnshop embed */
.pawnshop-listings-container,
.pawnshop-listings-container * {
    font-style: normal !important;
}


.pawnshop-listings-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0px 10px;
  box-sizing: border-box;
}

.tx-modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 30px 25px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    color: white;
    position: relative;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-family: 'Encode Sans SC', sans-serif; */
}

.tx-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    /*line-height: 1;
    padding: 0; */
}

.tx-title {
    color: #F3BB40;
    margin: 0 0 20px 0;
    font-size: 1.6rem;
}

.tx-description {
    margin: 15px 0;
    line-height: 1.5;
    color: #e0e0e0;
}

.tx-open-wallet-btn {
    background: #007bff;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.tx-open-wallet-btn:hover {
    opacity: 0.90;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.tx-open-wallet-btn.wc-btn {
    background: #D83D2A;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.tx-open-wallet-btn.wc-btn:hover {
    opacity: 0.90;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.no-traits {
    color: #aaa;
    margin: 0;
}

/* Traits list container */
.traits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0;
}

/* Individual trait row */
.trait-item {
    padding: 8px 0;
    border-bottom: 1px dashed #444;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
    max-width: 600px;
}

.detail-item {
    padding: 12px 0;
    border-bottom: 1px dashed #444;
}

.detail-value {
    word-break: break-all;
    color: #ccc;
    font-size: 18px;
}

.detail-value.token-id {
    font-family: monospace;
}

.highlight-value {
    color: #F3BB40;
    font-size: 1.1rem;
}

.traits-container {
  margin-top: 10px;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #c00;
}

.qr-container.hidden {
  display: none;
}    

.nft-modal-close {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    font-size: 34px;
    line-height: 1;
}

.nft-modal-close::before {
    content: '';
    position: absolute;
    width: 28px;                /* ← Make circle smaller here */
    height: 28px;
    background: #000;
    border-radius: 25%;
    z-index: -1;                /* Behind the X */
    transition: all 0.2s ease;
}

/* Desktop / larger screens */
@media (min-width: 769px) {
    .nft-modal-close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        z-index: 10;           /* lower z-index on desktop if needed */
    }
}

@media (max-width: 768px) {
    .nft-modal-close {
        top: 12px;
        right: 27px;
        width: 50px;
        height: 50px;
        z-index: 20;
    }
}

/* Mobile / smaller screens */
@media (max-width: 450px) {
    .nft-modal-close {
        top: 12px;
        right: 12px;
        width: 50px;
        height: 50px;
        z-index: 20;
    }
}

.modal-image {
    width: 100% !important;
    max-width: 350px !important;
    height: auto !important;
    border-radius: 12px !important;
    object-fit: contain !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.modal-image-clone {
    width: 90% !important;
    max-width: 350px !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
    background: transparent !important;
    padding: 0 !important;  
}

@media (max-width: 768px) {
  .modal-image,
  .modal-image-clone {
    margin-left:  -0px !important;
    margin-right: -0px !important;
    margin: auto !important;
    width: calc(100% + 0px) !important; 
    max-width: none !important; 
  }
}

.pawnshop-modal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
}

@media (min-width: 769px) {
  .pawnshop-modal-scroll {
    padding: 30px 20px 80px 18px;
  }
}

@media (max-width: 450px) {
  .pawnshop-modal-scroll {
    padding: 20px
  }
}

.pawnshop-modal-mobile {
  position: relative;
  background: #282828;
  border-radius: 16px;
  width: 100vw;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: white;
}

.modal-title-centered {
  color: #F3BB40;
  font-size: 1.8rem;
  margin: 8px auto 10px auto;
  text-align: center;
  width: 100%;
  max-width: 600px;
  word-break: break-word;
}

.modal-listed-status {
  margin: 0 auto 30px auto;
  font-size: 1.1rem;
  color: #ccc;
  font-weight: bold;
  text-align: center;
  width: 100%;
  max-width: 600px;
}

@media (min-width: 769px) {
  .modal-listed-status {
    margin: 0 auto -5px auto;
  }
}

.mobile-button-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 10px 0 38px 0;
}

.cancel-btn.is-cancel-btn {
  padding: 12px 24px !important;
  font-size: 1.1rem !important;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.modal-tabs-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
}

.modal-tab-buttons {
  display: flex;
  margin-left: -20px;
  margin-right: -20px;
  margin-bottom: 0;
}

@media (max-width: 450px) {
  .modal-tab-buttons {
    margin-left: 0px;
    margin-right: 0px;
  }
}

.modal-tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 12px;
  background: #323232;
  color: #ccc;
}

.modal-tab-btn.active {
  background: #4b4b4b;
  color: #F3BB40;
}

.modal-tab-btn.left {
  border-radius: 12px 0 0 12px;
}

@media (max-width: 768px) {
  .modal-tab-btn.left {
    margin-top: 35px;
  }
}

.modal-tab-btn.right {
  border-radius: 0 12px 12px 0;
}

@media (max-width: 768px) {
  .modal-tab-btn.right {
    margin-top: 35px;
  }
}

.modal-tab-content {
  width: 100%;
  padding: 10px 10px 20px 10px;
  box-sizing: border-box;
  text-align: center;
}

.pawnshop-modal-desktop {
  position: relative;
  background: #282828;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  width: 92vw;
  max-width: 900px;
  max-height: 100vh;
  color: white;
}

/* Two-column layout wrapper */
.modal-columns-wrapper {
  display: flex;
  flex-direction: row;
  gap: 15px;
  width: 100%;
  align-items: flex-start;
  margin-bottom: 35px;
}

/* Left column – image + title + status */
.modal-left-column {
  flex-shrink: 0;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-right: 10px;
}

/* Right column – tabs + content */
.modal-right-column {
  flex: 1;
  min-width: 0;
}

/* Desktop title (slightly larger than mobile) */
.modal-title-desktop {
  color: #F3BB40;
  font-size: 1.9rem;
  margin: 5px 0 3px 0;
  padding: 0 10px;
  word-break: break-word;
}

/* Tabs container (desktop version) */
.modal-tabs-desktop {
  display: flex;
  margin-bottom: 0px;
  padding-right: 50px;
  box-sizing: border-box;
}

/* Tab button base */
.modal-tab-btn-desktop {
  flex: 1;
  padding: 14px;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Active / inactive states */
.modal-tab-btn-desktop.active {
  background: #4b4b4b;
  color: #F3BB40;
}

.modal-tab-btn-desktop.inactive {
  background: #323232;
  color: #ccc;
}

/* Rounding for tabs */
.modal-tab-btn-desktop.left {
  border-radius: 12px 0 0 12px;
}

.modal-tab-btn-desktop.right {
  border-radius: 0 12px 12px 0;
}

/* Tab content area (desktop) */
.modal-tab-content-desktop {
  margin-top: 10px;
  text-align: center;
  padding-right: 15px;
  padding-left: 5px;
}

/* Bottom buttons fixed wrapper */
.modal-bottom-buttons-wrapper {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 95%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 20;
  pointer-events: none; /* so clicks go through to scroll if needed */
}

/* Buttons container inside wrapper */
.modal-buttons-container {
  display: flex;
  flex-direction: row;
  gap: 30px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  pointer-events: auto;
}

.retry-btn {
  background: #6c757d;
  color: white;
  padding: 12px 24px !important;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
  min-width: 160px;
  white-space: nowrap;
  margin-bottom: 0px;
  margin-top: -16px;
  opacity: 1; 
  display: inline-block;
}

@media (max-width: 768px) {
    .retry-btn {
        margin-bottom: 0px;
    }
}

/* Hover / active state */
.retry-btn:hover,
.retry-btn:focus-visible {
  background: #5f666e;
  opacity: 0.90;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.retry-btn.is-loading,
.retry-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.retry-btn.is-hidden {
  display: none;
}

.resume-btn {
  background: #6c757d;
  color: white;
  padding: 12px 24px !important;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
  min-width: 160px;
  white-space: nowrap;
  margin-bottom: 0px;
  margin-top: -16px;
  opacity: 1; 
  display: inline-block;
}

@media (max-width: 768px) {
    .resume-btn {
        margin-bottom: 0px;
    }
}

/* Hover / active state */
.resume-btn:hover,
.resume-btn:focus-visible {
  background: #5f666e;
  opacity: 0.90;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.resume-btn.is-loading,
.resume-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.resume-btn.is-hidden {
  display: none;
}

.fallback-row {
  display: flex;
  justify-content: center;
  align-items: center;          /* optional: better vertical alignment */
  margin: 30px 0 20px 0;
  width: 100%;
  gap: 20px;
}

.modal-action-buttons {
  display: flex;
  flex-direction: column;          /* ← Key change: stack vertically by default */
  align-items: center;             /* center each button horizontally */
  justify-content: center;         /* optional – vertical spacing feel */
  gap: 16px;                       /* ← space BETWEEN the two buttons */
  width: 100%;
  padding: 0 10px;
  margin: 0px 0 0px 0;          /* adjust bottom margin to taste */
  box-sizing: border-box;
}

@media (min-width: 769px) {
  body .modal-action-buttons {
    flex-direction: row;        /* ← most important change */
    flex-wrap: nowrap;          /* prevent wrapping (optional but good practice) */
    justify-content: center;    /* or space-between / space-around / flex-end etc. */
    align-items: center;        /* vertical alignment of buttons */
    gap: 30px;                  /* matches your other container */
    margin: 0;
    padding: 0;
  }
}

.buy-btn.broker-btn.direct-btn.modal {
  margin: 0 -20px -5px -20px;    /* more generous inside modal */
}

@media (max-width: 768px) {
    .buy-btn.broker-btn.direct-btn.modal {
        margin-top: 40px;
        margin-bottom: -35px;
    }
}

.cancel-btn.buy-btn.modal.is-cancel-btn {
  padding: 12px 24px !important;
  margin: 0 -30px !important;
  max-width: 223px;
}

.cancel-btn.buy-btn.is-cancel-btn {
  padding: 12px 24px !important;
  margin: 0px -30px 0px -30px !important;
  max-width: 223px;
}

@media (max-width: 768px) {
    .cancel-btn.buy-btn.is-cancel-btn {
        margin-top: 20px;
        margin-bottom: 35px;
    }
}

.broker-btn.hidden,
.direct-btn.hidden {
    display: none !important;
}

.buy-btn.hidden {
    display: none !important;
}

.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
  border-width: 3px;
  border-color: #4d4d4d;
  border-style: solid;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000000000000;
    font-size: 20px;
    text-align: center;
    max-width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

@media (max-width: 768px) {
    .toast-notification {
        font-size: 18px;
    }
}

.toast-notification.visible {
    visibility: visible;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}

.listing-image-container img,
.listing-image {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;           /* This is the most important line */
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.modal-image,
.modal-image-clone {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    object-fit: cover !important;
}

