/* =========================================================
   Qick Ajax Category Products
   Frontend CSS - Clean Optimized Version
   Author: Qick.VN
========================================================= */

.qacp-wrapper,
.qacp-wrapper * {
    box-sizing: border-box;
}

.qacp-wrapper {
    --qacp-red: #e60000;
    --qacp-dark: #111111;
    --qacp-border: #eeeeee;
    --qacp-bg: #f7f7f7;

    --qacp-columns-desktop: 5;
    --qacp-columns-tablet: 4;
    --qacp-columns-mobile: 2;
    --qacp-gap: 12px;

    --qacp-line-color: var(--qacp-red);
    --qacp-line-height: 3px;

    --qacp-title-color: #ffffff;
    --qacp-menu-color: #111111;
    --qacp-active-bg: var(--qacp-red);
    --qacp-active-color: #ffffff;
    --qacp-price-color: var(--qacp-red);

    --qacp-title-font-size: 18px;
    --qacp-menu-font-size: 14px;
    --qacp-price-font-size: 15px;

    --qacp-title-font-weight: 700;
    --qacp-title-font-style: normal;
    --qacp-title-text-transform: none;

    --qacp-menu-font-weight: 700;
    --qacp-menu-font-style: normal;
    --qacp-menu-text-transform: none;

    --qacp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;

    width: 100%;
    position: relative;
    margin: 16px 0 28px;
    font-family: var(--qacp-font-family);
}

/* =========================================================
   HEADER
========================================================= */

.qacp-row-header {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 48px;
    min-height: 48px;
    background: #ffffff;
    overflow: visible;
    z-index: 2;
}

.qacp-row-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--qacp-line-height);
    background: var(--qacp-line-color);
    z-index: 50;
    pointer-events: none;
}

.qacp-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;

    width: auto;
    min-width: max-content;
    max-width: none;
    height: 48px;

    padding: 0 82px 0 18px;
    margin: 0;

    background: var(--qacp-red);
    color: var(--qacp-title-color);

    overflow: visible;
    z-index: 20;
}

.qacp-title::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;

    width: 82px;
    height: 48px;

    background: var(--qacp-red);
    clip-path: polygon(0 0, 58% 0, 100% 100%, 0 100%);

    z-index: -2;
}

.qacp-title::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;

    width: 62px;
    height: 48px;

    background: #ffffff;
    border-bottom-left-radius: 62px 48px;

    z-index: -1;
}

.qacp-title-text {
    position: relative;
    z-index: 3;
    display: block;

    color: var(--qacp-title-color);
    font-family: var(--qacp-font-family);
    font-size: var(--qacp-title-font-size);
    line-height: 1;
    font-weight: var(--qacp-title-font-weight);
    font-style: var(--qacp-title-font-style);
    text-transform: var(--qacp-title-text-transform);

    white-space: nowrap;
    letter-spacing: 0;
}

/* =========================================================
   MENU
========================================================= */

.qacp-menu {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding-left: 0;

    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    background: #ffffff;
    z-index: 2;
    cursor: grab;
}

.qacp-menu::-webkit-scrollbar {
    display: none;
}

.qacp-menu.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.qacp-menu::after {
    content: "";
    flex: 0 0 10px;
    width: 10px;
}

.qacp-menu-item {
    appearance: none;
    flex: 0 0 auto;

    height: 48px;
    margin: 0;
    padding: 0 18px;

    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--qacp-menu-color);

    font-family: var(--qacp-font-family);
    font-size: var(--qacp-menu-font-size);
    line-height: 48px;
    font-weight: var(--qacp-menu-font-weight);
    font-style: var(--qacp-menu-font-style);
    text-transform: var(--qacp-menu-text-transform);

    cursor: pointer;
    white-space: nowrap;
    user-select: none;

    transition: background-color .2s ease, color .2s ease;
}

