"""
Central constants for Polleo Demand.

Guardrails (do not weaken — see CLAUDE.md):
  - Forecast cap: 2x recent 13-week average (prevents runaway)
  - Forecast floor: 50% of 8-week median (prevents near-zero)
  - Promo threshold: 10% (raised from 5% after false positives)
"""

# Uplift calculation
PROMO_UPLIFT_FALLBACK   = 1.35   # default when per-SKU / per-category uplift is unreliable
UPLIFT_MIN_PROMO_WEEKS  = 2
UPLIFT_MIN_NORMAL_WEEKS = 3
UPLIFT_MIN_VALID_SKUS   = 3      # min SKUs per category before category-level uplift is trusted

# Promo detection (statistical path, now only used for wholesale)
PROMO_DISCOUNT_PCT_THRESHOLD = 10
WS_SPIKE_MULT                = 3.0   # wholesale spike = qty > this * per-SKU median

# Forecast sanity bounds
FORECAST_CAP_MULT  = 2.0   # total-mode cap = this * mean of non-zero recent weeks
FORECAST_FLOOR_MULT = 0.5  # floor = this * median of recent 8-wk non-zero weeks
WS_CAP_MULT        = 1.5   # wholesale-channel cap

# Horizons / windows
FORECAST_WEEKS   = 13
TRAILING_WEEKS   = 26
FLOOR_LOOKBACK   = 8       # weeks used to compute floor median

# App-specific
WATCHLIST_SIZE   = 30
OZNAKA_TIERS     = ["01 GOLD", "02 SILVER", "03 BRONZE"]
YW_MULTIPLIER    = 100     # year-week encoding: yw = year * 100 + week
