/* ════════════════════════════════════════════════════════════════════
   YS Discount Slider v2  ·  © Youssry Shaheen  ·  All rights reserved
   ════════════════════════════════════════════════════════════════════ */

/* ── Custom properties (set inline per-instance) ─────────────────── */
.ys-ds-section {
    --ys-primary:     #c0392b;
    --ys-title-color: #1a1a1a;
    --ys-name-color:  #1a1a1a;
    --ys-sale-color:  #c0392b;
    --ys-reg-color:   #999;
    --ys-btn-bg:      #c0392b;
    --ys-btn-text:    #fff;
    --ys-card-bg:     #fff;
    --ys-radius:      12px;
    --ys-gap:         16px;
    --ys-shadow:      0 3px 16px rgba(0,0,0,.09);
    --ys-trans:       0.4s cubic-bezier(.4,0,.2,1);

    box-sizing: border-box;
    margin: 32px 0;
    width: 100%;
}
.ys-ds-section *,
.ys-ds-section *::before,
.ys-ds-section *::after { box-sizing: border-box; }

/* ── Header row ─────────────────────────────────────────────────── */
.ys-ds-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ys-ds-section-title {
    font-size: clamp(1.15rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: var(--ys-title-color);
    margin: 0;
    position: relative;
    padding-bottom: 8px;
}
.ys-ds-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 48px;
    height: 3px;
    background: var(--ys-primary);
    border-radius: 2px;
}

.ys-ds-viewall {
    font-size: .85rem;
    font-weight: 600;
    color: var(--ys-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s;
}
.ys-ds-viewall:hover { opacity: .75; }

/* ── Slider wrapper ─────────────────────────────────────────────── */
.ys-ds-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Track ──────────────────────────────────────────────────────── */
.ys-ds-track-outer {
    overflow: hidden;
    flex: 1;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.ys-ds-track-outer:active { cursor: grabbing; }

.ys-ds-track {
    display: flex;
    gap: var(--ys-gap);
    transition: transform var(--ys-trans);
    will-change: transform;
    align-items: stretch;  /* equal-height cards */
}

/* ── Card ───────────────────────────────────────────────────────── */
.ys-ds-card {
    /* width set by JS for precise pixel accuracy */
    flex-shrink: 0;
    background: var(--ys-card-bg);
    border-radius: var(--ys-radius);
    box-shadow: var(--ys-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.ys-ds-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
}

/* ── Image area – always fills frame ───────────────────────────── */
.ys-ds-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Fixed aspect-ratio so all cards identical height regardless of image */
    padding-top: 78%;   /* ~4:3 portrait */
    background: #f4f4f4;
    flex-shrink: 0;
}
.ys-ds-img-link img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* fills frame, no empty space */
    object-position: center;
    transition: transform .4s ease;
    display: block;
}
.ys-ds-card:hover .ys-ds-img-link img {
    transform: scale(1.06);
}

/* ── Badge ──────────────────────────────────────────────────────── */
.ys-ds-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: var(--ys-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: .4px;
    text-transform: uppercase;
    pointer-events: none;
    line-height: 1.4;
}

/* ── Card body ──────────────────────────────────────────────────── */
.ys-ds-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 7px;
}

/* ── Product name ───────────────────────────────────────────────── */
.ys-ds-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ys-name-color);
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ys-ds-name:hover { color: var(--ys-primary); }