.qacp-menu-item:hover,
.qacp-menu-item.is-active {
    background: var(--qacp-active-bg);
    color: var(--qacp-active-color);
}

.qacp-menu-item:focus {
    outline: none;
}

/* =========================================================
   VIEW ALL
========================================================= */

.qacp-view-all {
    position: relative;
    flex: 0 0 auto;

    height: 48px;
    padding: 0 14px;
    margin: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    background: #ffffff;
    color: var(--qacp-red);

    font-family: var(--qacp-font-family);
    font-size: var(--qacp-menu-font-size);
    line-height: 48px;
    font-weight: var(--qacp-menu-font-weight);
    text-transform: var(--qacp-menu-text-transform);
    text-decoration: none;
    white-space: nowrap;

    z-index: 3;
}

.qacp-view-all::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--qacp-line-height);
    background: var(--qacp-line-color);
    z-index: 6;
}

.qacp-view-all:hover {
    color: var(--qacp-red);
    text-decoration: none;
}

.qacp-view-all-icon {
    font-size: 18px;
    line-height: 1;
}

/* =========================================================
   PRODUCT AREA
========================================================= */

.qacp-row-products {
    position: relative;
    margin: 0;
    padding: 14px 34px 22px;
    background: var(--qacp-bg);
    overflow: hidden;
}

.qacp-products-viewport {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.qacp-products-track {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--qacp-gap);
    align-items: stretch;
    transform: translateX(0);
    transition: transform .35s ease;
    will-change: transform;
}

/* =========================================================
   PRODUCT CARD
========================================================= */

.qacp-product-card {
    flex: 0 0 calc(
        (100% - (var(--qacp-gap) * (var(--qacp-columns-desktop) - 1))) / var(--qacp-columns-desktop)
    );
    width: calc(
        (100% - (var(--qacp-gap) * (var(--qacp-columns-desktop) - 1))) / var(--qacp-columns-desktop)
    );
    min-width: calc(
        (100% - (var(--qacp-gap) * (var(--qacp-columns-desktop) - 1))) / var(--qacp-columns-desktop)
    );

    display: flex;
    flex-direction: column;

    height: 340px;
    min-height: 340px;
    max-height: 340px;

    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--qacp-border);
    border-radius: 7px;
    overflow: hidden;

    transition: box-shadow .2s ease, transform .2s ease;
}

.qacp-product-card:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.qacp-product-card:has(.qacp-promo-banner) {
    height: 365px;
    min-height: 365px;
    max-height: 365px;
}

.qacp-product-card:has(.qacp-product-actions) {
    height: 385px;
    min-height: 385px;
    max-height: 385px;
}

.qacp-product-card:has(.qacp-promo-banner):has(.qacp-product-actions) {
    height: 415px;
    min-height: 415px;
    max-height: 415px;
}

@supports not selector(:has(*)) {
    .qacp-product-card {
        height: 405px;
        min-height: 405px;
        max-height: 405px;
    }
}

/* =========================================================
   PRODUCT IMAGE + QUICK VIEW + SALE BADGE
========================================================= */

.qacp-product-image-wrap {
    position: relative;
    width: 100%;
    height: 158px;
    min-height: 158px;
    max-height: 158px;
    margin: 0 0 12px;
    overflow: hidden;
}

.qacp-product-image {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 158px;
    min-height: 158px;
    max-height: 158px;

    margin: 0;
    padding: 0;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
}

.qacp-product-image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 158px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
}

.qacp-product-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    background: rgba(0,0,0,.04);
    opacity: 0;
    transition: opacity .22s ease;
    pointer-events: none;
}

.qacp-product-card:hover .qacp-product-image-wrap::after {
    opacity: 1;
}

.qacp-sale-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 9 !important;

    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 0 !important;
    margin: 0 !important;

    background: #f40000 !important;
    color: #ffffff !important;
    border-radius: 50% !important;

    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    text-align: center !important;

    box-shadow: 0 2px 6px rgba(0,0,0,.14) !important;
}

