/* =========================
   GRID
========================= */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
}

/* =========================
   CARD
========================= */
.wpcm-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #eee;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wpcm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #ddd;
}

/* =========================
   IMAGE FIX
========================= */
.img-wrap {
    height: 160px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wpcm-card:hover img {
    transform: scale(1.08);
}

/* =========================
   DISCOUNT BADGE (STABLE)
========================= */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f99c25;
    color: #fff;
    padding: 6px 6px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    border-radius: 4px;
    z-index: 2; 
}

/* percentage bigger */
.discount-badge small {
    display: block;
    font-size: 12px;
}

.wpcm-card:hover .discount-badge {
    transform: none !important;
}

/* =========================
   DELIVERY
========================= */
.delivery {
    font-size: 11px;
    margin: 6px 0;
}

/* =========================
   TITLE
========================= */
.wpcm-card h4 {
    font-size: 13px;
    height: 36px;
    overflow: hidden;
    line-height: 1.3;
    padding: 0px 2px 0px 4px;
}

/* =========================
   RATING
========================= */
.rating {
    font-size: 12px;
    color: #f59e0b;
}

/* =========================
   PRICE
========================= */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price del {
    font-size: 12px;
    color: #999;
}

.price span {
    font-weight: bold;
}

/* =========================
   BUTTON
========================= */
.wpcm-add-btn {
    min-width: 60px;
    text-align: center;
    border: 1px solid #00a650;
    color: #00a650;
    background: #fff;
    font-size: 13px;
    padding: 5px 0;
    border-radius: 6px;
    transition: 0.2s ease;
}

.wpcm-add-btn:hover {
    background: #00a650;
    color: #fff;
}

/* =========================
   RESPONSIVE FIXED
========================= */

/* Desktop */
ul.products {
    grid-template-columns: repeat(5, 1fr);
}

/* Laptop */
@media (max-width: 1200px){
    ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (max-width: 992px){
    ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px){
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wpcm-card {
        padding: 8px;
    }

    .img-wrap {
        height: 120px;
    }

    .wpcm-card h4 {
        font-size: 12px;
        height: auto;
    }

    .price span {
        font-size: 13px;
    }

    .wpcm-add-btn {
        font-size: 11px;
        padding: 4px 0;
    }
}

/* Small Mobile */
@media (max-width: 400px){
    ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide "View cart" link */
a.added_to_cart {
    display: none !important;
}


/* CATEGORY SLIDER */
.category-slider-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.cat-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.cat-slider::-webkit-scrollbar {
    display: none;
}

/* CARD */
.cat-card {
    min-width: 140px;
    text-align: center;
    text-decoration: none;
    color: #000;
}

.cat-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    transition: 0.3s;
}

/* hover */
.cat-card:hover img {
    transform: scale(1.05);
}

/* TITLE */
.cat-card h4 {
    font-size: 13px;
    margin-top: 6px;
}

.cat-card span {
    background: yellow;
    padding: 2px 4px;
    font-size: 11px;
}

/* NAV BUTTON */
.cat-nav {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
}

.cat-nav.left { left: -10px; }
.cat-nav.right { right: -10px; }