/* BuscaDittos Styles */

/* ===== MODAL OVERLAY — Full-screen, immune to parent container ===== */
.bd-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.bd-modal-overlay.is-open {
    display: flex !important;
}

.bd-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    margin: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.bd-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
    padding: 0;
}

.bd-modal-close:hover {
    color: #1e293b;
}

.buscadittos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* Espacio superior solo para escritorio */
@media (min-width: 992px) {
    .buscadittos-wrapper {
        margin-top: -50px !important;
    }
}

.bd-title-logo {
    height: 42px !important;
    width: auto !important;
    vertical-align: middle !important;
    margin-right: 12px !important;
    display: inline-block !important;
}

/* Header & Controls */
.bd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Center vertically */
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.bd-header .btn-bd-primary {
    /* Ensure button doesn't stretch */
    align-self: center;
    margin-left: auto;
    /* Push to right just in case */
}

.bd-title h1 {
    font-size: 32px;
    font-weight: 900;
    color: #1e293b;
    margin: 0;
}

.bd-subtitle {
    color: #64748b;
    margin: 5px 0 0;
}

/* Buttons */
.btn-bd-primary {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-bd-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-bd-login {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-bd-login:hover {
    background: #2563eb;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Filters */
.bd-filters {
    background: #f8fafc;
    /* Lighter background for filter area */
    padding: 10px 15px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    display: inline-flex;
    /* Shrink to fit content */
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bd-input,
.bd-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: auto;
    /* Let content dictate width */
    min-width: 150px;
}

.bd-input:focus,
.bd-select:focus {
    border-color: #f59e0b;
}

.bd-input {
    width: 200px;
}


/* Feed Grid */
.bd-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    /* Grid items stretch by default, forcing equal height */
}

/* Card Design */
.bd-card {
    background: #ffffff;
    /* Explicit White for Light Mode */
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Flex Layout for Alignment */
    display: flex;
    flex-direction: column;
    /* Height 100% ensures it fills the grid cell */
    height: 100%;
    margin-bottom: 0;
}

.bd-card-content {
    margin-bottom: 15px;
}

.bd-action-area {
    margin-top: auto;
    /* Pushes button to bottom */
    padding-top: 15px;
    border-top: 1px solid transparent;
}

/* ... existing hover styles ... */
.bd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* Dark Mode Support - Only via Body Classes */
/* Removed @media (prefers-color-scheme: dark) to prevent OS-level override */
/* Force Dark Mode via Classes */
body.dark .bd-card,
body.dark-mode .bd-card,
body.darkMode .bd-card,
[data-theme="dark"] .bd-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .bd-card h3,
body.dark-mode .bd-card h3,
body.darkMode .bd-card h3,
[data-theme="dark"] .bd-card h3 {
    color: #f8fafc !important;
}

body.dark .bd-username,
body.dark-mode .bd-username,
body.darkMode .bd-username,
[data-theme="dark"] .bd-username {
    color: #e2e8f0 !important;
}

body.dark .bd-card-notes,
body.dark-mode .bd-card-notes,
body.darkMode .bd-card-notes,
[data-theme="dark"] .bd-card-notes {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

/* Force Light Mode - Overrides Media Query */
body.light .bd-card,
body.light-mode .bd-card,
body.lightMode .bd-card,
[data-theme="light"] .bd-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light .bd-card h3,
body.light-mode .bd-card h3,
body.lightMode .bd-card h3,
[data-theme="light"] .bd-card h3 {
    color: #1e293b !important;
}

body.light .bd-username,
body.light-mode .bd-username,
body.lightMode .bd-username,
[data-theme="light"] .bd-username {
    color: #1e293b !important;
}

body.light .bd-card-notes,
body.light-mode .bd-card-notes,
body.lightMode .bd-card-notes,
[data-theme="light"] .bd-card-notes {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* Feed Card Specifics */
.bd-card-body {
    display: flex;
    gap: 15px;
}

.bd-card-image {
    flex-shrink: 0;
    width: 80px;
}

.bd-card-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 2.5/3.5;
}

.bd-card-details {
    flex-grow: 1;
}

.bd-card-notes {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    margin-top: 10px;
    line-height: 1.5;
    /* Fixed Height & Truncation */
    height: 70px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.bd-card-notes.has-notes:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bd-card-notes.no-notes {
    cursor: default !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card User Info */
.bd-card-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.bd-username {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
}

.bd-time {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 10px;
    color: #94a3b8;
    background: rgba(248, 250, 252, 0.9);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.bd-badge {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    vertical-align: middle;
}

/* Price Tag - Enhanced Design */
.bd-price-tag {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #7c3aed;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.bd-price-label {
    font-size: 11px;
    color: #e9d5ff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bd-price-amount {
    font-weight: 800;
    color: #ffffff;
    font-size: 17px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Action Buttons */
.bd-action-area {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid transparent;
}

.btn-bd-offer {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #1e293b;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-bd-offer:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.bd-own-request {
    width: 100%;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    border: 1px dashed #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

/* ================================================================
   DARK MODE — Modals (Publicar Pedido + Yo la Tengo)
   Uses same selectors as existing dark mode rules above
   ================================================================ */

/* Modal container */
body.dark .bd-modal-content,
body.dark-mode .bd-modal-content,
body.darkMode .bd-modal-content,
[data-theme="dark"] .bd-modal-content {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

/* Headings & step titles */
body.dark .bd-modal-content h1,
body.dark .bd-modal-content h2,
body.dark .bd-modal-content h3,
body.dark .bd-modal-content h4,
body.dark-mode .bd-modal-content h1,
body.dark-mode .bd-modal-content h2,
body.dark-mode .bd-modal-content h3,
body.dark-mode .bd-modal-content h4,
body.darkMode .bd-modal-content h1,
body.darkMode .bd-modal-content h2,
body.darkMode .bd-modal-content h3,
body.darkMode .bd-modal-content h4,
[data-theme="dark"] .bd-modal-content h1,
[data-theme="dark"] .bd-modal-content h2,
[data-theme="dark"] .bd-modal-content h3,
[data-theme="dark"] .bd-modal-content h4 {
    color: #f1f5f9 !important;
}

/* Field labels */
body.dark .bd-modal-content label,
body.dark-mode .bd-modal-content label,
body.darkMode .bd-modal-content label,
[data-theme="dark"] .bd-modal-content label {
    color: #e2e8f0 !important;
}

/* Inputs, selects, textareas */
body.dark .bd-modal-content input,
body.dark .bd-modal-content select,
body.dark .bd-modal-content textarea,
body.dark-mode .bd-modal-content input,
body.dark-mode .bd-modal-content select,
body.dark-mode .bd-modal-content textarea,
body.darkMode .bd-modal-content input,
body.darkMode .bd-modal-content select,
body.darkMode .bd-modal-content textarea,
[data-theme="dark"] .bd-modal-content input,
[data-theme="dark"] .bd-modal-content select,
[data-theme="dark"] .bd-modal-content textarea {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

body.dark .bd-modal-content input::placeholder,
body.dark .bd-modal-content textarea::placeholder,
body.dark-mode .bd-modal-content input::placeholder,
body.dark-mode .bd-modal-content textarea::placeholder,
body.darkMode .bd-modal-content input::placeholder,
body.darkMode .bd-modal-content textarea::placeholder,
[data-theme="dark"] .bd-modal-content input::placeholder,
[data-theme="dark"] .bd-modal-content textarea::placeholder {
    color: #64748b !important;
}

body.dark .bd-modal-content input:focus,
body.dark .bd-modal-content select:focus,
body.dark .bd-modal-content textarea:focus,
body.dark-mode .bd-modal-content input:focus,
body.dark-mode .bd-modal-content select:focus,
body.dark-mode .bd-modal-content textarea:focus,
body.darkMode .bd-modal-content input:focus,
body.darkMode .bd-modal-content select:focus,
body.darkMode .bd-modal-content textarea:focus,
[data-theme="dark"] .bd-modal-content input:focus,
[data-theme="dark"] .bd-modal-content select:focus,
[data-theme="dark"] .bd-modal-content textarea:focus {
    border-color: #7c3aed !important;
    outline: none !important;
}

/* Select dropdown arrow color fix for dark mode */
body.dark .bd-modal-content select,
body.dark-mode .bd-modal-content select,
body.darkMode .bd-modal-content select,
[data-theme="dark"] .bd-modal-content select {
    color-scheme: dark;
}

/* Card info preview (offer card inside the modal) */
body.dark .bd-modal-content .bd-offer-card-preview,
body.dark .bd-modal-content .bd-card-info,
body.dark .bd-modal-content [class*="card-info"],
body.dark .bd-modal-content [class*="offer-preview"],
body.dark-mode .bd-modal-content .bd-offer-card-preview,
body.dark-mode .bd-modal-content .bd-card-info,
body.dark-mode .bd-modal-content [class*="card-info"],
body.dark-mode .bd-modal-content [class*="offer-preview"],
body.darkMode .bd-modal-content .bd-offer-card-preview,
body.darkMode .bd-modal-content .bd-card-info,
body.darkMode .bd-modal-content [class*="card-info"],
body.darkMode .bd-modal-content [class*="offer-preview"],
[data-theme="dark"] .bd-modal-content .bd-offer-card-preview,
[data-theme="dark"] .bd-modal-content .bd-card-info,
[data-theme="dark"] .bd-modal-content [class*="card-info"],
[data-theme="dark"] .bd-modal-content [class*="offer-preview"] {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* Any paragraph / span text inside modal */
body.dark .bd-modal-content p,
body.dark .bd-modal-content span:not(.bd-price-amount):not(.bd-price-label),
body.dark-mode .bd-modal-content p,
body.dark-mode .bd-modal-content span:not(.bd-price-amount):not(.bd-price-label),
body.darkMode .bd-modal-content p,
body.darkMode .bd-modal-content span:not(.bd-price-amount):not(.bd-price-label),
[data-theme="dark"] .bd-modal-content p,
[data-theme="dark"] .bd-modal-content span:not(.bd-price-amount):not(.bd-price-label) {
    color: #cbd5e1 !important;
}

/* Close button */
body.dark .bd-modal-close,
body.dark-mode .bd-modal-close,
body.darkMode .bd-modal-close,
[data-theme="dark"] .bd-modal-close {
    color: #64748b !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
}

body.dark .bd-modal-close:hover,
body.dark-mode .bd-modal-close:hover,
body.darkMode .bd-modal-close:hover,
[data-theme="dark"] .bd-modal-close:hover {
    color: #f1f5f9 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* "Volver" link inside modal */
body.dark .bd-modal-content a:not(.btn-bd-primary),
body.dark-mode .bd-modal-content a:not(.btn-bd-primary),
body.darkMode .bd-modal-content a:not(.btn-bd-primary),
[data-theme="dark"] .bd-modal-content a:not(.btn-bd-primary) {
    color: #a78bfa !important;
}

/* Small helper text / subtitles */
body.dark .bd-modal-content small,
body.dark .bd-modal-content .form-hint,
body.dark-mode .bd-modal-content small,
body.dark-mode .bd-modal-content .form-hint,
body.darkMode .bd-modal-content small,
body.darkMode .bd-modal-content .form-hint,
[data-theme="dark"] .bd-modal-content small,
[data-theme="dark"] .bd-modal-content .form-hint {
    color: #64748b !important;
}

/* Dividers inside modal */
body.dark .bd-modal-content hr,
body.dark-mode .bd-modal-content hr,
body.darkMode .bd-modal-content hr,
[data-theme="dark"] .bd-modal-content hr {
    border-color: #334155 !important;
}

/* Image upload area */
body.dark .bd-modal-content [class*="upload"],
body.dark-mode .bd-modal-content [class*="upload"],
body.darkMode .bd-modal-content [class*="upload"],
[data-theme="dark"] .bd-modal-content [class*="upload"] {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* ================================================================
   DARK MODE — Barra de Filtros (Buscar carta + dropdown TCG)
   ================================================================ */

body.dark .bd-filters,
body.dark-mode .bd-filters,
body.darkMode .bd-filters,
[data-theme="dark"] .bd-filters {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .bd-input,
body.dark .bd-select,
body.dark-mode .bd-input,
body.dark-mode .bd-select,
body.darkMode .bd-input,
body.darkMode .bd-select,
[data-theme="dark"] .bd-input,
[data-theme="dark"] .bd-select {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
    color-scheme: dark;
}

body.dark .bd-input::placeholder,
body.dark-mode .bd-input::placeholder,
body.darkMode .bd-input::placeholder,
[data-theme="dark"] .bd-input::placeholder {
    color: #64748b !important;
}

body.dark .bd-input:focus,
body.dark .bd-select:focus,
body.dark-mode .bd-input:focus,
body.dark-mode .bd-select:focus,
body.darkMode .bd-input:focus,
body.darkMode .bd-select:focus,
[data-theme="dark"] .bd-input:focus,
[data-theme="dark"] .bd-select:focus {
    border-color: #7c3aed !important;
}

/* ================================================================
   DARK MODE — Card info preview inside "Hacer Oferta" modal
   (.bd-offer-info-box / #bd-offer-request-info)
   Inline styles in PHP require !important overrides by ID/class
   ================================================================ */

body.dark .bd-offer-info-box,
body.dark #bd-offer-request-info,
body.dark-mode .bd-offer-info-box,
body.dark-mode #bd-offer-request-info,
body.darkMode .bd-offer-info-box,
body.darkMode #bd-offer-request-info,
[data-theme="dark"] .bd-offer-info-box,
[data-theme="dark"] #bd-offer-request-info {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

/* Card name h3 (inline color:#1e293b) */
body.dark #bd-offer-card-name,
body.dark-mode #bd-offer-card-name,
body.darkMode #bd-offer-card-name,
[data-theme="dark"] #bd-offer-card-name {
    color: #f1f5f9 !important;
}

/* Set name text (inline color:#64748b) */
body.dark #bd-offer-card-set,
body.dark-mode #bd-offer-card-set,
body.darkMode #bd-offer-card-set,
[data-theme="dark"] #bd-offer-card-set {
    color: #94a3b8 !important;
}

/* Max price stays purple — no change needed */

/* ================================================================
   TABS: Feed / Mis Pedidos
   ================================================================ */

.bd-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.bd-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.bd-tab:hover {
    color: #7c3aed;
    background: #f5f3ff;
}

.bd-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    background: #f5f3ff;
}

/* ================================================================
   MIS PEDIDOS — Request cards
   ================================================================ */

.bd-my-requests-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bd-my-request-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Header row: thumb + info + delete button */
.bd-my-req-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.bd-my-req-thumb {
    width: 72px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.bd-my-req-info {
    flex: 1;
}

.bd-my-req-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.bd-my-req-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.bd-my-req-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bd-my-req-notes {
    margin: 8px 0 0;
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

/* Status badges */
.bd-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.bd-status-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.bd-status-badge.completed {
    background: #f1f5f9;
    color: #64748b;
}

/* Delete button */
.btn-delete-bd-request {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.btn-delete-bd-request:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Actions container: Ver carta + Delete */
.bd-my-req-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* Ver en market button — solid purple */
.btn-view-product {
    display: inline-block;
    padding: 8px 16px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.btn-view-product:hover {
    background: #5b21b6;
    color: #fff;
    transform: translateY(-1px);
}

/* btn-accept-offer also works as <a> */
a.btn-accept-offer {
    display: block;
    text-align: center;
    text-decoration: none;
}



.bd-offers-received {
    padding: 16px 20px;
    background: #fafafa;
}

.bd-offers-received h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bd-no-offers {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    padding: 10px 0;
    font-style: italic;
}

/* Grid of offer cards */
.bd-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.bd-offer-received-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.bd-offer-vendor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.bd-offer-vendor strong {
    color: #1e293b;
}

.bd-offer-date {
    font-size: 12px;
    color: #94a3b8;
}

.bd-offer-price-tag {
    font-size: 22px;
    font-weight: 800;
    color: #7c3aed;
    line-height: 1;
}

.bd-offer-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bd-offer-details span {
    background: #f1f5f9;
    color: #334155;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.bd-offer-notes {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 3px solid #e2e8f0;
}

/* Offer image thumbnails */
.bd-offer-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.bd-offer-thumb-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s;
}

.bd-offer-thumb-img:hover {
    transform: scale(1.05);
}

.bd-offer-more-imgs {
    font-size: 13px;
    color: #7c3aed;
    font-weight: 600;
    padding: 2px 6px;
    background: #f5f3ff;
    border-radius: 6px;
}

/* Accept button */
.bd-offer-actions {
    margin-top: auto;
    padding-top: 6px;
}

.btn-accept-offer {
    width: 100%;
    padding: 9px 16px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-accept-offer:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ================================================================
   DARK MODE — Tabs and Mis Pedidos
   ================================================================ */

body.dark .bd-tabs,
body.dark-mode .bd-tabs,
body.darkMode .bd-tabs,
[data-theme="dark"] .bd-tabs {
    border-bottom-color: #334155 !important;
}

body.dark .bd-tab,
body.dark-mode .bd-tab,
body.darkMode .bd-tab,
[data-theme="dark"] .bd-tab {
    color: #94a3b8 !important;
}

body.dark .bd-tab:hover,
body.dark-mode .bd-tab:hover,
body.darkMode .bd-tab:hover,
[data-theme="dark"] .bd-tab:hover,
body.dark .bd-tab.active,
body.dark-mode .bd-tab.active,
body.darkMode .bd-tab.active,
[data-theme="dark"] .bd-tab.active {
    color: #a78bfa !important;
    background: #1e1b4b !important;
    border-bottom-color: #7c3aed !important;
}

/* Request cards */
body.dark .bd-my-request-card,
body.dark-mode .bd-my-request-card,
body.darkMode .bd-my-request-card,
[data-theme="dark"] .bd-my-request-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .bd-my-req-header,
body.dark-mode .bd-my-req-header,
body.darkMode .bd-my-req-header,
[data-theme="dark"] .bd-my-req-header {
    border-bottom-color: #334155 !important;
}

body.dark .bd-my-req-info h3,
body.dark-mode .bd-my-req-info h3,
body.darkMode .bd-my-req-info h3,
[data-theme="dark"] .bd-my-req-info h3 {
    color: #f1f5f9 !important;
}

/* Offers received area */
body.dark .bd-offers-received,
body.dark-mode .bd-offers-received,
body.darkMode .bd-offers-received,
[data-theme="dark"] .bd-offers-received {
    background: #0f172a !important;
}

/* Individual offer cards */
body.dark .bd-offer-received-card,
body.dark-mode .bd-offer-received-card,
body.darkMode .bd-offer-received-card,
[data-theme="dark"] .bd-offer-received-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .bd-offer-vendor strong,
body.dark-mode .bd-offer-vendor strong,
body.darkMode .bd-offer-vendor strong,
[data-theme="dark"] .bd-offer-vendor strong {
    color: #f1f5f9 !important;
}

body.dark .bd-offer-details span,
body.dark-mode .bd-offer-details span,
body.darkMode .bd-offer-details span,
[data-theme="dark"] .bd-offer-details span {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

body.dark .bd-offer-notes,
body.dark-mode .bd-offer-notes,
body.darkMode .bd-offer-notes,
[data-theme="dark"] .bd-offer-notes {
    background: #0f172a !important;
    border-left-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark .bd-offer-thumb-img,
body.dark-mode .bd-offer-thumb-img,
body.darkMode .bd-offer-thumb-img,
[data-theme="dark"] .bd-offer-thumb-img {
    border-color: #334155 !important;
}

/* ================================================================
   CART URGENCY POPUP
   ================================================================ */

#bd-cart-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bd-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.bd-cart-popup-box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    padding: 36px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: bdPopupSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bdPopupSlide {
    from {
        transform: translateY(30px) scale(0.96);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.bd-cart-popup-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 12px;
    animation: bdCartBounce 0.6s 0.3s ease both;
}

@keyframes bdCartBounce {
    0% {
        transform: scale(0.5);
    }

    60% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.bd-cart-popup-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
}

.bd-cart-popup-msg {
    margin: 0 0 24px;
    font-size: 15px;
    color: #475569;
    line-height: 1.5;
}

.bd-cart-popup-msg span {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-goto-cart {
    display: block;
    width: 100%;
    padding: 14px;
    background: #7c3aed;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    margin-bottom: 10px;
}

.btn-goto-cart:hover {
    background: #5b21b6;
    transform: translateY(-1px);
}

.btn-keep-shopping {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-keep-shopping:hover {
    color: #475569;
}

/* Dark mode popup */
body.dark .bd-cart-popup-box,
body.dark-mode .bd-cart-popup-box,
body.darkMode .bd-cart-popup-box,
[data-theme="dark"] .bd-cart-popup-box {
    background: #1e293b !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5) !important;
}

body.dark .bd-cart-popup-title,
body.dark-mode .bd-cart-popup-title,
body.darkMode .bd-cart-popup-title,
[data-theme="dark"] .bd-cart-popup-title {
    color: #f1f5f9 !important;
}

body.dark .bd-cart-popup-msg,
body.dark-mode .bd-cart-popup-msg,
body.darkMode .bd-cart-popup-msg,
[data-theme="dark"] .bd-cart-popup-msg {
    color: #94a3b8 !important;
}

/* ================================================================
   VENDOR ENHANCEMENTS
   ================================================================ */

.bd-badge-sent {
    display: inline-block;
    padding: 2px 8px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark mode badge */
body.dark .bd-badge-sent,
body.dark-mode .bd-badge-sent,
body.darkMode .bd-badge-sent,
[data-theme="dark"] .bd-badge-sent {
    background: #064e3b !important;
    color: #34d399 !important;
    border-color: #065f46 !important;
}

/* ================================================================
   VENDOR ENHANCEMENTS: Compact Grid
   ================================================================ */

.bd-my-offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

@media (min-width: 1200px) {
    .bd-my-offers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bd-offer-sent-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.bd-offer-sent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.bd-offer-sent-top {
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bd-offer-sent-date {
    font-size: 10px;
    color: #64748b;
}

.bd-offer-sent-body {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bd-offer-sent-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

/* ... existing styles ... */

.btn-bd-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bd-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

body.dark .btn-bd-secondary,
body.dark-mode .btn-bd-secondary,
body.darkMode .btn-bd-secondary,
[data-theme="dark"] .btn-bd-secondary {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

body.dark .btn-bd-secondary:hover,
body.dark-mode .btn-bd-secondary:hover,
body.darkMode .btn-bd-secondary:hover,
[data-theme="dark"] .btn-bd-secondary:hover {
    background: #334155 !important;
    color: #f1f5f9 !important;
}


.bd-offer-sent-buyer {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
}

.bd-offer-sent-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
    color: #7c3aed;
    margin-bottom: 8px;
}

.bd-offer-sent-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.bd-offer-sent-details span {
    background: #f1f5f9;
    color: #475569;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.bd-version-tag {
    background: #eef2ff !important;
    color: #4338ca !important;
    max-width: 65px !important;
}

.btn-bd-view-notes {
    background: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: 6px;
    height: 24px;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-bd-view-notes:hover {
    background: #ffedd5;
    transform: scale(1.1);
}


.bd-offer-sent-thumb {
    position: relative;
    width: 100%;
    height: 100px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    margin-top: auto;
}

.bd-offer-sent-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.bd-offer-img-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Dark mode overrides for compact cards */
body.dark .bd-offer-sent-card,
body.dark-mode .bd-offer-sent-card,
body.darkMode .bd-offer-sent-card,
[data-theme="dark"] .bd-offer-sent-card {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark .bd-offer-sent-top,
body.dark-mode .bd-offer-sent-top,
body.darkMode .bd-offer-sent-top,
[data-theme="dark"] .bd-offer-sent-top {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark .bd-offer-sent-title,
body.dark-mode .bd-offer-sent-title,
body.darkMode .bd-offer-sent-title,
[data-theme="dark"] .bd-offer-sent-title {
    color: #f1f5f9 !important;
}

body.dark .bd-offer-sent-details span,
body.dark-mode .bd-offer-sent-details span,
body.darkMode .bd-offer-sent-details span,
[data-theme="dark"] .bd-offer-sent-details span {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

/* Dark mode for newly added version and notes elements */
body.dark .bd-version-tag,
body.dark-mode .bd-version-tag,
body.darkMode .bd-version-tag,
[data-theme="dark"] .bd-version-tag {
    background: #312e81 !important;
    color: #c7d2fe !important;
}

/* Vendor Actions & Indicators */
.btn-withdraw-bd-offer {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 5px;
    margin-left: auto;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-withdraw-bd-offer:hover {
    background: #fee2e2;
}

body.dark .btn-withdraw-bd-offer:hover,
body.dark-mode .btn-withdraw-bd-offer:hover {
    background: #450a0a;
}

.bd-offer-sent-req-version {
    font-size: 12px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 5px 0 10px;
    border-left: 3px solid #7c3aed;
}

body.dark .bd-offer-sent-req-version,
body.dark-mode .bd-offer-sent-req-version {
    background: #1e293b;
    color: #cbd5e1;
}

.bd-offer-sent-req-version strong {
    color: #7c3aed;
}

body.dark .bd-offer-sent-req-version strong,
body.dark-mode .bd-offer-sent-req-version strong {
    color: #a78bfa;
}

body.dark .btn-bd-view-notes,
body.dark-mode .btn-bd-view-notes,
body.darkMode .btn-bd-view-notes,
[data-theme="dark"] .btn-bd-view-notes {
    background: #451a03 !important;
    border-color: #78350f !important;
}

/* Dark Mode for Note Viewer Modal */
body.dark #bd-view-notes-content,
body.dark-mode #bd-view-notes-content,
body.darkMode #bd-view-notes-content,
[data-theme='dark'] #bd-view-notes-content {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Version Tag for Card Requests */
.bd-version-tag {
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    max-width: 90px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    cursor: help;
}

/* Dark Mode for Version Tag */
body.dark .bd-version-tag,
body.dark-mode .bd-version-tag,
body.darkMode .bd-version-tag,
[data-theme='dark'] .bd-version-tag {
    background: #312e81 !important;
    color: #c7d2fe !important;
}