/* Homepage discount showcase — intentionally plain CSS so its visual design
 * does not depend on Tailwind generating runtime PHP utility strings.
 *
 * Colour policy: the covers are the content and they are already fully
 * saturated, so the chrome around them stays neutral. Orange is rationed to
 * exactly two places — the discount stamp and the countdown — because an
 * accent only reads as an accent when nothing else is wearing it. Everything
 * else (panel, borders, labels) is neutral, and the price wins on value
 * contrast (pure white on near-black) rather than on hue. */
#mz-market-section .mz-market-drop {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    background: linear-gradient(180deg, #101013 0%, #0c0c0e 46%, #08080a 100%);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.05);
}

#mz-market-section .mz-market-drop::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

/* Homepage manga titles mirror the single-manga title treatment. */
.mz-home-manga-title {
    font-family: 'Amaranth', 'Inter', 'Space Grotesk', 'Vazirmatn', sans-serif !important;
    letter-spacing: 0;
}

/* The rail itself is the only element promoted during a drag, instead of
 * creating expensive compositing layers for every cover and decorative glow. */
#mz-market-section .mz-market-carousel .swiper-wrapper {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

#mz-market-section .mz-market-drop-header {
    position: relative;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#mz-market-section .mz-market-drop-icon {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #d4d4d8 !important;
    box-shadow: none !important;
}

/* ---- Countdown: the one element allowed to shout, since urgency is the only
 * thing here that earns it (and it expires on its own). Single warm hue
 * instead of the old orange/red/pink three-stop gradient, and no
 * backdrop-filter — it sits on an opaque panel, so the blur bought nothing
 * and cost compositing on low-end phones. */
#mz-market-section #discountCountdown {
    background: rgba(190, 25, 60, 0.16) !important;
    border-color: rgba(251, 113, 133, 0.4) !important;
    box-shadow: 0 0 22px rgba(225, 29, 72, 0.3), inset 0 1px rgba(255, 255, 255, 0.07) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    animation: mz-deal-pulse 3.2s ease-in-out infinite;
}

/* A slow breath reads as "still running" far better than the old one-shot
 * bounce, which fired once on scroll and was never seen again. */
@keyframes mz-deal-pulse {
    0%, 100% {
        box-shadow: 0 0 18px rgba(225, 29, 72, 0.22), inset 0 1px rgba(255, 255, 255, 0.07);
    }
    50% {
        box-shadow: 0 0 32px rgba(225, 29, 72, 0.42), inset 0 1px rgba(255, 255, 255, 0.07);
    }
}

@media (prefers-reduced-motion: reduce) {
    #mz-market-section #discountCountdown {
        animation: none;
    }
}

#mz-market-section #discountCountdown i {
    color: #fda4af !important;
}

#mz-market-section #discountCountdown .text-\[10px\] {
    color: #d4d4d8 !important;
}

#mz-market-section #countdownHours,
#mz-market-section #countdownMinutes,
#mz-market-section #countdownSeconds {
    background: rgba(225, 29, 72, 0.3) !important;
    color: #fff !important;
}

/* ---- Cover: neutral frame, art at full strength. */
#mz-market-section .mz-market-deal-cover {
    margin-bottom: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-bottom: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    background: #131316;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45) !important;
}

#mz-market-section .mz-market-deal-cover img {
    opacity: 1 !important;
}

/* The title overlay sits above the cover image and its bottom edge is the seam,
 * so it carries the upper half of each perforation punch. Earlier entries in a
 * background-image list paint on top, so the notches come before the scrim. */
#mz-market-section .mz-market-deal-title {
    background:
        radial-gradient(circle at left bottom, var(--mz-notch) 5.5px, transparent 6px),
        radial-gradient(circle at right bottom, var(--mz-notch) 5.5px, transparent 6px),
        linear-gradient(to top, rgba(6, 6, 8, 1), rgba(6, 6, 8, 0.9) 52%, rgba(6, 6, 8, 0.35) 78%, transparent) !important;
    background-repeat: no-repeat !important;
}

#mz-market-section .mz-market-deal-title h3 {
    display: inline-block;
    max-width: 100%;
    padding: 0.28rem 0.48rem;
    border-right: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.3rem;
    background: rgba(5, 5, 6, 0.72);
    color: #fff !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

/* ---- Type badges: scoped to this section only, so the rest of the site is
 * untouched. Colour-coding survives — it moves from a saturated fill + glow
 * onto the text, which keeps the type readable at a glance without three
 * competing hues inside a 190px card. */
#mz-market-section .manga-type-badge {
    opacity: 1 !important;
    background: rgba(9, 9, 11, 0.74) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    text-shadow: none !important;
}