/* ── Stars ──────────────────────────────────────────────────────── */
.ys-ds-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}
.ys-ds-star        { color: #ddd; font-size: .85rem; }
.ys-ds-star.filled { color: #f5a623; }
.ys-ds-rating-count { font-size: .73rem; color: #999; margin-inline-start: 3px; }

/* ── Prices ─────────────────────────────────────────────────────── */
.ys-ds-prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}
.ys-ds-sale    { font-size: .95rem; font-weight: 700; color: var(--ys-sale-color); }
.ys-ds-regular { font-size: .78rem; color: var(--ys-reg-color); text-decoration: line-through; }

/* ── Button ─────────────────────────────────────────────────────── */
.ys-ds-btn {
    display: block;
    margin-top: auto;
    background: var(--ys-btn-bg);
    color: var(--ys-btn-text) !important;
    text-align: center;
    padding: 9px 10px;
    border-radius: calc(var(--ys-radius) * .55);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .2s, transform .15s;
    letter-spacing: .2px;
}
.ys-ds-btn:hover { filter: brightness(1.1); transform: scale(1.02); }

/* ── Arrows ─────────────────────────────────────────────────────── */
.ys-ds-arrow {
    flex-shrink: 0;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 50%;
    width: 42px; height: 42px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #555;
    padding: 0; line-height: 1;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.ys-ds-arrow:hover {
    background: var(--ys-primary);
    border-color: var(--ys-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.15);
}

/* ── Dots ───────────────────────────────────────────────────────── */
.ys-ds-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.ys-ds-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ddd;
    border: none; cursor: pointer; padding: 0;
    transition: background .3s, width .3s;
}
.ys-ds-dot.active {
    background: var(--ys-primary);
    width: 22px;
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

/* Tablet: max 3 visible  (handled in JS, just ensure correct arrow sizing) */
@media (max-width: 1024px) {
    .ys-ds-arrow { width: 36px; height: 36px; font-size: 1.3rem; }
}

/* Phablet (480–767px): 2 visible */
@media (max-width: 767px) {
    .ys-ds-section { margin: 20px 0; }
    .ys-ds-arrow   { width: 30px; height: 30px; font-size: 1.1rem; }
    .ys-ds-card-body { padding: 9px 10px 12px; gap: 5px; }
    .ys-ds-name    { font-size: .82rem; }
    .ys-ds-sale    { font-size: .88rem; }
    .ys-ds-btn     { font-size: .78rem; padding: 7px 8px; }
    .ys-ds-badge   { font-size: .62rem; padding: 2px 7px; }
}

/* Mobile < 480px: still 2 side-by-side (JS sets perView=2 too) */
@media (max-width: 479px) {
    .ys-ds-arrow { width: 26px; height: 26px; font-size: 1rem; border-width: 1px; }
    .ys-ds-img-link { padding-top: 85%; }  /* slightly taller on tiny screens */
}

/* ── RTL direction ──────────────────────────────────────────────── */
[dir="rtl"] .ys-ds-track { direction: rtl; }


/* ════════════════════════════════════════════════════════════════════
   PREMIUM BUTCHER IDENTITY — GOLD / OLIVE v2.1.0
   Visual override only. Slider functionality remains unchanged.
   ════════════════════════════════════════════════════════════════════ */

.ys-ds-section {
    --ys-pb-olive:       #2D2B16;
    --ys-pb-olive-dark:  #211F0D;
    --ys-pb-olive-mid:   #38351A;
    --ys-pb-gold:        #F2BE42;
    --ys-pb-gold-light:  #FFF0A8;
    --ys-pb-gold-mid:    #D99A19;
    --ys-pb-gold-dark:   #9B6108;
    --ys-pb-cream:       #F8EFCF;
    --ys-pb-black:       #111111;

    position: relative;
    isolation: isolate;
    margin: 0 !important;
    padding: 44px 28px 48px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% -20%, rgba(255,224,138,.12), transparent 36%),
        radial-gradient(circle at 95% 100%, rgba(198,135,22,.06), transparent 28%),
        repeating-linear-gradient(-45deg, transparent 0 34px, rgba(242,190,66,.022) 34px 36px),
        linear-gradient(135deg, #211F0D 0%, #2D2B16 54%, #38351A 100%);
    border-top: 1px solid rgba(255,224,138,.22);
    border-bottom: 1px solid rgba(155,97,8,.56);
    box-shadow:
        inset 0 1px 0 rgba(255,241,174,.05),
        inset 0 -1px 0 rgba(0,0,0,.32);
}

.ys-ds-section::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        112deg,
        transparent 0%,
        transparent 40%,
        rgba(255,255,255,0) 45%,
        rgba(255,244,193,.026) 49%,
        rgba(255,255,255,.060) 50%,
        rgba(255,244,193,.025) 52%,
        transparent 58%,
        transparent 100%
    );
    background-size: 250% 100%;
    animation: ys-pb-section-sheen 12s linear infinite;
}

.ys-ds-section > * {
    position: relative;
    z-index: 1;
}

/* Header */
.ys-ds-header {
    align-items: center !important;
    margin: 0 auto 28px !important;
    max-width: 1380px;
    gap: 14px !important;
}

.ys-ds-section-title {
    font-size: clamp(1.65rem, 2.5vw, 2.35rem) !important;
    font-weight: 800 !important;
    line-height: 1.15;
    padding-bottom: 12px !important;
    background: linear-gradient(
        105deg,
        #9B6108 0%,
        #D69618 14%,
        #FFD45A 31%,
        #FFF3B9 47%,
        #F2BE42 61%,
        #B66E09 80%,
        #FFE08A 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.30));
    animation: ys-pb-title-gold-shine 6.8s linear infinite;
}

.ys-ds-section-title::after {
    width: 70px !important;
    height: 3px !important;
    background: linear-gradient(90deg, #9B6108, #F2BE42, #FFF0A8, #D69618) !important;
    box-shadow: 0 0 10px rgba(242,190,66,.32);
}

.ys-ds-viewall {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 19px;
    border-radius: 999px;
    border: 1px solid rgba(255,224,138,.65);
    background: linear-gradient(145deg, rgba(255,224,138,.07), rgba(198,135,22,.02));
    color: #FFE08A !important;
    font-size: .88rem !important;
    font-weight: 750 !important;
    opacity: 1 !important;
    transition: transform .22s ease, box-shadow .22s ease, color .22s ease;
}

.ys-ds-viewall:hover {
    color: #111 !important;
    transform: translateY(-2px);
    background: linear-gradient(135deg, #A96509 0%, #E2A11A 26%, #FFD45A 46%, #FFF0A8 54%, #D89613 76%, #9B6108 100%);
    box-shadow: 0 8px 22px rgba(242,190,66,.20);
}

/* Wrapper */
.ys-ds-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    gap: 12px !important;
}

/* Product card */
.ys-ds-card {
    position: relative;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,224,138,.075), transparent 28%),
        linear-gradient(155deg, #38351A 0%, #292711 58%, #211F0D 100%) !important;
    border: 1px solid rgba(255,224,138,.24);
    border-radius: 16px !important;
    box-shadow:
        inset 0 1px 0 rgba(255,244,193,.07),
        0 10px 28px rgba(0,0,0,.22) !important;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease !important;
}

.ys-ds-card:hover {
    transform: translateY(-7px) !important;
    border-color: rgba(255,224,138,.48);
    box-shadow:
        inset 0 1px 0 rgba(255,244,193,.10),
        0 17px 36px rgba(0,0,0,.28),
        0 0 24px rgba(242,190,66,.10) !important;
}

/* Image */
.ys-ds-img-link {
    background: #171707 !important;
    border-bottom: 1px solid rgba(255,224,138,.18);
}

.ys-ds-img-link::after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 -24px 30px rgba(33,31,13,.12);
}

.ys-ds-card:hover .ys-ds-img-link img {
    transform: scale(1.055) !important;
}

/* Discount badge — metallic gold */
.ys-ds-badge {
    top: 11px !important;
    inset-inline-start: 11px !important;
    overflow: hidden;
    z-index: 4;
    padding: 5px 11px !important;
    border-radius: 999px !important;
    background: linear-gradient(
        120deg,
        #9B6108 0%,
        #D48E12 14%,
        #F2BE42 31%,
        #FFF1AE 48%,
        #F3BF39 62%,
        #B8730B 82%,
        #E5A91D 100%
    ) !important;
    background-size: 200% auto !important;
    border: 1px solid #FFE08A;
    color: #111 !important;
    font-size: .70rem !important;
    font-weight: 900 !important;
    letter-spacing: .35px !important;
    box-shadow:
        inset 0 1px 0 rgba(255,250,220,.65),
        inset 0 -2px 3px rgba(107,62,3,.24),
        0 5px 14px rgba(0,0,0,.20),
        0 0 14px rgba(242,190,66,.16);
    animation: ys-pb-badge-gold-shine 5.2s linear infinite;
}

/* Card content */
.ys-ds-card-body {
    padding: 15px 15px 16px !important;
    gap: 8px !important;
}

.ys-ds-name {
    color: #F8EFCF !important;
    font-size: .92rem !important;
    font-weight: 700 !important;
    line-height: 1.42 !important;
    transition: color .2s ease;
}

.ys-ds-name:hover {
    color: #FFE08A !important;
}

/* Stars */
.ys-ds-star {
    color: rgba(255,224,138,.26) !important;
}
.ys-ds-star.filled {
    color: #FFD45A !important;
    text-shadow: 0 0 7px rgba(242,190,66,.22);
}
.ys-ds-rating-count {
    color: #C9B87D !important;
}

/* Prices */
.ys-ds-prices {
    gap: 7px !important;
    margin-top: 1px;
}

.ys-ds-sale {
    color: #FFD45A !important;
    font-size: 1.02rem !important;
    font-weight: 850 !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

.ys-ds-regular {
    color: #A99C6B !important;
    font-size: .80rem !important;
}

/* Quick Buy button — real metallic gold */
.ys-ds-btn {
    position: relative;
    overflow: hidden;
    margin-top: 6px !important;
    padding: 10px 12px !important;
    border: 1px solid #FFF0A8;
    border-radius: 8px !important;
    background: linear-gradient(
        118deg,
        #8E5706 0%,
        #C6800E 11%,
        #ECAA24 26%,
        #FFD65E 41%,
        #FFF2B2 50%,
        #F6C43B 59%,
        #D48B10 76%,
        #9B6108 100%
    ) !important;
    background-size: 210% auto !important;
    color: #111 !important;
    font-size: .86rem !important;
    font-weight: 900 !important;
    letter-spacing: .2px;
    box-shadow:
        inset 0 1px 0 rgba(255,251,225,.68),
        inset 0 -2px 3px rgba(109,65,4,.25),
        0 6px 18px rgba(0,0,0,.20),
        0 0 15px rgba(242,190,66,.13);
    animation: ys-pb-button-gold-shine 6s linear infinite;
    transition: transform .2s ease, box-shadow .2s ease !important;
}

.ys-ds-btn::after {
    content: '';
    position: absolute;
    top: -35%;
    bottom: -35%;
    left: -65%;
    width: 30%;
    transform: skewX(-22deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.12) 18%,
        rgba(255,249,219,.78) 50%,
        rgba(255,255,255,.14) 80%,
        transparent
    );
    pointer-events: none;
    animation: ys-pb-button-mirror 4.8s ease-in-out infinite;
}

.ys-ds-btn:hover {
    filter: none !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,251,225,.74),
        inset 0 -2px 3px rgba(109,65,4,.22),
        0 9px 24px rgba(0,0,0,.24),
        0 0 23px rgba(242,190,66,.22) !important;
}

