/* =====================================================
   SALES  (11.11 / 12.12 hero card, product sale tag, admin sales page)
   Uses the store colours: deep navy + warm orange.
   ===================================================== */

/* ---------- Product sale tag (-50%) ---------- */
.sale-tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(249, 115, 22, .35);
}

/* The original price always has a line through it */
.product-price .original,
.product-detail-price .original,
.wishlist-price .original,
.review-modal-was {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.review-modal-was {
    margin-left: 8px;
    font-weight: 400;
    opacity: .75;
}

/* ---------- Hero sale card ---------- */
.sale-hero {
    position: relative;
    overflow: hidden;
    max-width: 36rem;
    margin: 0 0 26px;
    padding: 18px 20px 16px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(249, 115, 22, .38) 0%, rgba(249, 115, 22, 0) 55%),
        var(--gradient-navy);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(251, 146, 60, .28);
    animation: saleCardIn .7s cubic-bezier(.2, .9, .3, 1) both;
}

.sale-hero-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

/* big "11.11" - every digit drops in, one after the other */
.sale-hero-label {
    display: flex;
    font-size: 3.1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
}

.sale-hero-label i {
    display: inline-block;
    font-style: normal;
    animation: saleDrop .7s cubic-bezier(.2, 1.5, .4, 1) both;
    animation-delay: calc(var(--i) * .1s + .15s);
}

.sale-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sale-hero-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #FDBA74;
}

.sale-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FDBA74;
    box-shadow: 0 0 0 0 rgba(253, 186, 116, .7);
    animation: salePing 1.6s ease-out infinite;
}

.sale-hero-headline {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.sale-hero-sub {
    font-size: .8rem;
    color: rgba(255, 255, 255, .72);
    line-height: 1.4;
}

.sale-hero-off {
    text-align: center;
    padding: 7px 14px 8px;
    border-radius: 12px;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(249, 115, 22, .4);
    animation: saleBadgeIn .6s cubic-bezier(.2, 1.4, .4, 1) .55s both;
}

.sale-hero-off small {
    display: block;
    min-height: .7rem;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: .7rem;
}

.sale-off-num {
    display: inline-flex;
    align-items: baseline;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.sale-off-num b {
    font-size: 2.3rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
}

.sale-off-num em {
    font-style: normal;
    font-size: .95rem;
    margin-left: 3px;
}

/* countdown + button */
.sale-hero-foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, .18);
}

.sale-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sale-count.u-hidden { display: none; }