#mz-market-section .manga-type-manga {
    color: #fca5a5 !important;
    border-color: rgba(252, 165, 165, 0.26);
}

#mz-market-section .manga-type-manhwa {
    color: #93c5fd !important;
    border-color: rgba(147, 197, 253, 0.26);
}

#mz-market-section .manga-type-manhua {
    color: #d8b4fe !important;
    border-color: rgba(216, 180, 254, 0.26);
}

#mz-market-section .manga-type-comic {
    color: #fcd34d !important;
    border-color: rgba(252, 211, 77, 0.26);
}

/* ---- Ticket: flat neutral surface so the stamp and the price are the only
 * things with any weight.
 *
 * The cover-over-stub already reads as a coupon, so the seam is finished as a
 * perforation: the ticket's existing top border becomes the dashed tear line,
 * and two radial-gradient "punches" notch the ends. Drawing the notches as
 * background circles rather than pseudo-elements means nothing has to escape
 * the overflow:hidden that keeps the stamp inside the rounded corners.
 *
 * --mz-notch is the panel colour showing through the hole. The panel is a
 * gradient, but cards sit where it reads ~#0b0b0d, so a flat value is within a
 * couple of RGB units the whole way down. */
#mz-market-section .mz-market-drop {
    --mz-notch: #0b0b0d;
    /* The rail sits on the raised panel, not the page background, so the edge
     * fades defined in carousel-swiper.css dissolve into the panel instead. */
    --mz-rail-fade: #0b0b0d;
}

#mz-market-section .mz-market-deal-ticket {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.16) !important;
    border-radius: 0 0 16px 16px !important;
    background-color: #101013 !important;
    background-image:
        radial-gradient(circle at left top, var(--mz-notch) 5.5px, transparent 6px),
        radial-gradient(circle at right top, var(--mz-notch) 5.5px, transparent 6px) !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38) !important;
}

/* ---- The accent. Same hue as before, roughly a sixth of the ink: a tinted
 * panel instead of a solid orange-to-rose gradient. It reads louder than the
 * old block did precisely because it is now the only orange nearby. */
/* The stamp is the first flex child, so under RTL it sits at the right edge and
 * would paint over the ticket's right-hand notch. It carries its own punch so
 * the hole stays clean instead of showing a tinted crescent. */
#mz-market-section .mz-deal-stamp {
    width: 44px;
    border-left: 1px solid rgba(251, 146, 60, 0.26) !important;
    background-color: rgba(251, 146, 60, 0.13) !important;
    background-image: radial-gradient(circle at right top, var(--mz-notch) 5.5px, transparent 6px) !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
}

#mz-market-section .mz-deal-stamp > span:first-child {
    color: rgba(253, 186, 116, 0.72) !important;
}

#mz-market-section .mz-deal-stamp > span:last-child {
    color: #fdba74 !important;
}

#mz-market-section .mz-deal-body {
    min-height: 64px;
}

/* "قیمت ویژه" label — neutral, so it frames the number instead of competing. */
#mz-market-section .mz-deal-body > div:first-child > span:first-child {
    color: #8b8b93 !important;
}

/* Pure white beats any hue for prominence on near-black. */
#mz-market-section .mz-deal-price {
    color: #ffffff !important;
}

/* "استلار" unit */
#mz-market-section .mz-deal-price + span {
    color: #a1a1aa !important;
}

#mz-market-section .mz-deal-original {
    border-right-color: rgba(255, 255, 255, 0.1) !important;
}

/* The struck price is the number we want ignored, so it gets no colour. */
#mz-market-section .mz-deal-original span:last-child {
    color: #6b6b73 !important;
    text-decoration-color: rgba(255, 255, 255, 0.3) !important;
}

@media (hover: hover) {
    #mz-market-section .mz-market-deal-ticket:hover {
        border-color: rgba(251, 146, 60, 0.34) !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.45) !important;
    }

    #mz-market-section .mz-market-deal-ticket:hover .mz-deal-stamp {
        background: rgba(251, 146, 60, 0.2) !important;
    }
}

@media (max-width: 767px) {
    #mz-market-section .mz-market-drop::before {
        display: none;
    }

    #mz-market-section .mz-market-drop {
        padding: 1rem;
        border-radius: 20px;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
    }

    #mz-market-section .mz-market-drop-header {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    #mz-market-section .mz-market-deal-cover {
        border-radius: 13px 13px 0 0 !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.30) !important;
    }

    #mz-market-section .mz-market-deal-ticket {
        border-radius: 0 0 13px 13px !important;
        box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26) !important;
    }
}