.qacp-sale-badge::before,
.qacp-sale-badge::after {
    display: none !important;
    content: none !important;
}

/* Quick View - ép hiển thị đúng chữ từ UX Builder */
.qacp-quick-view {
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 8;

    min-width: 110px;
    height: 32px;
    padding: 0 16px;

    border-radius: 999px;
    background: rgba(230,0,0,.96);
    color: #ffffff !important;

    font-family: var(--qacp-font-family);
    font-size: 0 !important;
    line-height: 32px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: all .22s ease;

    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.qacp-quick-view span {
    display: none !important;
}

.qacp-quick-view::before {
    content: attr(data-qacp-label);
    display: inline-block;
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 32px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.qacp-product-card:hover .qacp-quick-view {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.qacp-quick-view:hover {
    background: #b90000;
    color: #ffffff !important;
}

/* =========================================================
   PROMO BANNER
========================================================= */

.qacp-promo-banner {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 34px;
    min-height: 34px;
    max-height: 34px;

    margin: -4px 0 10px;
    padding: 0;

    overflow: hidden;
    border-radius: 0;

    background: #e60000;
}

.qacp-promo-banner img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 34px !important;

    object-fit: contain !important;
    object-position: center center !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* =========================================================
   PRODUCT INFO
========================================================= */

.qacp-product-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.qacp-product-category {
    display: block;
    margin: 0 0 4px;

    color: #999999;
    font-size: 10px;
    line-height: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qacp-product-title {
    display: -webkit-box !important;
    width: 100%;
    min-height: 40px;
    max-height: 40px;
    margin: 0;
    padding: 0;
    overflow: hidden;

    color: var(--qacp-dark);
    font-family: var(--qacp-font-family);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
    white-space: normal;
    word-break: break-word;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qacp-product-title:hover {
    color: var(--qacp-red);
    text-decoration: none;
}

.qacp-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;

    height: 18px;
    min-height: 18px;
    margin: 8px 0 0;
    overflow: hidden;
}

.qacp-product-rating .star-rating {
    float: none !important;
    display: block !important;
    flex: 0 0 auto;
    width: 5.4em;
    height: 1em;
    margin: 0;
    font-size: 12px;
    line-height: 1;
    color: #ffb400;
}

.qacp-product-rating:empty::before {
    content: "★★★★★";
    color: #ffb400;
    font-size: 12px;
    letter-spacing: 1px;
}

.qacp-review-count {
    display: inline-block;
    color: #777777;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    transform: translateY(1px);
}

.qacp-product-price {
    display: block;
    margin-top: 8px;
    padding-top: 0;

    color: var(--qacp-price-color);
    font-family: var(--qacp-font-family);
    font-size: var(--qacp-price-font-size);
    line-height: 20px;
    font-weight: 800;
    text-align: left;
}

.qacp-product-price del {
    display: inline-block;
    margin-right: 6px;
    color: #888888;
    font-size: 13px;
    font-weight: 400;
    opacity: 1;
}

.qacp-product-price ins {
    color: var(--qacp-price-color);
    font-weight: 800;
    text-decoration: none;
}

.qacp-product-price .amount {
    color: inherit;
    font-weight: inherit;
}

.qacp-product-shipping {
    display: block;
    margin-top: 4px;
    color: #1688ff;
    font-size: 11px;
    line-height: 15px;
    font-weight: 400;
}

/* =========================================================
   PRODUCT ACTIONS
========================================================= */

.qacp-product-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-top: 8px !important;
    overflow: hidden !important;
}

.qacp-product-actions .qacp-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;

    margin: 0 !important;
    box-sizing: border-box !important;

    border-radius: 4px !important;
    text-decoration: none !important;

    font-size: 12px !important;
    line-height: 36px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;

    transition: all .2s ease !important;
}

.qacp-product-actions .qacp-add-to-cart {
    flex: 0 0 42px !important;

    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;

    padding: 0 !important;

    background: #ffffff !important;
    color: var(--qacp-red) !important;
    border: 1px solid var(--qacp-red) !important;

    text-indent: 0 !important;
    overflow: hidden !important;
}

.qacp-cart-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    height: 100% !important;

    font-size: 18px !important;
    line-height: 1 !important;
}

.qacp-product-actions .qacp-add-to-cart:hover {
    background: var(--qacp-red) !important;
    color: #ffffff !important;
}

.qacp-product-actions .qacp-buy-now {
    flex: 1 1 auto !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    padding: 0 10px !important;

    background: var(--qacp-red) !important;
    color: #ffffff !important;
    border: 1px solid var(--qacp-red) !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.qacp-product-actions .qacp-buy-now:hover {
    background: #b90000 !important;
    border-color: #b90000 !important;
    color: #ffffff !important;
}

/* =========================================================
   ARROWS
========================================================= */

.qacp-arrow {
    appearance: none !important;
    position: absolute;
    top: 50%;

    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid #eeeeee !important;
    border-radius: 50% !important;

    background: #ffffff !important;
    color: #111111 !important;

    font-size: 32px !important;
    line-height: 40px !important;
    font-weight: 400 !important;
    text-align: center !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    transform: translateY(-50%);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    z-index: 10;

    transition: background-color .2s ease, color .2s ease;
}

.qacp-arrow:hover {
    background: var(--qacp-red) !important;
    color: #ffffff !important;
}

.qacp-arrow-prev {
    left: 8px;
}

.qacp-arrow-next {
    right: 8px;
}

.qacp-slider-disabled .qacp-arrow {
    display: none !important;
}

/* =========================================================
   EMPTY / ERROR
========================================================= */

.qacp-empty,
.qacp-error {
    display: block;
    width: 100%;
    padding: 18px;
    background: #fff5f5;
    color: #c00000;
    border: 1px solid #ffd0d0;
    font-size: 14px;
}

/* =========================================================
   SKELETON LOADING
========================================================= */

.qacp-wrapper.is-loading .qacp-products-viewport {
    opacity: 1 !important;
    pointer-events: none;
}

.qacp-wrapper.is-loading .qacp-products-track {
    visibility: hidden;
}

.qacp-wrapper.is-loading .qacp-row-products::before {
    content: "";
    position: absolute;
    inset: 14px 34px 22px;
    z-index: 12;
    display: block;
    pointer-events: none;

    background:
        linear-gradient(90deg, #eeeeee 25%, #fafafa 37%, #eeeeee 63%),
        linear-gradient(90deg, #eeeeee 25%, #fafafa 37%, #eeeeee 63%),
        linear-gradient(90deg, #eeeeee 25%, #fafafa 37%, #eeeeee 63%),
        linear-gradient(90deg, #eeeeee 25%, #fafafa 37%, #eeeeee 63%),
        linear-gradient(90deg, #eeeeee 25%, #fafafa 37%, #eeeeee 63%);

    background-size:
        calc((100% - 48px) / 5) 340px,
        calc((100% - 48px) / 5) 340px,
        calc((100% - 48px) / 5) 340px,
        calc((100% - 48px) / 5) 340px,
        calc((100% - 48px) / 5) 340px;

    background-position:
        0 0,
        calc((100% - 48px) / 5 + 12px) 0,
        calc(((100% - 48px) / 5 + 12px) * 2) 0,
        calc(((100% - 48px) / 5 + 12px) * 3) 0,
        calc(((100% - 48px) / 5 + 12px) * 4) 0;

    background-repeat: no-repeat;
    border-radius: 8px;
    animation: qacpSkeletonPulse 1s ease-in-out infinite;
}

.qacp-wrapper.is-loading .qacp-row-products::after {
    display: none !important;
    content: none !important;
}

@keyframes qacpSkeletonPulse {
    0% {
        opacity: .55;
        filter: brightness(1);
    }

    50% {
        opacity: 1;
        filter: brightness(1.04);
    }

    100% {
        opacity: .55;
        filter: brightness(1);
    }
}

/* =========================================================
   TITLE BACKGROUND IMAGE
========================================================= */

.qacp-wrapper[style*="--qacp-title-bg-image"] .qacp-title,
.qacp-wrapper[style*="--qacp-title-bg-image"] .qacp-title::after {
    background-image: var(--qacp-title-bg-image) !important;
    background-size: cover !important;
    background-position: center !important;
}

/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 1200px) {
    .qacp-menu {
        padding-left: 0;
    }

    .qacp-menu-item {
        padding-left: 14px;
        padding-right: 14px;
        font-size: 13px;
    }

    .qacp-product-card {
        flex-basis: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-tablet) - 1))) / var(--qacp-columns-tablet)
        );
        width: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-tablet) - 1))) / var(--qacp-columns-tablet)
        );
        min-width: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-tablet) - 1))) / var(--qacp-columns-tablet)
        );
    }
}