.sale-count-title {
    margin-right: 4px;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.sale-count-box {
    min-width: 44px;
    padding: 5px 6px 4px;
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
}

.sale-count-box b {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.sale-count-box b.tick { animation: saleTick .35s ease; }

.sale-count-box small {
    display: block;
    font-size: .56rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.sale-hero-cta i { transition: transform .25s ease; }
.sale-hero-cta:hover i { transform: translateX(4px); }
.sale-hero-cta { animation: saleNudge 2.8s ease-in-out 2s infinite; }

/* moving light across the card */
.sale-shine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 30%;
    z-index: 0;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .14) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: saleShine 5s ease-in-out 1.2s infinite;
}

/* floating sparkles (style: sparkle) */
.sale-spark { display: none; }

.sale-anim-sparkle .sale-spark {
    display: block;
    position: absolute;
    z-index: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FDBA74;
    box-shadow: 0 0 10px 2px rgba(253, 186, 116, .8);
    opacity: 0;
    animation: saleSpark 3.6s ease-in-out infinite;
}

.sale-spark.s1 { left: 8%;  bottom: 18%; animation-delay: 0s; }
.sale-spark.s2 { left: 38%; bottom: 8%;  animation-delay: .9s; width: 5px; height: 5px; }
.sale-spark.s3 { left: 68%; bottom: 14%; animation-delay: 1.8s; }
.sale-spark.s4 { left: 90%; bottom: 6%;  animation-delay: 2.5s; width: 5px; height: 5px; }

/* style: glow -> breathing glow around the digits and the card */
.sale-anim-glow .sale-hero-label { animation: saleGlow 2.6s ease-in-out 1.2s infinite; }
.sale-anim-glow { animation: saleCardIn .7s cubic-bezier(.2, .9, .3, 1) both, saleBorder 3s ease-in-out 1s infinite; }

/* style: none -> calm, no looping motion */
.sale-anim-none .sale-shine,
.sale-anim-none .sale-live-dot,
.sale-anim-none .sale-hero-cta { animation: none; }
.sale-anim-none .sale-shine { display: none; }

/* coming soon: a little quieter */
.sale-hero.is-soon .sale-hero-off { filter: saturate(.85); }

@keyframes saleCardIn   { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes saleDrop     { from { opacity: 0; transform: translateY(-55%) scale(.55) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes saleBadgeIn  { from { opacity: 0; transform: scale(.5) rotate(6deg); } to { opacity: 1; transform: none; } }
@keyframes salePing     { 0% { box-shadow: 0 0 0 0 rgba(253, 186, 116, .7); } 80%, 100% { box-shadow: 0 0 0 9px rgba(253, 186, 116, 0); } }
@keyframes saleShine    { 0%, 55% { left: -40%; } 100% { left: 130%; } }
@keyframes saleTick     { 0% { transform: translateY(-35%); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes saleNudge    { 0%, 90%, 100% { transform: none; } 94% { transform: translateY(-3px); } 97% { transform: translateY(0); } }
@keyframes saleSpark    { 0% { opacity: 0; transform: translateY(0) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-90px) scale(1.2); } }
@keyframes saleGlow     { 0%, 100% { filter: drop-shadow(0 0 0 rgba(249, 115, 22, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(249, 115, 22, .75)); } }
@keyframes saleBorder   { 0%, 100% { border-color: rgba(251, 146, 60, .25); } 50% { border-color: rgba(251, 146, 60, .75); } }

@media (prefers-reduced-motion: reduce) {
    .sale-hero, .sale-hero * { animation: none; }
    .sale-shine { display: none; }
}

@media (max-width: 640px) {
    .sale-hero { padding: 16px 14px 14px; }
    .sale-hero-top { grid-template-columns: auto 1fr; gap: 10px 14px; }
    .sale-hero-off { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; }
    .sale-hero-off small { display: inline; min-height: 0; line-height: 1; }
    .sale-hero-label { font-size: 2.5rem; }
    .sale-off-num b { font-size: 1.9rem; }
    .sale-hero-foot { flex-direction: column; align-items: stretch; }
    .sale-count { justify-content: space-between; }
    .sale-count-box { flex: 1; }
    .sale-hero-cta { justify-content: center; }
}

/* Sale item in the scrolling ticker */
.ticker-item--sale { color: #FDBA74; font-weight: 700; }

/* Shop: "showing sale items" bar */
.shop-sale-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: .9rem;
}
.shop-sale-bar a { color: var(--primary-dark); text-decoration: underline; }

/* =====================================================
   ADMIN > SALES PAGE
   ===================================================== */
.sale-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.sale-admin-preview {
    position: sticky;
    top: 20px;
}

.sale-admin-preview h4 { margin-bottom: 10px; }
.sale-admin-preview .sale-hero { margin-bottom: 8px; }
.sale-admin-preview .sale-hero-cta { animation: none; }

.sale-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.sale-preset {
    padding: 7px 14px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sale-preset:hover { border-color: var(--primary); color: var(--primary); }

.sale-section-title {
    margin: 22px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.sale-calc {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--bg-light);
    border: 1px dashed var(--border);
    font-size: .88rem;
}

.sale-calc input { width: 90px; }

.price-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.price-pill .now { font-weight: 800; font-size: 1.1rem; color: var(--primary); }
.price-pill s { color: var(--text-muted); font-size: .9rem; text-decoration-thickness: 1.5px; }
.price-pill .off { font-size: .72rem; font-weight: 700; color: var(--white); background: var(--gradient-primary); padding: 2px 8px; border-radius: 6px; }

.sale-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sale-quick button {
    padding: 3px 10px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
}
.sale-quick button:hover { border-color: var(--primary); color: var(--primary); }

.sale-apply-options { display: grid; gap: 10px; }

.sale-apply-opt {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.sale-apply-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.sale-apply-opt input { margin-top: 4px; accent-color: var(--primary); }
.sale-apply-opt strong { display: block; font-size: .92rem; }
.sale-apply-opt span { font-size: .8rem; color: var(--text-light); }

.sale-product-picker {
    max-height: 260px;
    overflow: auto;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}

.sale-product-picker label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: .86rem;
    cursor: pointer;
}

.sale-product-picker label:last-child { border-bottom: 0; }
.sale-product-picker input { accent-color: var(--primary); }
.sale-product-picker em { margin-left: auto; font-style: normal; color: var(--text-muted); font-size: .78rem; }

.sale-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }

.sale-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.sale-status.live      { background: #DCFCE7; color: #166534; }
.sale-status.scheduled { background: #DBEAFE; color: #1E40AF; }
.sale-status.paused    { background: #E2E8F0; color: #475569; }
.sale-status.ended     { background: #FEE2E2; color: #991B1B; }

.sale-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sale-row-actions form { display: inline; }

@media (max-width: 1100px) {
    .sale-admin-grid { grid-template-columns: 1fr; }
    .sale-admin-preview { position: static; order: -1; }
}

@media (max-width: 560px) {
    .sale-toggles { grid-template-columns: 1fr; }
}

/* ---------- Admin: product price box ---------- */
.price-box {
    margin-bottom: 18px;
    padding: 16px 16px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-light);
}
.price-box .form-hint { display: block; margin-top: 4px; }
.price-preview { min-height: 38px; margin: 2px 0 8px; }
.admin-was { margin: 0 4px; color: var(--text-muted); font-size: .8rem; text-decoration-thickness: 1.5px; }
