﻿.p-card {
    background: var(--fallback-b1,oklch(var(--b1)));
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    transition: transform .15s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .p-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0,0,0,.06);
        border-color: rgba(0,0,0,.12);
    }

.p-thumb {
    display: flex;
    position: relative;
    background: var(--fallback-b2,oklch(var(--b2)));
    align-items: center;
    justify-content: center;
    height: auto;
    aspect-ratio: 2 / 1;
    overflow: hidden;
}


    .p-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center;
        display: block;
    }

    .p-thumb .noimg {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        color: #666;
        font-size: .9rem;
    }

.p-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.p-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    transition: width .18s ease, background .18s ease, transform .18s ease;
}

    .p-dot.is-active {
        width: 14px;
        background: #fff;
        transform: translateY(-1px);
    }

.p-card .p-badges {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 5;
}

.p-card .p-badges--tl {
    top: 8px;
    left: 8px;
}

.p-card .p-badges--tr {
    top: 8px;
    right: 8px;
    justify-content: flex-end;
}

.p-card .p-badges--bl {
    bottom: 8px;
    left: 8px;
}

.p-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .8125rem;
    line-height: 1;
    font-weight: 400;
    border: 1px solid transparent;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    backdrop-filter: saturate(1.1) blur(2px);
    -webkit-backdrop-filter: saturate(1.1) blur(2px);
    user-select: none;
}

    .p-card .badge .ic {
        display: grid;
        place-items: center;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        font-size: .8em;
        line-height: 1;
    }