/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media (max-width: 768px) {
    .qacp-row-header {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .qacp-title {
        width: auto;
        min-width: max-content;
        max-width: calc(100% - 78px);
        height: 48px;
        padding: 0 70px 0 14px;
    }

    .qacp-title::after {
        display: block;
        width: 70px;
        height: 48px;
    }

    .qacp-title::before {
        display: block;
        width: 52px;
        height: 48px;
        border-bottom-left-radius: 52px 48px;
    }

    .qacp-title-text {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 165px);
    }

    .qacp-menu {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        height: 44px;
        padding-left: 0;
        border-top: 1px solid rgba(0,0,0,.06);
    }

    .qacp-menu-item {
        height: 44px;
        line-height: 44px;
        padding: 0 14px;
        font-size: 12px;
    }

    .qacp-view-all {
        margin-left: auto;
        height: 48px;
        line-height: 48px;
        color: var(--qacp-red) !important;
        background: #ffffff;
        z-index: 8;
    }

    .qacp-view-all::after {
        display: none;
    }

    .qacp-row-products {
        padding: 12px 28px 18px;
    }

    .qacp-product-card {
        flex-basis: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-mobile) - 1))) / var(--qacp-columns-mobile)
        );
        width: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-mobile) - 1))) / var(--qacp-columns-mobile)
        );
        min-width: calc(
            (100% - (var(--qacp-gap) * (var(--qacp-columns-mobile) - 1))) / var(--qacp-columns-mobile)
        );

        height: 285px;
        min-height: 285px;
        max-height: 285px;
        padding: 10px;
    }

    .qacp-product-card:has(.qacp-promo-banner) {
        height: 340px;
        min-height: 340px;
        max-height: 340px;
    }

    .qacp-product-card:has(.qacp-product-actions) {
        height: 365px;
        min-height: 365px;
        max-height: 365px;
    }

    .qacp-product-card:has(.qacp-promo-banner):has(.qacp-product-actions) {
        height: 390px;
        min-height: 390px;
        max-height: 390px;
    }

    .qacp-product-image-wrap,
    .qacp-product-image {
        height: 125px;
        min-height: 125px;
        max-height: 125px;
    }

    .qacp-product-image img {
        max-height: 125px !important;
    }

    .qacp-sale-badge {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
        font-size: 8px !important;
    }

    .qacp-promo-banner {
        height: 30px;
        min-height: 30px;
        max-height: 30px;
    }

    .qacp-promo-banner img {
        max-height: 30px !important;
    }

    .qacp-product-title {
        font-size: 13px;
        line-height: 20px;
        min-height: 40px;
        max-height: 40px;
    }

    .qacp-product-price {
        font-size: 14px;
        margin-top: 6px;
    }

    .qacp-quick-view {
        height: 30px;
        min-width: 100px;
        line-height: 30px;
    }

    .qacp-quick-view::before {
        font-size: 12px !important;
        line-height: 30px !important;
    }

    .qacp-product-actions {
        gap: 5px !important;
    }

    .qacp-product-actions .qacp-btn {
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        line-height: 34px !important;
        font-size: 11px !important;
    }

    .qacp-product-actions .qacp-add-to-cart {
        flex: 0 0 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }

    .qacp-cart-icon {
        font-size: 16px !important;
    }

    .qacp-product-actions .qacp-buy-now {
        padding: 0 8px !important;
    }

    .qacp-arrow {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
        font-size: 26px !important;
        line-height: 30px !important;
    }

    .qacp-arrow-prev {
        left: 5px;
    }

    .qacp-arrow-next {
        right: 5px;
    }
}

