/* ============================================================
   DRAPE MARQUEE — Frontend CSS
   Pure CSS infinite scroll animation, no JS required for motion
============================================================ */

/* ── Keyframe ──────────────────────────────────────────── */
@keyframes dm-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Strip (outer wrapper) ─────────────────────────────── */
.dm-strip {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: stretch;
    /* Default BG — overridden by Elementor background control */
    background: #b8965a;
    padding: 12px 0;
}

/* ── Label box ─────────────────────────────────────────── */
.dm-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,.25);
    /* Right separator */
    border-right: 1px solid rgba(255,255,255,.2);
}

/* ── Viewport (clips overflow) ─────────────────────────── */
.dm-viewport {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    min-width: 0;
}

/* ── Fade edge pseudo-elements ─────────────────────────── */
.dm-has-fade .dm-viewport::before,
.dm-has-fade .dm-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 2;
}
.dm-has-fade .dm-viewport::before {
    left: 0;
    background: linear-gradient(to right, #b8965a, transparent);
}
.dm-has-fade .dm-viewport::after {
    right: 0;
    background: linear-gradient(to left, #b8965a, transparent);
}

/* ── Track (scrolling row) ─────────────────────────────── */
.dm-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    /* Looping animation — duration set inline by widget */
    animation: dm-scroll 25s linear infinite;
    will-change: transform;
}

/* ── Pause on hover ────────────────────────────────────── */
.dm-pause-hover:hover .dm-track {
    animation-play-state: paused;
}

/* ── Single item ───────────────────────────────────────── */
.dm-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    cursor: default;
    padding: 0 4px;
    border-radius: 0;
    transition: background .2s, color .2s;
}
.dm-item[href] {
    cursor: pointer;
    text-decoration: none;
}
.dm-item[href]:hover .dm-item-text {
    opacity: .85;
}

/* ── Text group (stacked EN + BN) ──────────────────────── */
.dm-text-group {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

/* ── Text ──────────────────────────────────────────────── */
.dm-item-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #fff;
    line-height: 1.4;
    display: block;
}

/* ── Bengali / second text ─────────────────────────────── */
.dm-item-bn {
    font-size: 10px;
    color: rgba(255,255,255,.7);
    display: block;
    letter-spacing: .3px;
    line-height: 1.3;
}

/* ── Icon / Emoji ──────────────────────────────────────── */
.dm-icon {
    font-size: 14px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.dm-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}
.dm-icon i {
    font-size: inherit;
    line-height: 1;
}

/* ── Separator ─────────────────────────────────────────── */
.dm-sep {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,.45);
    font-size: 12px;
    flex-shrink: 0;
    /* Margin set inline by widget based on spacing control */
    margin: 0 28px;
    user-select: none;
    pointer-events: none;
}
.dm-sep-line {
    width: 1px;
    height: 1em;
    background: currentColor;
    display: inline-block;
    vertical-align: middle;
    margin: 0 28px;
}

/* ── Item Badge ────────────────────────────────────────── */
.dm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0,0,0,.25);
    flex-shrink: 0;
    line-height: 1.5;
}
.dm-badge-new  { background: #3d7a52; }
.dm-badge-sale { background: #b84040; }
.dm-badge-hot  { background: #c47a2a; }
.dm-badge-free { background: #3a72b0; }

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .dm-track { animation: none; }
}