.p-card .badge--campaign {
    background: linear-gradient(90deg,#f5f3ff,#eef2ff);
    color: #4c1d95;
    border-color: rgba(76,29,149,.25);
}

    .p-card .badge--campaign .ic {
        background: rgba(76,29,149,.10);
    }

.p-card .badge--discount {
    background: linear-gradient(90deg,#eff6ff,#e0f2fe);
    color: #1e40af;
    border-color: rgba(30,58,138,.25);
}

    .p-card .badge--discount .ic {
        background: rgba(30,58,138,.10);
    }


.p-card .badge--new {
    background: linear-gradient(90deg,#ecfdf5,#dcfce7);
    color: #065f46;
    border-color: rgba(6,95,70,.22);
}

    .p-card .badge--new .ic {
        background: rgba(6,95,70,.10);
    }

.p-card .badge--alt {
    background: linear-gradient(90deg,#fafafa,#f1f5f9);
    color: #0f172a;
    border-color: rgba(15,23,42,.18);
}

    .p-card .badge--alt .ic {
        background: rgba(2,6,23,.06);
    }


.p-card .badge--oos {
    background: linear-gradient(90deg,#f8fafc,#f1f5f9);
    color: #991b1b;
    border-color: rgba(153,27,27,.18);
}

    .p-card .badge--oos .ic {
        background: rgba(153,27,27,.10);
    }

@media (max-width: 767px) {
    .p-card .badge {
        font-size: .75rem;
        padding: 3px 8px;
        gap: 4px;
        max-width: 100%;
    }

    .p-card .p-badges--tl {
        top: 6px;
        left: 6px;
    }

    .p-card .p-badges--tr {
        right: auto;
        left: 6px;
        justify-content: flex-start;
        top: 30px;
    }

    .p-card:not(:has(.badge--campaign)) .p-badges--tr {
        top: 6px;
    }

    .p-card .p-badges--bl {
        bottom: 6px;
        left: 6px;
    }
}

@media (max-width: 767px) {
    .rs-products.rs-view-list .p-card .p-badges--tl {
        top: 4px;
        left: 4px;
    }

    .rs-products.rs-view-list .p-card .p-badges--tr {
        left: 4px;
        right: auto;
        top: 26px;
        justify-content: flex-start;
    }

    .rs-products.rs-view-list .p-card:not(:has(.badge--campaign)) .p-badges--tr {
        top: 4px;
    }

    .rs-products.rs-view-list .p-card .badge {
        font-size: .72rem;
        padding: 2px 7px;
        gap: 3px;
    }
}

@media (max-width:480px) {
    .p-card .p-badges--tr,
    .p-card .p-badges--tl {
        gap: 4px;
    }
}


.p-body {
    padding: .75rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1 1 auto;
}

.p-brand {
    display: inline-block;
    font-size: .75rem;
    opacity: .7;
    margin-bottom: .15rem;
}

.p-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: .35rem;
    min-height: 2.6em;
    text-decoration: none !important;
    transition: color .25s ease, transform .25s ease;
}

    .p-name:hover {
        text-decoration: none !important;
        color: #1e40af;
        transform: translateX(4px);
    }

.p-rating {
    display: flex;
    align-items: center;
    gap: .15rem;
    font-size: .85rem;
    opacity: .9;
    margin-bottom: .35rem;
    min-height: 1.1rem;
}

    .p-rating .cnt {
        font-size: .75rem;
        opacity: .7;
        margin-left: .25rem;
    }

.p-price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .5rem;
    min-height: 1.2rem;
}

    .p-price .now {
        font-weight: 700;
    }

    .p-price .old {
        text-decoration: line-through;
        opacity: .6;
    }

.p-actions {
    display: flex;
    gap: .35rem;
    margin-top: auto;
}

    .p-actions .btn {
        flex: 1 1 auto;
    }


.p-card {
    border-radius: .85rem;
}

.p-thumb {
    height: auto !important;
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}


    .p-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center;
    }

.p-body {
    padding: .6rem .7rem .75rem !important;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1 1 auto;
}

.p-name {
    font-size: .92rem;
    min-height: 2.6em;
}

.p-price .now {
    font-weight: 700;
}

.p-thumbs {
    display: flex;
    gap: .45rem;
    padding: .45rem .7rem 0;
    min-height: 48px;
}

    .p-thumbs .thumb {
        border: 1px solid var(--ring);
        border-radius: 8px;
        padding: 0;
        background: #fff;
    }

        .p-thumbs .thumb img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            border-radius: 8px;
            display: block;
        }

        .p-thumbs .thumb.is-active {
            outline: 2px solid var(--brand);
        }

    .p-thumbs.p-thumbs--spacer {
        visibility: hidden;
        min-height: 48px;
        padding: .45rem .7rem 0;
    }

.p-card .p-actions {
    gap: .5rem;
    flex-direction: column;
    align-items: stretch;
}

    .p-card .p-actions .btn {
        width: 100%;
        flex: none;
    }

.p-card .p-actions {
    --cta1-a: #0a2a7a;
    --cta1-b: #1e40af;
    --cta1-c: #06b6d4;
    --cta2-a: #0b1e6b;
    --cta2-b: #7c3aed;
    --cta2-c: #06b6d4;
}

    .p-card .p-actions .js-add-to-cart {
        position: relative;
        overflow: hidden;
        border: 0 !important;
        color: #fff !important;
        font-weight: 550;
        letter-spacing: .01em;
        border-radius: 12px;
        padding: .62rem 1rem;
        min-height: 40px;
        background-image: linear-gradient(90deg, var(--cta1-a) 0%, var(--cta1-b) 50%, var(--cta1-c) 100%) !important;
        background-size: 200% 100%;
        background-position: 0% 50%;
        box-shadow: 0 10px 24px rgba(3,30,79,.18);
        transition: transform .18s ease, box-shadow .18s ease, background-position .35s ease, filter .18s ease;
    }

        .p-card .p-actions .js-add-to-cart:hover:not([disabled]) {
            background-position: 100% 50%;
            animation: btn-float 1.1s ease-in-out infinite;
            box-shadow: 0 14px 30px rgba(3,30,79,.22);
        }

        .p-card .p-actions .js-add-to-cart:active:not([disabled]) {
            transform: translateY(0);
            animation: none;
        }

        .p-card .p-actions .js-add-to-cart:focus-visible {
            outline: 3px solid #93c5fd;
            outline-offset: 2px;
        }

        .p-card .p-actions .js-add-to-cart::after {
            content: "";
            position: absolute;
            inset: 0;
            width: 60%;
            left: -120%;
            background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.38) 50%, transparent 100%);
            transform: skewX(-20deg);
            opacity: 0;
        }

        .p-card .p-actions .js-add-to-cart:hover::after {
            animation: btn-shine .9s ease-out forwards;
            opacity: 1;
        }

        .p-card .p-actions .js-add-to-cart[disabled] {
            filter: grayscale(.3) brightness(.85);
            box-shadow: none;
            cursor: not-allowed;
        }

    .p-card .p-actions .btn.btn-ghost {
        position: relative;
        color: var(--cta2-a) !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 12px;
        padding: .5rem .9rem;
        min-height: 36px;
        font-weight: 600;
        transition: transform .16s ease, color .16s ease, box-shadow .18s ease, background .18s ease;
    }

        .p-card .p-actions .btn.btn-ghost::before {
            content: "";
            position: absolute;
            inset: 0;
            padding: 1px;
            border-radius: 12px;
            background: linear-gradient(90deg, var(--cta2-b), var(--cta2-c));
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .p-card .p-actions .btn.btn-ghost:hover {
            color: #0f172a !important;
            background-image: linear-gradient( 90deg, color-mix(in oklch, var(--cta2-b) 8%, white), color-mix(in oklch, var(--cta2-c) 10%, white) ) !important;
            transform: translateY(-2px);
            box-shadow: 0 10px 24px rgba(2,6,23,.08);
        }

            .p-card .p-actions .btn.btn-ghost:hover::after {
                content: "";
                position: absolute;
                inset: 0;
                width: 55%;
                left: -120%;
                background: linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
                transform: skewX(-18deg);
                animation: btn-shine .95s ease-out forwards;
                pointer-events: none;
            }


        .p-card .p-actions .btn.btn-ghost:active {
            transform: translateY(-1px);
        }


@media (prefers-reduced-motion: reduce) {
    .p-card .p-actions .js-add-to-cart,
    .p-card .p-actions .js-add-to-cart:hover,
    .p-card .p-actions .btn.btn-ghost,
    .p-card .p-actions .btn.btn-ghost:hover {
        animation: none !important;
        transition: none !important;
        background-position: 0% 50% !important;
    }
}


@keyframes btn-float {
    0%, 100% {
        transform: translateY(-1px);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes btn-shine {
    0% {
        left: -120%;
    }

    100% {
        left: 120%;
    }
}


@media (min-width: 768px) {

    .rs-products.rs-view-list .p-card {
        --rs-list-thumb-width: 220px;
        --rs-list-card-height: 230px;
        display: grid;
        grid-template-columns: var(--rs-list-thumb-width) minmax(0, 1fr);
        gap: 1.25rem;
        padding: 1rem 1.25rem;
        width: 100%;
        max-width: 1080px;
        box-sizing: border-box;
        height: var(--rs-list-card-height) !important;
    }

    .rs-products.rs-view-list .p-thumb {
        height: 100% !important;
        width: 100%;
        margin: 0;
        padding: 0 !important;
        border-radius: 0.75rem;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
    }

        .rs-products.rs-view-list .p-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover !important;
            object-position: center;
            display: block;
        }

    .rs-products.rs-view-list .p-thumbs,
    .rs-products.rs-view-list .p-thumbs.p-thumbs--spacer {
        display: none !important;
    }

    .rs-products.rs-view-list .p-body,
    .rs-products.rs-view-list .p-body--compact {
        padding: 0.25rem 0 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 0.35rem;
    }

    .rs-products.rs-view-list .p-actions {
        margin-top: 0.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

        .rs-products.rs-view-list .p-actions .btn {
            flex: 0 0 auto;
            width: auto;
            min-width: 140px;
        }
}


@media (max-width: 767px) {

    .rs-products.rs-view-list .p-card {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        column-gap: 0.55rem;
        padding: 0.45rem 0.7rem;
        align-items: center;
    }

    .rs-products.rs-view-list .p-thumb {
        height: 110px !important;
    }

        .rs-products.rs-view-list .p-thumb img {
            width: 100%;
            height: 100%;
            max-height: none;
            object-fit: cover;
            object-position: center;
            display: block;
        }


    .rs-products.rs-view-list .p-body {
        padding-left: 0.45rem;
        font-size: 0.8rem;
        line-height: 1.25;
    }

        .rs-products.rs-view-list .p-body > * + * {
            margin-top: 0.12rem;
        }

    .rs-products.rs-view-list .p-actions {
        margin-top: 0.18rem;
        gap: 0.18rem;
        flex-wrap: nowrap;
        flex-direction: column;
        align-items: stretch;
    }

        .rs-products.rs-view-list .p-actions a,
        .rs-products.rs-view-list .p-actions button {
            flex: 1 1 auto;
            padding: 0.18rem 0.55rem;
            font-size: 0.7rem;
            text-align: center;
            justify-content: center;
            white-space: normal;
            line-height: 1.1;
        }

    .rs-products.rs-view-list .p-card:not(:has(.p-thumbs > *)) .p-thumb {
        grid-column: 1 / span 1;
        grid-row: 1;
    }
}


.rs-products.rs-view-list .p-brand {
    font-size: 0.8rem;
    margin-bottom: 0;
}

.rs-products.rs-view-list .p-name {
    font-size: 0.9rem;
    line-height: 1.3;
    min-height: auto;
    margin-bottom: 0.2rem;
    text-decoration: none !important;
}

.rs-products.rs-view-list .p-rating {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.rs-products.rs-view-list .p-price {
    margin-bottom: 0.3rem;
}

@media (max-width: 767px) {
    .rs-products.rs-view-list .p-brand,
    .rs-products.rs-view-list .p-rating {
        display: none !important;
    }
}
@media (max-width: 767px) {
    .rs-products:not(.rs-view-list) .p-card .p-actions .js-add-to-cart,
    .rs-products:not(.rs-view-list) .p-card .p-actions .btn.btn-ghost {
        font-size: .82rem;
        line-height: 1.15;
    }
}