/* =========================================================
   RESPONSIVE SMALL MOBILE
   Màn quá hẹp thì bỏ xéo để tránh title tràn layout
========================================================= */

@media (max-width: 480px) {
    .qacp-wrapper {
        margin: 14px 0 24px;
    }

    .qacp-row-products {
        padding: 12px 26px 16px;
    }

    .qacp-title {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 0 14px;
    }

    .qacp-title::before,
    .qacp-title::after {
        display: none;
    }

    .qacp-title-text {
        max-width: calc(100vw - 120px);
    }

    .qacp-view-all {
        position: absolute;
        top: 0;
        right: 0;
        background: transparent;
        color: #ffffff !important;
    }

    .qacp-product-card {
        height: 265px;
        min-height: 265px;
        max-height: 265px;
    }

    .qacp-product-card:has(.qacp-promo-banner) {
        height: 335px;
        min-height: 335px;
        max-height: 335px;
    }

    .qacp-product-card:has(.qacp-product-actions) {
        height: 375px;
        min-height: 375px;
        max-height: 375px;
    }

    .qacp-product-card:has(.qacp-promo-banner):has(.qacp-product-actions) {
        height: 405px;
        min-height: 405px;
        max-height: 405px;
    }

    .qacp-product-image-wrap,
    .qacp-product-image {
        height: 110px;
        min-height: 110px;
        max-height: 110px;
    }

    .qacp-product-image img {
        max-height: 110px !important;
    }
}
/* =========================================================
   Qick Ajax Category Products - Credit Footer
   Dòng tác giả và phát triển bởi QICK.VN
========================================================= */

