/* =====================================================
   Custom Ecommerce Slider - Light & Smooth Optimized
   ===================================================== */
.ces-slider-wrapper {
    --ces-radius: 10px;
    --ces-shadow: 0 3px 12px rgba(0,0,0,.06);
    --ces-shadow-hover: 0 8px 24px rgba(0,0,0,.1);
    --ces-primary: #e63946;
    --ces-gap: 12px;
    position: relative;
    margin: 20px 0 30px;
    width: 100%;
    contain: layout style;
}

/* Cards */
.ces-product-card,
.ces-post-card {
    background: #fff;
    border-radius: var(--ces-radius);
    overflow: hidden;
    box-shadow: var(--ces-shadow);
    border: 1px solid rgba(0,0,0,.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .25s cubic-bezier(.25,.8,.25,1),
                box-shadow .25s cubic-bezier(.25,.8,.25,1);
    will-change: transform;
}

@media (hover: hover) {
    .ces-product-card:hover,
    .ces-post-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--ces-shadow-hover);
    }
}

/* Images */
.ces-product-image,
.ces-post-image {
    position: relative;
    overflow: hidden;
    background: #f4f4f4;
    flex-shrink: 0;
}
.ces-product-image { aspect-ratio: 1/1; }
.ces-post-image   { aspect-ratio: 16/10; }

.ces-product-image img,
.ces-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
}

@media (hover: hover) {
    .ces-product-card:hover .ces-product-image img,
    .ces-post-card:hover .ces-post-image img {
        transform: scale(1.04);
    }
}

.ces-no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eee, #e2e2e2);
}

/* Badges */
.ces-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ces-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
    z-index: 2;
    line-height: 1.3;
}
.ces-badge.outofstock { background: #555; }

/* Content */
.ces-product-info,
.ces-post-content {
    padding: 12px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ces-product-title,
.ces-post-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-product-title a,
.ces-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color .2s;
}
.ces-product-title a:hover,
.ces-post-title a:hover {
    color: var(--ces-primary);
}

/* Price + Voucher */
.ces-product-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    min-height: 52px;
    justify-content: flex-end;
}
.ces-voucher-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fff1f0, #ffe7e3);
    color: #ee4d2d;
    border: 1px solid #ffccc7;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.3;
    width: fit-content;
}
.ces-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.ces-product-price del,
.ces-price-old {
    color: #999 !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    text-decoration: line-through !important;
}
.ces-product-price ins,
.ces-price-new {
    color: #ee4d2d !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.ces-product-actions {
    margin-top: auto;
}
.ces-product-actions .button,
.ces-product-actions .add_to_cart_button {
    width: 100%;
    text-align: center;
    border-radius: 99px !important;
    font-weight: 400;
    color: #fff !important;
    font-size: 15px !important;
    padding: 9px 12px !important;
    line-height: 1.3 !important;
}

/* Post specific */
.ces-post-meta {
    font-size: 11.5px;
    color: #888;
    margin-bottom: 6px;
    line-height: 1.3;
}
.ces-post-excerpt {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-readmore {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ces-primary);
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
}
.ces-readmore:hover { text-decoration: underline; }

/* Navigation */
.ces-nav {
    width: 40px !important;
    height: 40px !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 3px 12px rgba(0,0,0,.1);
    color: #222 !important;
    transition: all .2s ease;
    margin-top: 0 !important;
}
.ces-nav:hover {
    background: var(--ces-primary) !important;
    color: #fff !important;
}
.ces-nav:after {
    font-size: 15px !important;
    font-weight: 700;
}
.swiper-button-prev.ces-nav { left: 4px; }
.swiper-button-next.ces-nav { right: 4px; }

/* Pagination */
.swiper-pagination {
    position: relative !important;
    margin-top: 16px;
    bottom: 0 !important;
    line-height: 1;
}
.swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    background: #cfcfcf;
    opacity: 1;
    transition: all .2s;
    margin: 0 3px !important;
}
.swiper-pagination-bullet-active {
    background: var(--ces-primary) !important;
    width: 18px;
    border-radius: 4px;
}

/* ========== Equal height cards ========== */
.ces-products-slider .swiper-slide,
.mp2t-related-posts .swiper-slide {
    height: auto;
    display: flex;
}
.ces-product-card,
.mp2t-related-posts .ces-post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}
.ces-product-info,
.mp2t-related-posts .ces-post-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.ces-product-actions,
.mp2t-related-posts .ces-readmore {
    margin-top: auto;
}
.mp2t-related-posts .ces-slider-wrapper {
    margin-top: 10px;
}

