.product-card {
    position: relative;
    z-index: 1;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}

.product-card:hover {
    border-color: #dee2e6;
    box-shadow: 0 8px 20px rgba(0,0,0,.10);
}

.product-item-grid {
    height: 485px;
}

.product-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 100%;
}

.product-link * {
    text-decoration: none !important;
    color: inherit;
}

.brand-logo {
    display: block;
    margin: 0 auto;
    height: 25px;
    object-fit: contain;
}

.brand-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
}

.product-img {
    height: 180px;
    object-fit: contain;
    transition:
        transform 0.3s ease,
        opacity 0.35s ease-in-out;
}

.product-image-wrapper {
    position: relative;
    z-index: 5;
    height: 180px;
}

.product-img {
    max-height: 160px;
    width: 100%;
    object-fit: contain;
    transition: transform .3s ease, opacity .35s ease-in-out;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.placeholder-box {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-box i {
    font-size: 48px;
    color: #adb5bd;
}

.product-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}

.product-dots .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-dots .dot.active {
    background: #0d6efd;
    width: 18px;
    border-radius: 10px;
    border-color: transparent;
}

.stock-badge {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.oem-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 8px !important;
}

.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 20px;
    max-height: 40px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #1e3a5f;
    margin-bottom: 6px;
}

.product-price small {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
}

.discount-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 42px;
    height: 36px;
    padding: 0 10px;
    background: #e53935;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 30;
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover .discount-pill {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.product-card.is-discounted {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.product-card.is-discounted::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    pointer-events: none;
    z-index: 0;

    background: linear-gradient(
        to top,
        #fef3c7 0%,
        rgba(254, 243, 199, 0.85) 35%,
        rgba(254, 243, 199, 0.45) 60%,
        rgba(254, 243, 199, 0.15) 75%,
        transparent 100%
    );
}

.product-card.is-discounted > * {
    z-index: 20;
}

.featured-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 36px;
    height: 36px;
    background: #ffc107;
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover .featured-pill {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.product-price .garage-status-wrapper {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 100;
    pointer-events: none;
}

.garage-status-wrapper-detail .garage-icon {
    pointer-events: auto;
}

.garage-icon {
    pointer-events: auto;
    transition: transform 0.2s ease;
    cursor: help;
}

.garage-icon:hover {
    transform: scale(1.1) rotate(-5deg);
}

.garage-icon.active-fit i {
    color: #28a745;
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.garage-icon.other-fit i {
    color: #fd7e14;
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.btn-favorite {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.9;
}

.product-image-wrapper .btn-favorite {
    position: absolute !important;
    bottom: 8px !important;
    right: -10px !important;
    top: auto !important;
}

.btn-favorite:hover {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.btn-favorite i {
    transition: transform 0.2s ease;
}

.btn-favorite:active i {
    transform: scale(0.7);
}

@media (max-width: 768px) {
    .btn-favorite {
        width: 30px;
        height: 30px;
        opacity: 1;
    }
}

.cart-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background-color: #f8f9fa;
    flex-wrap: wrap;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 45px;
}

.cart-decrease, .cart-increase {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.cart-qty {
    width: 42px;
    height: 30px;
    text-align: center;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
}

.cart-qty::-webkit-inner-spin-button,
.cart-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty {
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-add-btn {
    height: 30px;
    padding: 0 14px;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.product-out {
    opacity: 0.5;
    filter: grayscale(70%);
}

.product-out .cart-control {
    pointer-events: none;
}

#listView table tbody tr {
    transition: background-color 0.2s;
}

#listView table tbody tr:hover {
    background-color: #fcfcfc;
}

#listView .cart-control {
    background: transparent;
    border: none;
    padding: 0;
    justify-content: flex-end;
    min-height: auto;
}

#listView .cart-qty {
    width: 50px !important;
}

tr.product-card {
    height: 85px;
    max-height: 85px;
}

.product-image-wrap {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.product-name-link {
    display: block;
    max-width: 100%;
}

.product-name-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    line-height: 20px;
    max-height: 40px;
}

.discount-pill-list {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    background: #e53935;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    z-index: 5;
    transform-origin: center;
    transition: transform .2s ease, box-shadow .2s ease, opacity .25s ease;
}

.product-card:hover .discount-pill-list {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,.35);
}

.featured-pill-list {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 22px;
    height: 22px;
    background: #ffc107;
    color: #fff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    z-index: 4;
}

#listView tr.product-card.is-discounted {
    position: relative;
    overflow: hidden;
}

#listView tr.product-card.is-discounted td:last-child {
    position: relative;
    overflow: hidden;
}

#listView tr.product-card.is-discounted td:last-child::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;

    background: linear-gradient(
        to left,
        #fef3c7 20%,
        rgba(254, 243, 199, 0.85) 30%,
        rgba(254, 243, 199, 0.45) 55%,
        rgba(254, 243, 199, 0.15) 72%,
        transparent 100%
    );
}

#listView tr.product-card.is-discounted td:last-child .cart-control {
    position: relative;
    z-index: 5;
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(2px);
    border-radius: 10px;
    padding: 4px 6px;
}