.qacp-credit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 0;
    padding: 10px 12px;

    background: #ffffff;
    color: #555555;

    border-top: 1px solid rgba(0, 0, 0, .06);

    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
    text-align: center;

    box-sizing: border-box;
}

.qacp-credit a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: inherit;
    text-decoration: none;

    max-width: 100%;
}

.qacp-credit a:hover {
    color: var(--qacp-red);
    text-decoration: none;
}

.qacp-credit-logo {
    display: inline-block;

    width: 22px;
    height: 22px;

    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;

    object-fit: contain;
    object-position: center center;

    margin: 0;
    padding: 0;
    border: 0;
}

/* Logo đen / xám dùng trên nền sáng */
.qacp-credit-logo-dark {
    filter: grayscale(1) brightness(.25);
}

/* Logo trắng dùng khi sau này đổi nền credit sang màu tối */
.qacp-credit-logo-white {
    filter: brightness(0) invert(1);
}

.qacp-credit-text {
    display: inline-block;

    max-width: 100%;

    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;

    white-space: normal;
}

@media (max-width: 768px) {
    .qacp-credit {
        padding: 9px 10px;
        font-size: 11px;
        line-height: 17px;
    }

    .qacp-credit-logo {
        width: 20px;
        height: 20px;

        min-width: 20px;
        min-height: 20px;
        max-width: 20px;
        max-height: 20px;
    }
}

