/**
 * Product Card — Wishlist Theme
 * Flat, clean, fast-perceived loading.
 * Supports grid view (default) & list view.
 */

/* ── Utility ── */
.shadow-soft {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}

/* ══════════════════════════════════════════════════
   GRID LAYOUT (search page override)
══════════════════════════════════════════════════ */
.product-box-wrapper.product-card-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.product-box-wrapper.product-card-grid .block-item {
    display: flex;
    padding: 6px;
}

.product-box-wrapper.product-card-grid .product-card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════════
   BASE CARD  — Wishlist aesthetic
══════════════════════════════════════════════════ */
.product-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f4;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    /* allow hover panel + cart btn to show outside */
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12), 0 4px 12px rgba(15, 23, 42, .06);
}

/* Image Panel — keep overflow:hidden so img doesn't bleed outside rounded corners */
.product-card .pc-img-wrap,
.product-card .product-image,
.product-card .p-img.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    margin: 0 !important;
    background: #f4f5f7;
    flex-shrink: 0;
}

.product-card .pc-img-wrap img,
.product-card .product-image img,
.product-card .p-img.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    max-height: none !important;
    transition: transform 0.35s ease;
}

.product-card:hover .pc-img-wrap img,
.product-card:hover .product-image img,
.product-card:hover .p-img.product-image img {
    transform: scale(1.04);
}

/* ── Wishlist heart (top-right corner) ── */
.product-card .product-wishlist {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .10);
    transition: background 0.18s ease, transform 0.18s ease;
    text-decoration: none;
}

.product-card .product-wishlist svg {
    width: 16px;
    height: 16px;
    stroke: #8b95a6;
    transition: stroke 0.18s ease, fill 0.18s ease;
}

.product-card .product-wishlist.p-fav svg {
    stroke: #e14e78;
    fill: #e14e78;
}

.product-card .product-wishlist:hover {
    background: #fff;
    transform: scale(1.12);
}

.product-card .product-wishlist:hover svg {
    stroke: #e14e78;
}

/* ── Side action panel (Quick Preview only) ── */
.product-card .pc-hover-actions {
    position: absolute;
    top: 56px;
    right: 16px;
    left: auto;
    bottom: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(4px);
}

.product-card:hover .pc-hover-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Hide the chat button — keep only Quick Preview (eye icon) */
.product-card .pc-hover-actions .pc-ha-btn:last-child {
    display: none !important;
}


.pc-ha-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: #334155;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.pc-ha-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.pc-ha-btn:hover {
    background: var(--theme-color, #362a89);
    color: #fff;
    transform: scale(1.1);
}

/* Hide hover actions in compact cards */
.product-box-8 .pc-hover-actions,
.product-verticle .pc-hover-actions,
.card-sm .pc-hover-actions {
    display: none !important;
}

/* Hide on mobile (touch devices don't hover) */
@media (max-width: 768px) {
    .product-card .pc-hover-actions {
        display: none !important;
    }
}

.product-card .pc-sale-tag {
    position: absolute;
    top: 9px;
    left: 9px;
    background: #e14e78;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    z-index: 2;
    text-transform: uppercase;
    line-height: 1.5;
}

/* ── Out of Stock overlay ── */
.product-card .pc-out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px 14px 0 0;
    z-index: 3;
}

.product-card .pc-out-of-stock-overlay span {
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Footer dim when out of stock */
.product-card .p-conditional_div.pc-oos-footer {
    opacity: 0.4;
    pointer-events: none;
}

/* ── Body info strip ── */
.product-card .product-body,
.product-card .p-data.product-body {
    padding: 10px 12px 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
}

/* Hide unit (pcs) — visual noise across all card sizes */
.product-card .p-unit {
    display: none !important;
}

/* Badges row (under image) */
.product-card .p-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 5px;
}

.product-card .pc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: capitalize;
    white-space: nowrap;
}

.product-card .badge-physical {
    background: #ecfdf5;
    color: #065f46;
}

.product-card .badge-sell {
    background: #eff6ff;
    color: #1d4ed8;
}

.product-card .badge-digital {
    background: #f5f3ff;
    color: #6d28d9;
}

.product-card .badge-service {
    background: #fff7ed;
    color: #b45309;
}

.product-card .badge-courses {
    background: #fdf2f8;
    color: #9d174d;
}

.product-card .badge-auction {
    background: #fefce8;
    color: #854d0e;
}

.product-card .badge-classified {
    background: #f0fdf4;
    color: #166534;
}

.product-card .badge-penny {
    background: #fef2f2;
    color: #991b1b;
}

.product-card .tag-sale {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.product-card .tag-boost {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ede9fe;
}

/* Title */
.product-card .product-title,
.product-card .p-title.product-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    margin: 2px 0 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-decoration: none;
}