#listView tr.product-card.is-discounted:hover td:last-child::after {
    opacity: 1;
    filter: brightness(1.05);
}

#listView tr.product-card > td {
    position: relative;
    z-index: 5;
}

#listView tr.product-card.is-discounted td:last-child .cart-control {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 10px;
    padding: 4px 6px;
}

#listView tr.product-card.is-discounted:hover::after {
    width: 38%;
}

.cart-control.added {
    background: #198754 !important;
    border-color: #198754 !important;
}

.cart-control.added button,
.cart-control.added input {
    opacity: 0 !important;
    pointer-events: none !important;
}

.cart-control.added::after {
    content: "✔ Sepete Eklendi";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    animation: cartSuccessPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cartSuccessPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    #listView table,
    #listView tbody {
        display: block !important;
        width: 100% !important;
    }

    #listView thead {
        display: none !important;
    }

    #listView tr.product-card {
        display: grid !important;
        grid-template-columns: 1.2fr 0.8fr !important;
        grid-template-areas:
            "product oem"
            "info cart";
        gap: 8px 10px;
        background: #fff;
        border: 1px solid #eaeaea;
        border-radius: 14px;
        padding: 12px !important;
        margin-bottom: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
        height: auto !important;
        min-height: 160px !important;
        overflow: visible !important;
    }

    #listView tr.product-card > td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        height: auto !important;
        min-height: initial !important;
    }

    #listView tr.product-card td:nth-child(1) {
        grid-area: product;
        align-self: start;
    }

    #listView tr.product-card td:nth-child(2) {
        grid-area: oem;
        text-align: right;
        align-self: start;
    }

    #listView tr.product-card td:nth-child(3) {
        grid-area: info;
        margin-top: 5px;
    }

    #listView tr.product-card td:nth-child(4) {
        grid-area: info;
        margin-top: 25px;
    }

    #listView tr.product-card td:nth-child(5) {
        grid-area: cart;
        align-self: end;
        justify-self: end;
        padding-top: 5px !important;
    }

    #listView .cart-control {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        gap: 3px;
    }

    #listView .cart-decrease,
    #listView .cart-increase {
        width: 26px !important;
        height: 26px !important;
        padding: 0 !important;
    }

    #listView .cart-qty {
        width: 34px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
    }

    #listView .cart-add-btn {
        height: 26px !important;
        font-size: 0.7rem !important;
        padding: 0 6px !important;
    }

    #listView .product-image-wrap img,
    #listView .product-image-wrap div {
        width: 45px !important;
        height: 45px !important;
    }

    #listView tr.product-card.is-discounted::after {
        content: "";
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
        pointer-events: none;
        z-index: 0;
        background: linear-gradient(
            to right,
            rgba(254, 243, 199, 0.1) 0%,
            rgba(254, 243, 199, 0.4) 50%,
            rgba(254, 243, 199, 0.7) 100%
        ) !important;
    }

    #listView tr.product-card.is-discounted td {
        background: transparent !important;
    }

    #listView tr.product-card.is-discounted {
        background: transparent !important;
        position: relative;
        z-index: 1;
    }

    #listView tr.product-card.is-discounted::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: 14px;
        background: linear-gradient(
            to right,
            #ffffff 0%,
            rgba(254, 243, 199, 0.4) 50%,
            #fef3c7 100%
        ) !important;
    }

    #listView tr.product-card.is-discounted::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .product-item-grid {
        height: auto !important;
        margin-bottom: 10px;
    }

    .product-card {
        padding: 10px !important;
        border-radius: 10px;
    }

    .product-image-wrapper, .product-img {
        height: 120px !important;
        max-height: 120px !important;
    }

    .product-title {
        font-size: 0.8rem !important;
        line-height: 1.1;
        max-height: 32px !important;
        min-height: 32px !important;
        -webkit-line-clamp: 2;
    }

    .brand-logo {
        height: 15px !important;
    }
    .brand-wrapper {
        min-height: 20px !important;
    }
    .oem-text {
        font-size: 0.65rem !important;
        margin-top: 4px !important;
        min-height: 14px !important;
    }

    .product-price {
        font-size: 1rem !important;
        margin-bottom: 4px;
    }
    .product-price small {
        font-size: 0.8rem !important;
    }

    .cart-control {
        padding: 4px !important;
        gap: 2px !important;
        min-height: 38px !important;
        border-radius: 8px;
    }

    .cart-decrease, .cart-increase {
        width: 24px !important;
        height: 24px !important;
        border-radius: 4px;
        font-size: 0.7rem;
    }

    .cart-qty {
        width: 32px !important;
        height: 24px !important;
        font-size: 0.75rem;
        border-radius: 4px;
    }

    .cart-add-btn {
        height: 24px !important;
        padding: 0 8px !important;
        font-size: 0.65rem !important;
        border-radius: 4px;
    }

    .discount-pill, .featured-pill {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 0.6rem !important;
    }

    .stock-badge {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }

    .product-image-wrapper .btn-favorite {
        width: 28px !important;
        height: 28px !important;
        right: -5px !important;
    }
}