/**
 * Panel lateral de ofertas (deck-view y vistas compartidas).
 * Subconjunto de producto-detalle-page.css — evita cargar la ficha completa.
 */
:root {
    --cv-purple: #7c3aed;
    --cv-border: #e8ecf1;
    --cv-text: #0f172a;
    --cv-muted: #64748b;
}

.cv-offers-head__copy { flex: 1; min-width: 0; }

.cv-offers-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cv-text);
    margin: 0 0 0.15rem;
    line-height: 1.25;
}

.cv-offers-sub {
    margin: 0;
    font-size: 0.8rem;
    color: var(--cv-muted);
    line-height: 1.35;
}

.cv-offers-drawer,
.cv-all-offers-panel,
.offcanvas.cv-offers-drawer {
    width: min(620px, 42vw) !important;
    max-width: 100vw;
    overflow-x: hidden;
    height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #0f172a;
}

@media (max-width: 1199.98px) {
    .cv-offers-drawer,
    .cv-all-offers-panel,
    .offcanvas.cv-offers-drawer { width: min(560px, 50vw) !important; }
}

@media (max-width: 991.98px) {
    .cv-offers-drawer,
    .cv-all-offers-panel,
    .offcanvas.cv-offers-drawer { width: min(520px, 90vw) !important; }
}

@media (max-width: 576px) {
    .cv-offers-drawer,
    .cv-all-offers-panel,
    .offcanvas.cv-offers-drawer,
    .cv-all-offers-panel.offcanvas-bottom,
    .cv-all-offers-panel.offcanvas-end {
        width: 100vw !important;
        max-width: 100vw;
    }
}

.cv-offers-drawer-body,
.cv-all-offers-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.cv-all-offers-header,
.cv-offers-drawer .offcanvas-header {
    flex-shrink: 0;
    border-bottom: 1px solid var(--cv-border);
    padding: 18px 18px 16px;
    background: #fff;
}

.cv-offers-filters {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    padding-bottom: 12px;
    margin: 0 -2px 4px;
    flex-shrink: 0;
}

.cv-offers-tools--modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 10px;
}

.cv-offers-tools--modal .cv-offers-search-wrap {
    grid-column: 1 / -1;
    height: 46px;
    padding: 0 0.85rem;
    border-radius: 14px;
}

.cv-offers-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--cv-border);
    border-radius: 10px;
    background: #f8fafc;
}

.cv-offers-search-wrap i { color: var(--cv-muted); flex-shrink: 0; }

.cv-offers-search {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    min-height: 34px;
    width: 100%;
}

.cv-offers-list--modal .cv-offer-item {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) 150px;
    gap: 14px;
    align-items: center;
    min-height: 118px;
    padding: 14px 16px;
    border: 1px solid #e8eaf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
    margin-bottom: 12px;
}

.cv-offers-list--modal .cv-offer-item:last-child { margin-bottom: 0; }

.cv-offers-list--modal .cv-offer-thumb {
    width: 72px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.cv-offers-list--modal .cv-offer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cv-offers-list--modal .cv-offer-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
}

.cv-offers-list--modal .cv-offer-set {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.cv-offers-list--modal .cv-badge-rarity {
    font-size: 11px;
    font-weight: 700;
    color: #6d28d9;
    background: #f3e8ff;
    border-radius: 999px;
    padding: 3px 7px;
}

.cv-offers-list--modal .cv-code {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.cv-offers-list--modal .cv-stock-badge {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background: #eef2f7;
    border-radius: 999px;
    padding: 4px 8px;
}

.cv-offers-list--modal .cv-stock-badge--in {
    color: #15803d;
    background: #dcfce7;
}

.cv-offers-list--modal .cv-offer-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
}

.cv-offers-list--modal .cv-offer-price {
    font-size: 22px;
    font-weight: 900;
    color: #16a34a;
    line-height: 1;
}

.cv-offers-list--modal .cv-offer-btn,
.cv-offers-list--modal .btn-market-prices {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.cv-offers-list--modal .cv-offer-btn:hover,
.cv-offers-list--modal .btn-market-prices:hover {
    color: #fff;
    filter: brightness(1.05);
}

/* Botón wishlist / colección en panel de ofertas */
.cv-offers-list--modal .cv-offer-side-actions,
.cv-offers-list--modal .cv-offer-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
}

.cv-offer-collection-btn,
.cv-offers-list--modal .btn-add-collection {
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    border: 1.5px solid #7c3aed;
    background: #fff;
    color: #7c3aed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cv-offer-collection-btn:hover,
.cv-offers-list--modal .btn-add-collection:hover {
    background: #f5f3ff;
    border-color: #6d28d9;
    color: #6d28d9;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.18);
}

.cv-offer-collection-btn.is-in-collection,
.cv-offers-list--modal .btn-add-collection.is-in-collection {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff5f5;
}

.cv-offer-collection-btn.is-in-collection:hover,
.cv-offers-list--modal .btn-add-collection.is-in-collection:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #ffe4e6;
}

.product-offers-filter-panel {
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.cv-offers-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 220px;
    padding: 2rem 1.25rem;
    text-align: center;
}

.cv-offers-loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #ede9fe;
    border-top-color: var(--cv-purple, #7c3aed);
    border-radius: 50%;
    animation: cvOffersSpin 0.8s linear infinite;
}

@keyframes cvOffersSpin {
    to { transform: rotate(360deg); }
}

.cv-offers-loader-title {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cv-text);
}

.cv-offers-loader-sub {
    margin: 0;
    font-size: 0.8rem;
    color: var(--cv-muted);
}