/* ========== Responsive ========== */
@media (min-width: 1200px) {
    .ces-slider-wrapper {
        --ces-gap: 20px;
        margin: 28px 0 36px;
    }
    .ces-product-info,
    .ces-post-content { padding: 16px 18px 20px; }
    .ces-product-title,
    .ces-post-title { font-size: 15px; }
    .ces-nav {
        width: 44px !important;
        height: 44px !important;
    }
    .swiper-button-prev.ces-nav { left: -6px; }
    .swiper-button-next.ces-nav { right: -6px; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .ces-product-info,
    .ces-post-content { padding: 14px 15px 17px; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .ces-slider-wrapper { margin: 18px 0 26px; }
    .ces-product-info,
    .ces-post-content { padding: 12px 13px 15px; }
    .ces-product-title,
    .ces-post-title { font-size: 13.5px; }
    .ces-product-price { font-size: 14.5px; }
    .ces-product-actions .button,
    .ces-product-actions .add_to_cart_button {
        font-size: 12.5px !important;
        padding: 8px 10px !important;
    }
    .ces-badge {
        top: 8px; left: 8px;
        font-size: 9.5px;
        padding: 2px 8px;
    }
    .swiper-button-prev.ces-nav,
    .swiper-button-next.ces-nav {
        width: 36px !important;
        height: 36px !important;
    }
}

@media (max-width: 767px) {
    .ces-slider-wrapper { margin: 16px 0 22px; }
    .ces-product-card,
    .ces-post-card { border-radius: 9px; }
    .ces-product-info,
    .ces-post-content { padding: 11px 12px 14px; }
    .ces-product-title,
    .ces-post-title {
        font-size: 13px !important;
        line-height: 1.3;
        margin-bottom: 4px;
    }
    .ces-product-price {
        min-height: 44px;
        margin-bottom: 6px;
        font-size: 14px;
    }
    .ces-voucher-badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    .ces-price-old { font-size: 11.5px !important; }
    .ces-price-new { font-size: 14px !important; }
    .ces-product-actions .button {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    .ces-post-excerpt {
        font-size: 12.5px;
        -webkit-line-clamp: 2;
    }
    .ces-readmore { font-size: 12px; }
    .ces-badge {
        top: 7px; left: 7px;
        font-size: 9px;
        padding: 2px 7px;
    }
    .swiper-button-prev.ces-nav,
    .swiper-button-next.ces-nav {
        display: none !important;
    }
    .swiper-pagination { margin-top: 14px; }
}

@media (max-width: 575px) {
    .ces-slider-wrapper {
        margin: 14px 0 20px;
        --ces-radius: 8px;
    }
    .ces-product-card,
    .ces-post-card { border-radius: 8px; }
    .ces-product-info,
    .ces-post-content { padding: 10px 11px 13px; }
    .ces-product-title,
    .ces-post-title {
        font-size: 12.5px;
        margin-bottom: 5px;
    }
    .ces-product-price {
        font-size: 13.5px;
        min-height: 46px;
        margin-bottom: 9px;
    }
    .ces-product-actions .button,
    .ces-product-actions .add_to_cart_button {
        font-size: 12px !important;
        padding: 8px !important;
    }
    .ces-post-meta { font-size: 11px; margin-bottom: 5px; }
    .ces-post-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 2;
        margin-bottom: 8px;
    }
    .ces-readmore { font-size: 11.5px; }
    .ces-badge {
        top: 6px; left: 6px;
        font-size: 9px;
        padding: 2px 6px;
    }
    .swiper-pagination { margin-top: 12px; }
    .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        margin: 0 2.5px !important;
    }
    .swiper-pagination-bullet-active { width: 16px; }
}

@media (max-width: 380px) {
    .ces-product-title,
    .ces-post-title { font-size: 12px; }
    .ces-product-price { font-size: 13px; }
    .ces-product-info,
    .ces-post-content { padding: 9px 10px 12px; }
}

/* ========== Multi-style Post Cards (giữ nguyên logic, đã nhẹ hóa) ========== */
:root {
    --ces-primary: #00bcd4;
    --ces-text: #1a1a1a;
    --ces-muted: #666;
    --ces-border: #eee;
    --ces-radius: 12px;
}

.ces-card {
    background: #fff;
    border-radius: var(--ces-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s cubic-bezier(.25,.8,.25,1),
                box-shadow .25s cubic-bezier(.25,.8,.25,1);
}
.ces-card a {
    text-decoration: none !important;
    color: inherit;
}
.ces-no-thumb {
    background: #f0f2f5;
    width: 100%;
    height: 100%;
    min-height: 160px;
}

/* Classic */
.ces-card--classic {
    border: 1px solid var(--ces-border);
    display: flex;
    flex-direction: column;
}
@media (hover: hover) {
    .ces-card--classic:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
    }
}
.ces-card--classic .ces-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.ces-card--classic .ces-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
@media (hover: hover) {
    .ces-card--classic:hover .ces-card__image img {
        transform: scale(1.04);
    }
}
.ces-card--classic .ces-card__badge {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.ces-card--classic .ces-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ces-card--classic .ces-card__meta {
    font-size: 12.5px;
    color: var(--ces-muted);
    margin-bottom: 6px;
}
.ces-card--classic .ces-card__title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-card--classic .ces-card__excerpt {
    font-size: 13.8px;
    color: var(--ces-muted);
    line-height: 1.55;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.ces-card--classic .ces-card__more {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ces-primary);
}

/* Horizontal */
.ces-card--horizontal {
    display: flex;
    gap: 14px;
    border: 1px solid var(--ces-border);
    padding: 12px;
    align-items: stretch;
}
@media (hover: hover) {
    .ces-card--horizontal:hover {
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }
}
.ces-card--horizontal .ces-card__image {
    flex: 0 0 120px;
    border-radius: 8px;
    overflow: hidden;
}
.ces-card--horizontal .ces-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 90px;
}
.ces-card--horizontal .ces-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.ces-card--horizontal .ces-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ces-primary);
    margin-bottom: 4px;
}
.ces-card--horizontal .ces-card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-card--horizontal .ces-card__excerpt {
    font-size: 13px;
    color: var(--ces-muted);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-card--horizontal .ces-card__meta {
    font-size: 12px;
    color: #999;
}

/* Overlay */
.ces-card--overlay {
    position: relative;
    border-radius: var(--ces-radius);
    overflow: hidden;
}
.ces-card--overlay .ces-card__image {
    position: relative;
    aspect-ratio: 16/10;
}
.ces-card--overlay .ces-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
@media (hover: hover) {
    .ces-card--overlay:hover .ces-card__image img {
        transform: scale(1.05);
    }
}
.ces-card--overlay .ces-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    color: #fff;
}
.ces-card--overlay .ces-card__badge {
    display: inline-block;
    background: var(--ces-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    margin-bottom: 8px;
    width: fit-content;
}
.ces-card--overlay .ces-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-card--overlay .ces-card__meta {
    font-size: 12.5px;
    opacity: .85;
}

/* Magazine */
.ces-card--magazine {
    border: 1px solid var(--ces-border);
}
.ces-card--magazine .ces-card__image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.ces-card--magazine .ces-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
@media (hover: hover) {
    .ces-card--magazine:hover .ces-card__image img {
        transform: scale(1.04);
    }
}
.ces-card--magazine .ces-card__body {
    padding: 14px 14px 16px;
}
.ces-card--magazine .ces-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--ces-primary);
    margin-bottom: 5px;
}
.ces-card--magazine .ces-card__title {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ces-card--magazine .ces-card__meta {
    font-size: 12px;
    color: var(--ces-muted);
}

/* Minimal */
.ces-card--minimal {
    border-bottom: 1px solid var(--ces-border);
    border-radius: 0;
    padding: 16px 0;
}
.ces-card--minimal .ces-card__badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ces-primary);
    margin-bottom: 6px;
}
.ces-card--minimal .ces-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}
.ces-card--minimal .ces-card__excerpt {
    font-size: 14px;
    color: var(--ces-muted);
    line-height: 1.55;
    margin: 0 0 10px;
}
.ces-card--minimal .ces-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: #999;
}
.ces-card--minimal .ces-card__more {
    color: var(--ces-primary);
    font-weight: 600;
}

@media (max-width: 640px) {
    .ces-card--horizontal { gap: 12px; }
    .ces-card--horizontal .ces-card__image { flex: 0 0 100px; }
    .ces-card--classic .ces-card__title,
    .ces-card--overlay .ces-card__title { font-size: 15.5px; }
    .ces-card--minimal .ces-card__title { font-size: 16px; }
}