.text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7vw;
    padding-bottom: 20px;
    letter-spacing: -0.02em;
    color: #2a1810;
}

.newin {
    padding-right: 10vh;
    padding-left: 10vh;
    padding-bottom: 10vh;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 400px));
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: #ab7870 solid 1.5px;
    border-radius: 25px;
    box-shadow:
        0 2px 8px rgba(171, 120, 112, 0.08),
        0 8px 32px rgba(171, 120, 112, 0.12);
    align-items: center;
    align-content: center;
    overflow: visible;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.slideshow {
    display: grid;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 12px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 4px 16px rgba(171, 120, 112, 0.14),
        0 16px 48px rgba(171, 120, 112, 0.18);
}

.slideshow {
    display: grid;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 12px;
}

.slide-img {
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: burlywood solid 4px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    box-sizing: border-box;
}

.slide-img.active {
    opacity: 1;
}

.product-details {
    padding: 16px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 0.3vh;
    text-align: left;
    width: 100%;
    flex: 1;
    overflow: visible;
}

.product-details a {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    overflow: visible;
}

.product-details p {
    overflow: visible;
}

.price-like-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f5ede9;
    overflow: visible;
}

.product-details h3 {
    font-size: 2vw;
    color: #2a1810;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.product-details>p,
.product-details a p {
    font-size: 1vw;
    color: #9c8070;
    font-weight: 500;
    line-height: 1.5;
    overflow: visible;
}

#price {
    font-size: 2vw;
    font-weight: 700;
    color: #ab7870;
}

.like-cart {
    width: 2.5vw;
    height: auto;
    filter: invert(56%) sepia(17%) saturate(856%) hue-rotate(328deg) brightness(92%) contrast(88%);
    transition: transform 0.25s ease, filter 0.25s ease;
    cursor: pointer;
    display: block;
    padding: 4px;
    box-sizing: content-box;
}

.like-cart:hover {
    transform: scale(1.25);
    filter: invert(56%) sepia(17%) saturate(856%) hue-rotate(328deg) brightness(80%) contrast(100%);
}

.red {
    filter: invert(31%) sepia(88%) saturate(3137%) hue-rotate(338deg) brightness(90%) contrast(92%);
}

.sold-out-overlay {
    background: linear-gradient(135deg, #ab7870, #7a4f48);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 5px 14px;
    border-radius: 0 0 0 12px;
    position: absolute;
    right: 0;
    top: 0;
}

/* ========================= */
/* Tablet — 1024px           */
/* ========================= */
@media screen and (max-width: 1024px) {
    .newin {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-right: 5vh;
        padding-left: 5vh;
        gap: 18px;
    }

    .product-details h3 {
        font-size: 2.5vw;
    }

    .product-details p {
        font-size: 1.4vw;
    }

    #price {
        font-size: 2.5vw;
    }

    .like-cart {
        width: 3.5vw;
        height: 3.5vw;
    }
}

/* ========================= */
/* Tablet — 768px            */
/* ========================= */
@media screen and (max-width: 768px) {
    .newin {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-right: 4vh;
        padding-left: 4vh;
        padding-bottom: 6vh;
        gap: 16px;
    }

    .product-details h3 {
        font-size: 3.5vw;
    }

    .product-details p {
        font-size: 2vw;
    }

    #price {
        font-size: 3.5vw;
    }

    .like-cart {
        width: 5vw;
        height: 5vw;
    }

    .text {
        font-size: 9vw;
    }
}

/* ========================= */
/* Mobile — 480px            */
/* ========================= */
@media screen and (max-width: 480px) {
    .newin {
        grid-template-columns: 1fr;
        padding-right: 5vw;
        padding-left: 5vw;
        padding-bottom: 4vh;
        gap: 16px;
    }

    .product-details {
        padding: 12px 4px 4px;
    }

    .product-details h3 {
        font-size: 6vw;
    }

    .product-details p {
        font-size: 3.5vw;
    }

    #price {
        font-size: 6vw;
    }

    .like-cart {
        width: 8vw;
        height: 8vw;
    }

    .text {
        font-size: 11vw;
    }

    .sold-out-overlay {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ========================= */
/* Pagination                */
/* ========================= */
.custom-pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    text-align: center;
}

.custom-pagination .sm\:hidden {
    display: none !important;
}

.custom-pagination nav {
    width: 100%;
}

.custom-pagination .inline-flex {
    gap: 6px;
}

.custom-pagination a,
.custom-pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.custom-pagination a:hover {
    background-color: #ab7870;
    color: #fff;
}

.custom-pagination span[aria-current="page"] span {
    background-color: #ab7870 !important;
    color: #fff !important;
    border-color: #ab7870 !important;
}

.custom-pagination span[aria-disabled="true"] span {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-pagination svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .custom-pagination .sm\:hidden {
        display: none !important;
    }

    .custom-pagination p {
        display: none !important;
    }

    .custom-pagination nav {
        display: flex;
        justify-content: center;
    }

    .custom-pagination .inline-flex {
        gap: 8px;
    }

    .custom-pagination a,
    .custom-pagination span {
        min-width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 15px;
        padding: 0 !important;
    }

    .pagination-ellipsis {
        padding: 0 8px;
        font-size: 16px;
        color: #999;
    }

    .custom-pagination span[aria-current="page"] span {
        background-color: #ab7870 !important;
        color: #fff !important;
        font-weight: 600;
    }
}