/* ==================== BEST DEAL + NEW ARRIVALS ==================== */
.dt-deals {
    --dt-orange: #ff7a00;
    --dt-ink: #1a1a1a;
    --dt-line: #ececec;
    --dt-deal-bg: #111111;
    --dt-ease: cubic-bezier(0.22, 1, 0.36, 1);

    max-width: 1320px;
    margin: 64px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 11fr) minmax(0, 12fr);
    gap: 24px;
    align-items: stretch;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.dt-deals--no-deal {
    grid-template-columns: minmax(0, 1fr);
}

.dt-deals__deal {
    display: flex;
}

/* ==================== Deal card ==================== */
.dt-deal {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 24px 24px;
    border-radius: 20px;
    background:
        radial-gradient(120% 90% at 20% 30%, rgba(255, 122, 0, 0.16) 0%, rgba(255, 122, 0, 0) 55%),
        var(--dt-deal-bg);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

/* Thin orange rim that glows along the edge */
.dt-deal::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.6), rgba(255, 122, 0, 0) 40%, rgba(255, 122, 0, 0) 70%, rgba(255, 122, 0, 0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.dt-deal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dt-deal__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.dt-deal__label i {
    color: var(--dt-orange);
    animation: dt-deal-flicker 2.4s ease-in-out infinite;
}

.dt-deal__badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--dt-orange);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 8px 20px -8px rgba(255, 122, 0, 0.9);
}

.dt-deal__main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 22px;
    align-items: center;
}

/* ---------- Image ---------- */
.dt-deal__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 16px;
    background: linear-gradient(160deg, #1d1d1d 0%, #0b0b0b 100%);
    overflow: hidden;
}

.dt-deal__glow {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 0, 0.45) 0%, rgba(255, 122, 0, 0) 70%);
    animation: dt-deal-breathe 4s ease-in-out infinite;
}

.dt-deal__media img {
    position: relative;
    width: 82%;
    height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.6));
    transition: transform 0.6s var(--dt-ease);
    animation: dt-deal-float 6s ease-in-out infinite;
}

.dt-deal__media img.is-placeholder {
    width: 36%;
    height: 36%;
    opacity: 0.35;
    filter: none;
}

.dt-deal:hover .dt-deal__media img {
    transform: scale(1.06);
}

/* ---------- Info ---------- */
.dt-deal__brand {
    display: block;
    margin-bottom: 6px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dt-orange);
}

.dt-deal__name {
    margin: 0 0 8px;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    font-weight: 800;
    line-height: 1.25;
}

.dt-deal__name a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dt-deal__name a:hover {
    color: var(--dt-orange);
    text-decoration: none;
}

.dt-deal__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.dt-deal__rating .dt-stars__base {
    color: rgba(255, 255, 255, 0.18);
}

.dt-deal__rating .dt-product__reviews {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
}

.dt-deal__text {
    margin: 0 0 14px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
}

.dt-deal__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.dt-deal__now {
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    font-weight: 800;
    color: #fff;
}

.dt-deal__was {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
}

.dt-deal__save {
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    font-size: 0.7rem;
    font-weight: 700;
}

.dt-deal__stock {
    margin: 10px 0 0;
    font-size: 0.74rem;
    font-weight: 600;
    color: #ffb070;
}

.dt-deal__stock i {
    margin-right: 4px;
    color: var(--dt-orange);
}

/* ---------- Countdown + actions ---------- */
.dt-deal__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dt-countdown__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.dt-countdown__units {
    display: flex;
    gap: 8px;
}

