/* ── Offer Banner for WooCommerce ── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=DM+Sans:wght@400;500;600&display=swap');

* { box-sizing: border-box; }

.ob-banner {
    width: 100%;
    max-width: 600px; /* cap width on desktop so it stays compact */
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 8px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 10px 0;
    font-family: 'DM Sans', sans-serif;
}

/* ── MAIN ROW ── */
.ob-main-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

/* ── BADGE ── */
.ob-badge-wrap {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    min-width: 50px;
    position: relative;
}
.ob-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(150deg, #FFA040, #FF6030, #FF4050);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(255,70,60,0.4), inset 0 1px 0 rgba(255,255,255,0.28);
    overflow: hidden;
    position: relative;
}
.ob-badge::before {
    content: '';
    position: absolute;
    top: -14%; left: -14%;
    width: 55%; height: 48%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.3), transparent 70%);
    border-radius: 50%;
    z-index: 1;
}
.ob-badge-text {
    position: absolute;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 9px;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
    opacity: 0;
    transform: scale(0.6) rotate(20deg);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.34,1.4,.64,1);
    z-index: 2;
    width: 100%;
    padding: 2px;
}
.ob-badge-text.ob-active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}
.ob-badge-text.ob-exit {
    opacity: 0;
    transform: scale(0.6) rotate(-20deg);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── MIDDLE ── */
.ob-middle {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: visible;
}
.ob-get-at {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
    flex-shrink: 0;
}
.ob-price-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}
.ob-price-num {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    color: #111827;
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
    display: block;
}
.ob-swoosh {
    display: block;
    margin-top: 2px;
    overflow: visible;
    min-width: 50px;
}

/* ── PILL ── */
.ob-pill {
    flex: 0 0 auto;
    flex-shrink: 0;
    background: linear-gradient(140deg, #2ECC71, #16A34A, #15803D);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 3px 10px rgba(22,163,74,0.38), inset 0 1px 0 rgba(255,255,255,0.22);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.ob-pill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 48%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 50px 50px 0 0;
}
.ob-pill--no-saving {
    background: linear-gradient(140deg, #059669, #047857, #065F46);
    box-shadow: 0 3px 10px rgba(5,150,105,0.38), inset 0 1px 0 rgba(255,255,255,0.22);
}

/* ── TICKER ── */
.ob-ticker-wrap {
    border-top: 1px solid #F1F5F9;
    background: #FAFBFC;
    overflow: hidden;
    padding: 6px 0;
    position: relative;
}
.ob-ticker-wrap::before,
.ob-ticker-wrap::after {
    content: '';
    position: absolute; top: 0; bottom: 0;
    width: 30px; z-index: 2; pointer-events: none;
}
.ob-ticker-wrap::before { left: 0;  background: linear-gradient(90deg, #FAFBFC, transparent); }
.ob-ticker-wrap::after  { right: 0; background: linear-gradient(270deg, #FAFBFC, transparent); }
.ob-ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: ob-scroll 22s linear infinite;
}
@keyframes ob-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ob-tick {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
    font-family: 'DM Sans', sans-serif;
}

/* ── very small phones (< 360px) ── */
@media (max-width: 359px) {
    .ob-badge-wrap,
    .ob-badge      { flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; }
    .ob-badge-text { font-size: 8px; }
    .ob-get-at     { font-size: 11px; }
    .ob-price-num  { font-size: 18px; }
    .ob-pill       { font-size: 10px; padding: 7px 9px; }
}

/* ── normal phones (360–600px) ── */
@media (min-width: 360px) and (max-width: 600px) {
    .ob-badge-wrap,
    .ob-badge      { flex: 0 0 52px; width: 52px; height: 52px; min-width: 52px; }
    .ob-badge-text { font-size: 9.5px; }
    .ob-get-at     { font-size: 13px; }
    .ob-price-num  { font-size: 22px; }
    .ob-pill       { font-size: 11px; padding: 8px 12px; }
}

/* ── desktop (> 600px) — compact, capped width ── */
@media (min-width: 601px) {
    .ob-banner     { max-width: 520px; } /* stays inline, doesn't stretch */
    .ob-main-row   { padding: 10px 14px; gap: 10px; }
    .ob-badge-wrap,
    .ob-badge      { flex: 0 0 52px; width: 52px; height: 52px; min-width: 52px; }
    .ob-badge-text { font-size: 9.5px; }
    .ob-get-at     { font-size: 14px; }
    .ob-price-num  { font-size: 24px; }
    .ob-pill       { font-size: 12px; padding: 9px 14px; }
    .ob-tick       { font-size: 11.5px; }
}
