.kkdd-wrapper {
    padding: 16px;
    border-radius: 12px;
    margin: 20px 0;
    box-sizing: border-box;
}
.kkdd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.kkdd-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.kkdd-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.kkdd-category-label {
    font-size: 0.9rem;
    opacity: 0.8;
}
.kkdd-preview-badge {
    font-size: 0.8rem;
    background: #fff3cd;
    border-radius: 999px;
    padding: 2px 10px;
}
.kkdd-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kkdd-view-all {
    text-decoration: none;
    font-weight: 500;
}
.kkdd-timer {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.kkdd-timer-countdown {
    font-weight: 700; /* فقط بولد، بدون font-family */
}


.kkdd-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 4px;
}
.kkdd-carousel::-webkit-scrollbar {
    height: 4px;
}
.kkdd-carousel::-webkit-scrollbar-thumb {
    border-radius: 999px;
}

.kkdd-item {
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    text-align: center;
}
.kkdd-link {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
}
.kkdd-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.kkdd-product-title {
    font-size: 0.9rem;
    margin: 6px 0 4px;
    text-align: center;
}
.kkdd-price {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.9rem;
    align-items: center;
    text-align: center;
}
.kkdd-regular {
    text-decoration: line-through;
    opacity: 0.7;
}
.kkdd-sale {
    font-weight: 700;
}
.kkdd-outofstock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

/* ریبون درصد تخفیف */
.kkdd-discount-badge {
    position: absolute;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
    z-index: 2;
}
.kkdd-discount-top-right {
    top: 8px;
    right: 8px;
}
.kkdd-discount-top-left {
    top: 8px;
    left: 8px;
}
.kkdd-discount-bottom-right {
    bottom: 8px;
    right: 8px;
}
.kkdd-discount-bottom-left {
    bottom: 8px;
    left: 8px;
}

/* ۴ تا آیتم در دسکتاپ، و حدود ۷۰٪ عرض در موبایل */
@media (min-width: 768px) {
    .kkdd-item {
        flex: 0 0 calc(25% - 9px);
        min-width: 0;
    }
}
@media (max-width: 767px) {
    .kkdd-item {
        flex: 0 0 70%;
        min-width: 70%;
    }
}

.kkdd-no-items {
    margin: 0 0 10px;
}


/* هدر کروسل در موبایل: عنوان راست، تایمر چپ در یک خط */
@media (max-width: 767px) {
    .kkdd-header {
        flex-wrap: nowrap;
    }

    .kkdd-header-left,
    .kkdd-header-right {
        flex: 1 1 0;
    }

    .kkdd-header-left {
        justify-content: flex-start;  /* در RTL یعنی سمت راست */
    }

    .kkdd-header-right {
        justify-content: flex-end;    /* سمت چپ */
    }
}

