.most-popular-pulse {
    border-radius: 8px;
    animation: alligator-most-popular-pulse 2.4s ease-in-out infinite;
}

.itemsingleimage { position: relative; }
.most-popular-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 4px;
}

@keyframes alligator-most-popular-pulse {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% {
        box-shadow: 0 0 0 7px var(--main-color);
        box-shadow: 0 0 0 7px color-mix(in srgb, var(--main-color) 45%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .most-popular-pulse { animation: none; }
}

.flash-sale-panel {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    z-index: 1040;
    box-sizing: border-box;
    width: min(330px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, .24);
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    visibility: hidden;
    transition: transform .65s cubic-bezier(.2, .85, .25, 1), opacity .4s ease, visibility .65s;
}
.flash-sale-panel.flash-sale-rtl {
    right: auto;
    left: 12px;
    transform: translateX(calc(-100% - 24px));
}
.flash-sale-panel.is-visible {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}
.flash-sale-panel-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 30px;
    margin: -4px 0 6px;
}
.flash-sale-close {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #222;
    font-size: 23px;
    line-height: 24px;
    cursor: pointer;
}
.flash-sale-panel .flash-sale-grid-item { width: 100%; padding: 0; float: none; }
.flash-sale-panel .flash-sale-product-card { position: relative; margin: 0 !important; }
.flash-sale-panel .flash-sale-product-card a { display: block; color: inherit; text-decoration: none; }
.flash-sale-panel .cs-product-card.cs-card img { height: 185px; object-fit: cover; }
.flash-sale-panel .cs-card-content { padding: 10px 8px 4px; }
.flash-sale-panel .cs-card-content h4 { margin: 6px 0; font-size: 15px; white-space: normal; }
.flash-sale-panel .cs-card-content p { margin: 4px 0; }
.flash-sale-panel .nb-product-media { height: 185px; min-height: 0; max-height: 185px; margin-bottom: 8px; }
.flash-sale-panel .nb-product-media img { height: 185px; object-fit: cover; }
.flash-sale-panel .nb-product-content { padding: 2px 4px 6px; }
.flash-sale-panel .nb-product-badge-row { top: 12px; left: 12px; }
.flash-sale-panel .nb-product-price { margin-top: 4px; }
.flash-sale-panel .discount_btn { z-index: 2; }
.flash-sale-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f1;
    color: #b4232c;
    font-weight: 700;
}
.flash-sale-timer strong {
    color: #b4232c;
    font-size: 23px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}
body.dark-mode .flash-sale-panel {
    background: #1e1e1e;
    color: #fff;
}
body.dark-mode .flash-sale-panel .flash-sale-product-card,
body.dark-mode .flash-sale-panel .flash-sale-close,
body.dark-mode .flash-sale-panel .flash-sale-timer {
    background: #333;
}
body.dark-mode .flash-sale-panel .flash-sale-close,
body.dark-mode .flash-sale-panel .nb-product-title,
body.dark-mode .flash-sale-panel .nb-product-price,
body.dark-mode .flash-sale-panel .cs-card-content h4 {
    color: #fff;
}
body.dark-mode .flash-sale-panel .flash-sale-timer,
body.dark-mode .flash-sale-panel .flash-sale-timer strong {
    color: #ff7479;
}
@media (max-width: 600px) {
    .flash-sale-panel { top: max(8px, env(safe-area-inset-top)); right: 8px; width: min(290px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 8px; }
    .flash-sale-panel.flash-sale-rtl { right: auto; left: 8px; }
    .flash-sale-panel .cs-product-card.cs-card img,
    .flash-sale-panel .nb-product-media,
    .flash-sale-panel .nb-product-media img { height: 145px; max-height: 145px; }
}
@media (prefers-reduced-motion: reduce) {
    .flash-sale-panel { transition-duration: .01ms; }
}