.dt-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 54px;
    padding: 8px 6px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dt-countdown__unit b {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.dt-countdown__unit:last-child b {
    color: var(--dt-orange);
}

.dt-countdown__unit b.is-tick {
    animation: dt-countdown-tick 0.4s var(--dt-ease);
}

.dt-countdown__unit small {
    margin-top: 4px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.dt-countdown__ended {
    display: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.dt-countdown.is-ended .dt-countdown__units {
    display: none;
}

.dt-countdown.is-ended .dt-countdown__ended {
    display: block;
}

.dt-deal__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* The shared wishlist heart, restyled for the dark card */
.dt-deal__actions .dt-product__wish {
    position: static;
    width: 46px;
    height: 46px;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1rem;
}

.dt-deal__actions .dt-product__wish:hover {
    color: var(--dt-orange);
    border-color: var(--dt-orange);
}

.dt-deal__actions .dt-product__wish.is-active {
    color: #fff;
    background: var(--dt-orange);
    border-color: var(--dt-orange);
}

.dt-deal__cta {
    height: 46px;
    padding: 0 22px;
    font-size: 0.74rem;
}

/* ==================== New arrivals ==================== */
.dt-deals__new {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dt-deals__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dt-deals__grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dt-deals--no-deal .dt-deals__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dt-deals__grid > li {
    display: flex;
}

/* ---------- Keyframes ---------- */
@keyframes dt-deal-breathe {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50%      { transform: scale(1.08); opacity: 1; }
}

@keyframes dt-deal-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -8px; }
}

@keyframes dt-deal-flicker {
    0%, 100% { opacity: 1; }
    45%      { opacity: 1; }
    50%      { opacity: 0.45; }
    55%      { opacity: 1; }
}

@keyframes dt-countdown-tick {
    0%   { transform: translateY(-35%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ---------- Laptop: tighter deal card ---------- */
@media (max-width: 1199.98px) {
    .dt-deal__main {
        grid-template-columns: minmax(0, 1fr);
    }

    .dt-deal__media {
        aspect-ratio: 16 / 9;
    }

    .dt-deal__media img {
        width: auto;
        height: 86%;
    }

    .dt-deal__foot {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-deal__actions .dt-deal__cta {
        flex: 1;
    }

    .dt-deals--no-deal .dt-deals__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ---------- Tablet: stacked, deal card goes wide again ---------- */
@media (max-width: 991.98px) {
    .dt-deals {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        margin-top: 56px;
    }

    .dt-deal__main {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }

    .dt-deal__media {
        aspect-ratio: 1;
    }

    .dt-deal__media img {
        width: 82%;
        height: 82%;
    }

    .dt-deal__foot {
        flex-direction: row;
        align-items: flex-end;
    }

    .dt-deal__actions .dt-deal__cta {
        flex: 0 0 auto;
    }

    .dt-deals--no-deal .dt-deals__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .dt-deals {
        gap: 36px;
        margin-top: 44px;
        padding: 0;
    }

    .dt-deals__deal {
        padding: 0 16px;
    }

    /* Deal: image on top, then info, then a full-width countdown + CTA */
    .dt-deal {
        gap: 16px;
        padding: 18px 16px 18px;
        border-radius: 18px;
    }

    .dt-deal__main {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .dt-deal__media {
        aspect-ratio: 4 / 3;
    }

    .dt-deal__media img {
        width: auto;
        height: 80%;
    }

    .dt-deal__text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .dt-deal__foot {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .dt-countdown__units {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dt-countdown__unit {
        min-width: 0;
    }

    .dt-deal__actions .dt-deal__cta {
        flex: 1;
    }

    /* New arrivals: swipeable catalog row, like the categories */
    .dt-deals__head {
        padding: 0 16px;
        margin-bottom: 14px;
    }

    .dt-deals__grid,
    .dt-deals--no-deal .dt-deals__grid {
        display: flex;
        gap: 12px;
        padding: 4px 16px 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dt-deals__grid::-webkit-scrollbar {
        display: none;
    }

    .dt-deals__grid > li {
        flex: 0 0 58%;
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dt-deal__label i,
    .dt-deal__glow,
    .dt-deal__media img,
    .dt-countdown__unit b.is-tick {
        animation: none;
    }
}