/* Unit */
.product-card .p-unit {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

/* Price row */
.product-card .product-price,
.product-card .p-price.product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 0;
}

.product-card .pc-price-main {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.product-card .p-old-p {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    text-decoration: line-through;
}

.product-card .pc-free-ship {
    font-size: 10px;
    color: #16a34a;
    font-weight: 700;
    background: #dcfce7;
    padding: 2px 7px;
    border-radius: 4px;
    align-self: center;
}

/* Stars */
.product-card .p-review {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #888;
}

.product-card .pc-stars {
    display: inline-flex;
    gap: 1px;
}

.product-card .pc-stars i {
    font-size: 11px;
}




/* ── Footer: add to cart ── */
.product-card .p-conditional_div {
    padding: 6px 12px 10px;
    margin-top: auto;
}

.product-card .product-footer,
.product-card .product-card-footer.product-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Qty control — hidden on product cards */
.product-card .qty-control {
    display: none !important;
}

.product-card .qty-btn {
    width: 28px;
    height: 30px;
    min-width: 28px;
    background: #f8fafc;
    border: none;
    font-size: 16px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.product-card .qty-btn:hover {
    background: #f1f5f9;
}

.product-card .qty-input {
    width: 36px;
    min-width: 36px;
    height: 30px;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: #0f172a;
}

/* Cart button */
.product-card .btn-add-cart {
    flex: 1;
    height: 30px;
    min-height: 30px;
    border: none;
    border-radius: 8px;
    background: #e14e78;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.product-card .btn-add-cart:hover {
    background: #d43d67;
    transform: translateY(-1px);
}

/* Buy Now button */
.product-card .footer-btn.p-buy-now {
    height: 30px;
    min-height: 30px;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.product-card .footer-btn.p-buy-now:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

/* ── Skeleton loader placeholder ── */
.product-card.is-skeleton {
    pointer-events: none;
    animation: pc-skeleton-pulse 1.4s ease-in-out infinite;
}

.product-card.is-skeleton .pc-img-wrap {
    background: #e8ecf0;
}

.product-card.is-skeleton .product-body::after {
    content: '';
    display: block;
    width: 80%;
    height: 10px;
    border-radius: 6px;
    background: #e8ecf0;
    margin: 8px 0;
}

@keyframes pc-skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

/* ══════════════════════════════════════════════════
   CARD SIZES
══════════════════════════════════════════════════ */
.product-card.card-sm {
    border-radius: 12px;
}

.product-card.card-sm .pc-img-wrap,
.product-card.card-sm .product-image,
.product-card.card-sm .p-img.product-image {
    border-radius: 12px 12px 0 0;
}

.product-card.card-sm .product-title,
.product-card.card-sm .p-title.product-title {
    font-size: 12.5px;
}

.product-card.card-sm .pc-price-main {
    font-size: 14px;
}

.product-card.card-md {
    max-width: 280px;
}

.product-card.card-lg {
    border-radius: 16px;
    max-width: 360px;
}

.product-card.card-lg .pc-img-wrap,
.product-card.card-lg .product-image,
.product-card.card-lg .p-img.product-image {
    border-radius: 16px 16px 0 0;
}

.product-card.card-lg .product-title,
.product-card.card-lg .p-title.product-title {
    font-size: 15px;
}

.product-card.card-lg .pc-price-main {
    font-size: 17px;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    .product-card .product-title,
    .product-card .p-title.product-title {
        font-size: 13px;
    }

    .product-card .pc-price-main {
        font-size: 14px;
    }

    /* Tablet: 3-column grid so Add to Cart fits nicely */
    .product-box-wrapper .col-lg-3,
    .product-box-wrapper .col-md-4,
    .product-box-wrapper .block-item,
    .search-data .col-lg-3,
    .search-data .block-item,
    .product-box-8 .col-lg-3 {
        width: 33.333% !important;
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
    }
}

@media (max-width: 768px) {
    .product-box-wrapper.product-card-grid .block-item {
        padding: 4px;
    }

    .product-card.card-sm,
    .product-card.card-md,
    .product-card.card-lg {
        max-width: none;
    }

    .product-card .p-action-btn {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .product-card .product-footer,
    .product-card .product-card-footer.product-footer {
        flex-wrap: wrap;
        gap: 5px;
    }

    /* Slightly smaller title on mobile */
    .product-card .product-title,
    .product-card .p-title.product-title {
        font-size: 13px;
    }
}

@media (max-width: 576px) {

    .product-card .product-body,
    .product-card .p-data.product-body {
        padding: 8px 10px 0;
    }

    .product-card .p-conditional_div {
        padding: 6px 10px 10px;
    }
}