/* Product Card Style 888 - Dedicated File */

/* Marquee Animation */
.p-card-888-marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    display: flex;
    align-items: center;
}

.p-card-888-marquee-inner {
    display: flex;
    white-space: nowrap;
    animation: p-card-888-marquee-scroll 35s linear infinite;
}

.p-card-888-marquee-inner span {
    padding-left: 10px;
    /* Space between repeats */
    font-size: 0.85rem;
    font-weight: 400;
}

@keyframes p-card-888-marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* RTL Support */
html[dir="rtl"] .p-card-888-marquee-inner {
    animation: p-card-888-marquee-scroll-rtl 20s linear infinite;
}

html[dir="rtl"] .p-card-888-marquee-inner span {
    padding-left: 0;
    padding-right: 20px;
}

@keyframes p-card-888-marquee-scroll-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* Card Container */
.p-card-888-container {
    padding: 0;
    border-radius: var(--sc-pcard-radius, 7px);
    position: relative;
    background: var(--sc-pcard-bg, #1e1e1e);

    margin-bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: 1px solid transparent;
    outline-offset: -1px;
    transition: transform 0.2s, box-shadow 0.2s, outline-color 0.2s;
}

.p-card-888-container:hover {
    transform: translateY(calc(var(--sc-pcard-hover-translate-y, 4px) * -1));
    box-shadow: var(--sc-pcard-hover-shadow, 0 4px 12px rgba(0, 0, 0, 0.3));
    outline-color: var(--brand, #22c55e);
}

/* Top Banner */
.p-card-888-top-banner {
    background: var(--brand, #22c55e);
    background: linear-gradient(0deg, transparent 0%, var(--brand, #22c55e) 35%, var(--brand, #22c55e) 100%);
    color: #fff;
    text-align: center;
    padding: 8px 0 16px 0;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
    position: absolute;

    min-height: 95px;
}

/* Shine Effect for static text */
.p-card-888-shine-text {
    background: linear-gradient(to right, #fff 20%, #ffd700 40%, #ffd700 60%, #fff 80%);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: p-card-888-shine 3s linear infinite;
    font-weight: 900;

    letter-spacing: 0.5px;
    text-shadow: 0px 0px 8px rgba(255, 215, 0, 0.6);
}

@keyframes p-card-888-shine {
    to {
        background-position: 200% center;
    }
}

/* Image Area */
.p-card-888-image-area {
    width: calc(100% - 8px);
    margin: 33px 4px 0 4px;
    background: var(--sc-pcard-image-bg, #000);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 4px 4px 0 0;
}

.p-card-888-image-area a {
    display: block;
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    width: 100%;
}

.p-card-888-image-area img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Seller Strip (replaces the old overlay) */
.p-card-888-seller-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--sc-pcard-strip-bg, #111);
    /* Dark background like the example image */
    border-bottom: 1px solid rgba(var(--sc-border-rgb, 255,255,255), 0.05);
}

.p-card-888-strip-seller {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.p-card-888-strip-avatar-wrap {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-card-888-strip-avatar {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    /* Rounded square like the example */
    object-fit: cover;
    border: 1px solid rgba(var(--sc-border-rgb, 255,255,255), 0.1);
}

.p-card-888-strip-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    pointer-events: none;
    z-index: 2;
    object-fit: contain;
}

.p-card-888-strip-name {
    font-weight: 700;
    color: var(--text, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.p-card-888-strip-cat {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(var(--sc-border-rgb, 255,255,255), 0.1);
}

.p-card-888-seller-overlay .p-card-888-seller-avatar-wrap {
    position: relative;
    width: 20px;
    height: 20px;
}

.p-card-888-seller-overlay .p-card-888-seller-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.p-card-888-seller-overlay .p-card-888-seller-avatar-wrap .p-card-888-frame-img {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 24px;
    height: 24px;
    z-index: 2;
    pointer-events: none;
}

.p-card-888-seller-overlay .p-card-888-seller-name {
    font-size: 0.7rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-card-888-seller-overlay .p-card-888-category-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.p-card-888-seller-overlay .p-card-888-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1);
}

/* Info Body */
.p-card-888-info-body {
    padding: var(--sc-pcard-padding, 8px 10px 10px);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--sc-pcard-body-bg, #1e1e1e);
}

.p-card-888-info-body .p-card-888-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.p-card-888-info-body .p-card-888-name a {
    color: var(--sc-pcard-title-color, #eee);
    text-decoration: none;
    transition: color 0.2s;
}

.p-card-888-info-body .p-card-888-name a:hover {
    color: var(--brand, #22c55e);
}

.p-card-888-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.p-card-888-footer .p-card-888-price {
    display: flex;
    flex-direction: column;
}

.p-card-888-footer .p-card-888-current-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand, #22c55e);
}

.p-card-888-footer .p-card-888-action-btn {
    background: var(--sc-pcard-action-bg, rgba(255, 255, 255, 0.1));
    color: var(--sc-pcard-action-color, #fff);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.p-card-888-footer .p-card-888-action-btn:hover {
    background: var(--sc-pcard-action-hover-bg, var(--brand, #22c55e));
    color: var(--sc-pcard-action-hover-color, #000);
}

/* Badge (Overlay) */
.p-card-888-badge {
    position: absolute;
    top: 40px;
    /* Below banner */
    right: 8px;
    /* RTL aware? */
    z-index: 3;
    background: var(--sc-pcard-badge-bg, rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(var(--sc-border-rgb, 255,255,255), 0.1);
}

html[dir="rtl"] .p-card-888-badge {
    right: auto;
    left: 8px;
}

/* New Badge in Footer */
.p-card-888-new-badge-wrap {
    display: flex;
    align-items: center;
}

.p-card-888-new-badge {
    background: rgba(30, 41, 59, 0.85);
    color: #60a5fa;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    backdrop-filter: blur(2px);
}