@media (max-width: 480px) {
    .qacp-credit {
        padding: 8px 8px;
        font-size: 11px;
        line-height: 16px;
    }

    .qacp-credit a {
        gap: 6px;
    }

    .qacp-credit-logo {
        width: 18px;
        height: 18px;

        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
}

/* =========================================================
   Qick.VN Safe Add-ons
   - WooCommerce "Xem giỏ hàng" nằm dưới hàng nút
   - DevVN Quick Buy button style
   - Credit footer
========================================================= */

.qacp-product-actions {
    flex-wrap: wrap !important;
    overflow: visible !important;
}

.qacp-product-actions .added_to_cart,
.qacp-product-actions .added_to_cart.wc-forward {
    flex: 0 0 100% !important;
    order: 20 !important;

    display: block !important;
    width: 100% !important;
    max-width: 100% !important;

    margin: 3px 0 0 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    color: #0073ff !important;
    font-size: 12px !important;
    line-height: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    white-space: normal !important;
}

.qacp-product-actions .added_to_cart:hover,
.qacp-product-actions .added_to_cart.wc-forward:hover {
    color: var(--qacp-red) !important;
    background: transparent !important;
    text-decoration: none !important;
}

.qacp-product-card:has(.qacp-product-actions .added_to_cart) {
    height: 440px;
    min-height: 440px;
    max-height: 440px;
}

.qacp-product-card:has(.qacp-promo-banner):has(.qacp-product-actions .added_to_cart) {
    height: 455px;
    min-height: 455px;
    max-height: 455px;
}

.qacp-product-actions .qacp-buy-now.devvn_buy_now,
.qacp-product-actions .qacp-buy-now.devvn_buy_now_ajax {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;

    margin: 0 !important;
    padding: 0 10px !important;

    background: var(--qacp-red) !important;
    color: #ffffff !important;
    border: 1px solid var(--qacp-red) !important;
    border-radius: 4px !important;

    font-size: 12px !important;
    line-height: 36px !important;
    font-weight: 800 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.qacp-product-actions .qacp-buy-now.devvn_buy_now:hover,
.qacp-product-actions .qacp-buy-now.devvn_buy_now_ajax:hover {
    background: #b90000 !important;
    border-color: #b90000 !important;
    color: #ffffff !important;
}

.qacp-credit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 0;
    padding: 10px 12px;

    background: #ffffff;
    color: #555555;
    border-top: 1px solid rgba(0,0,0,.06);

    font-size: 12px;
    line-height: 18px;
    font-weight: 500;
    text-align: center;
    box-sizing: border-box;
}

.qacp-credit a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: inherit;
    text-decoration: none;
    max-width: 100%;
}

.qacp-credit a:hover {
    color: var(--qacp-red);
    text-decoration: none;
}

.qacp-credit-logo {
    display: inline-block;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;

    object-fit: contain;
    object-position: center center;
    margin: 0;
    padding: 0;
    border: 0;
}

.qacp-credit-logo-dark {
    filter: grayscale(1) brightness(.25);
}

.qacp-credit-logo-white {
    filter: brightness(0) invert(1);
}

.qacp-credit-text {
    display: inline-block;
    max-width: 100%;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    white-space: normal;
}

@media (max-width: 768px) {
    .qacp-credit {
        padding: 9px 10px;
        font-size: 11px;
        line-height: 17px;
    }

    .qacp-credit-logo {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
        max-width: 20px;
        max-height: 20px;
    }
}

@media (max-width: 480px) {
    .qacp-credit {
        padding: 8px 8px;
        font-size: 11px;
        line-height: 16px;
    }

    .qacp-credit a {
        gap: 6px;
    }

    .qacp-credit-logo {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
}

.qacp-wrapper.qacp-no-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.qacp-wrapper.qacp-no-header .qacp-row-products {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.qacp-wrapper.qacp-no-header .qacp-products-viewport {
    margin-top: 0 !important;
    padding-top: 0 !important;
}