/* Arrows */
.ys-ds-arrow {
    width: 44px !important;
    height: 44px !important;
    border: 1px solid #DFA825 !important;
    background:
        radial-gradient(circle at 35% 22%, rgba(255,245,198,.13), transparent 27%),
        linear-gradient(145deg, #38351A, #211F0D) !important;
    color: #FFD45A !important;
    box-shadow:
        inset 0 1px 0 rgba(255,240,174,.10),
        0 0 0 3px rgba(242,190,66,.035),
        0 7px 19px rgba(0,0,0,.18) !important;
}

.ys-ds-arrow:hover {
    border-color: #FFF0A8 !important;
    background: linear-gradient(135deg, #A96509 0%, #E0A01B 28%, #FFD45A 47%, #FFF0A8 55%, #D89413 78%, #9B6108 100%) !important;
    color: #111 !important;
    box-shadow: 0 8px 24px rgba(242,190,66,.24) !important;
}

/* Dots */
.ys-ds-dots {
    margin-top: 20px !important;
}

.ys-ds-dot {
    width: 8px !important;
    height: 8px !important;
    background: rgba(255,224,138,.20) !important;
    border: 1px solid rgba(255,224,138,.32) !important;
}

.ys-ds-dot.active {
    width: 26px !important;
    background: linear-gradient(90deg, #A96509, #FFD45A, #FFF0A8, #D69618) !important;
    border-color: #FFE08A !important;
    box-shadow: 0 0 11px rgba(242,190,66,.22);
}

/* Responsive */
@media (max-width: 1024px) {
    .ys-ds-section { padding: 38px 18px 42px; }
    .ys-ds-arrow { width: 38px !important; height: 38px !important; }
}

@media (max-width: 767px) {
    .ys-ds-section {
        margin: 0 !important;
        padding: 30px 12px 34px;
    }
    .ys-ds-header {
        margin-bottom: 20px !important;
    }
    .ys-ds-section-title {
        font-size: 1.55rem !important;
    }
    .ys-ds-viewall {
        min-height: 36px;
        padding: 7px 14px;
        font-size: .78rem !important;
    }
    .ys-ds-wrapper { gap: 6px !important; }
    .ys-ds-arrow {
        width: 30px !important;
        height: 30px !important;
    }
    .ys-ds-card-body {
        padding: 10px 10px 12px !important;
    }
    .ys-ds-name {
        font-size: .80rem !important;
    }
    .ys-ds-sale {
        font-size: .88rem !important;
    }
    .ys-ds-btn {
        padding: 8px 7px !important;
        font-size: .76rem !important;
    }
}

@media (max-width: 479px) {
    .ys-ds-section { padding-inline: 6px; }
    .ys-ds-arrow {
        width: 27px !important;
        height: 27px !important;
    }
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .ys-ds-section::before,
    .ys-ds-section-title,
    .ys-ds-badge,
    .ys-ds-btn,
    .ys-ds-btn::after {
        animation: none !important;
    }
}

@keyframes ys-pb-section-sheen {
    from { background-position: 190% 0; }
    to   { background-position: -80% 0; }
}

@keyframes ys-pb-title-gold-shine {
    0%   { background-position: 200% center; }
    100% { background-position: -20% center; }
}

@keyframes ys-pb-badge-gold-shine {
    0%   { background-position: 200% center; }
    100% { background-position: -15% center; }
}

@keyframes ys-pb-button-gold-shine {
    0%   { background-position: 200% center; }
    100% { background-position: -10% center; }
}

@keyframes ys-pb-button-mirror {
    0%,18% { left: -65%; opacity: 0; }
    30%    { opacity: .95; }
    58%    { opacity: .82; }
    76%,100% { left: 145%; opacity: 0; }
}
