/* ════════════════════════════════════════════════════════════
   PRODUCT CARD  (.pc-*)
   Shared component — include this CSS on every page that
   loads the products-ajax.php partial:
     • Dashboard
     • Product list page (partner-products)
     • Product details / related products
   ════════════════════════════════════════════════════════════ */

/* ── Grid column wrapper ─────────────────────────────────── */
.pc-col {
    padding: 5px;
}

/* ── Card shell ──────────────────────────────────────────── */
.pc-card {
    background: #ffffff;
    border: 1px solid #e6e6f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1),
        box-shadow .22s cubic-bezier(.4, 0, .2, 1),
        border-color .22s;
}

.pc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(79, 53, 232, .13);
    border-color: rgba(79, 53, 232, .22);
}

/* ── Image area ──────────────────────────────────────────── */
.pc-img-wrap {
    position: relative;
    height: 175px;
    background: #f7f7fc;
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.pc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: transform .4s ease;
}

.pc-card:hover .pc-img-wrap img {
    transform: scale(1.07);
}

/* Quick-view overlay */
.pc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 42, .46);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'DM Sans', system-ui, sans-serif;
    opacity: 0;
    transition: opacity .2s ease;
}

.pc-img-wrap:hover .pc-overlay {
    opacity: 1;
}

/* Imported / Live badge */
.pc-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: 'DM Sans', system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}

.pc-badge-imported {
    background: #eceaff;
    color: #4f35e8;
}

.pc-badge-live {
    background: #d1fae5;
    color: #059669;
}

.pc-badge-live i {
    animation: pc-pulse 1.6s ease infinite;
}

@keyframes pc-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .25;
    }
}

/* Profit pill */
.pc-profit-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    font-family: 'DM Sans', system-ui, sans-serif;
    padding: 3px 9px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, .28);
    white-space: nowrap;
}

/* ── Card body ───────────────────────────────────────────── */
.pc-body {
    padding: 10px 11px 11px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Title */
.pc-title {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: #676767;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
    min-height: 35px;
}

.pc-title:hover {
    color: #4f35e8;
}

/* Pricing pill */
.pc-pricing {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f2f3f7;
    border-radius: 8px;
    padding: 5px 7px;
}

.pc-pricing-col {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.pc-lbl {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #7b7b96;
    margin-bottom: 1px;
}

.pc-val {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #16162a;
}

.pc-sell {
    color: #4f35e8;
}

.pc-green {
    color: #059669;
    font-size: 13px;
}

.pc-arrow {
    color: #c4c4d8;
    font-size: 8px;
    flex-shrink: 0;
}

/* Stars */
.pc-stars {
    font-size: 10.5px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 1px;
}

/* Action buttons */
.pc-actions {
    display: flex;
    gap: 5px;
    margin-top: auto;
}

.pc-btn-import,
.pc-btn-sample {
    flex: 1;
    height: 30px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'DM Sans', system-ui, sans-serif;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all .16s ease;
    white-space: nowrap;
}

.pc-btn-import {
    background: #ffffff;
    color: #4f35e8;
    border: 1.5px solid rgba(79, 53, 232, .2);
}

.pc-btn-import:hover {
    background: #4f35e8;
    color: #fff;
    border-color: #4f35e8;
}

.pc-btn-sample {
    background: #ffffff;
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, .2);
}

.pc-btn-sample:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* Source accent stripe at card bottom */
.pc-stripe {
    height: 3px;
    flex-shrink: 0;
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 768px) {
    .pc-img-wrap {
        height: 150px;
    }

    .pc-val {
        font-size: 10.5px;
    }

    .pc-lbl {
        font-size: 8.5px;
    }
}

@media (max-width: 480px) {
    .pc-img-wrap {
        height: 140px;
    }

    .pc-body {
        padding: 8px 9px 9px;
        gap: 5px;
    }

    .pc-pricing {
        padding: 4px 6px;
    }

    .pc-btn-import,
    .pc-btn-sample {
        font-size: 10px;
        height: 28px;
    }
}


/* ════════════════════════════════════════════════════════════
   MONTHLY EARNINGS WIDGET  (.pc-monthly)
   Append these rules to product-cards.css
   ════════════════════════════════════════════════════════════ */

.pc-monthly {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid rgba(16, 185, 129, .2);
    border-radius: 8px;
    padding: 7px 10px;
}

.pc-monthly-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.pc-monthly-range {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
    line-height: 1;
}

.pc-monthly-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
    background: #059669;
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1.4;
    flex-shrink: 0;
}

.pc-monthly-label {
    font-size: 10px;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.pc-monthly-sub {
    font-size: 10px;
    color: #6b7280;
    line-height: 1;
}

/* Tighten profit pill text on cards to avoid duplication confusion */
.pc-profit-pill {
    font-size: 10px !important;
    /* slightly smaller since /sale is clearer now */
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .pc-monthly {
        padding: 5px 8px;
    }

    .pc-monthly-range {
        font-size: 12px;
    }
}


/* ── Ship-to badge — top right of image ───────────────────────────────── */
.pc-ship-to-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.92);
    border: 0.5px solid rgba(0, 0, 0, 0.10);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 700;
    color: #374151;
    letter-spacing: .3px;
    pointer-events: none;
    /* don't block the quick-view click */
    z-index: 2;
}

.pc-ship-to-badge img {
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
    width: 14px;
    padding: 0px;
}

/* ── Delivery row — below title ───────────────────────────────────────── */
.pc-delivery-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.pc-delivery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pc-delivery-text {
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Import button flag ───────────────────────────────────────────────── */
.pc-btn-flag {
    width: 14px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Make the import button flex so flag + text sit side by side */
.pc-btn-import {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}