/* --- Varastoliikennevalo (tuotesivu) --- */
.aksb-stock-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
}
.aksb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.aksb-stock-green .aksb-dot { background-color: #2ecc71; }
.aksb-stock-yellow .aksb-dot { background-color: #f39c12; }
.aksb-stock-red .aksb-dot { background-color: #e74c3c; }

.aksb-stock-green .aksb-text { color: #1e8449; }
.aksb-stock-yellow .aksb-text { color: #b9770e; }
.aksb-stock-red .aksb-text { color: #b03a2e; }

/* --- Alkaen-hinta / hintahaarukka --- */
.aksb-price-range {
    font-size: 15px;
    font-weight: 600;
    margin: 6px 0;
}
.aksb-from-label {
    font-weight: 400;
    font-size: 0.85em;
    text-transform: lowercase;
    margin-right: 2px;
}

/* --- Badget tuotelistauksissa (kuvan päällä) --- */
/* Edellyttää, että thumbnail-containerilla on position: relative,
   mikä pätee PrestaShop classic -teemassa oletuksena. */
.aksb-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}
.aksb-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    width: fit-content;
}
.aksb-badge-order {
    background-color: #34495e;
}
.aksb-badge-popular {
    background-color: #e91e63;
}

/* --- Varastostatus-rivi KATALOGISSA (tuotenimen alla, hinnan yllä) --- */
.aksb-list-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 6px;
    font-size: 13px;
    line-height: 1.2;
}
.aksb-list-status .aksb-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.aksb-list-status .aksb-dot {
    width: 9px;
    height: 9px;
}
/* Suosittu-pilleri: brändiväri Petal Pink */
.aksb-pop-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background-color: #C368A8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* --- Turkoosi "Tilattavissa" (saldo 0 mutta toimitustilaus sallittu) --- */
.aksb-stock-turquoise .aksb-dot { background-color: #1abc9c; }
.aksb-stock-turquoise .aksb-text { color: #128a72; }

/* --- Punainen kieltomerkki (ei saatavilla eikä tilattavissa) --- */
.aksb-noicon {
    font-size: 16px;
    line-height: 1;
    color: #e74c3c;
}
.aksb-list-status .aksb-noicon { font-size: 15px; }

/* --- Hohtavat, kutsuvat pisteet --- */
.aksb-dot { position: relative; }
.aksb-stock-green     .aksb-dot { --aksb-glow: rgba(46,204,113,.85);  box-shadow: 0 0 5px 1px rgba(46,204,113,.75); }
.aksb-stock-turquoise .aksb-dot { --aksb-glow: rgba(26,188,156,.85);  box-shadow: 0 0 5px 1px rgba(26,188,156,.75); }
.aksb-stock-yellow    .aksb-dot { --aksb-glow: rgba(243,156,18,.70);  box-shadow: 0 0 4px 1px rgba(243,156,18,.60); }

/* Pehmeä sykkivä rengas vain "saatavilla nyt" (vihreä) ja "tilattavissa" (turkoosi) */
.aksb-stock-green .aksb-dot::after,
.aksb-stock-turquoise .aksb-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: aksb-pulse 2.2s ease-out infinite;
}
@keyframes aksb-pulse {
    0%   { box-shadow: 0 0 0 0 var(--aksb-glow); }
    70%  { box-shadow: 0 0 0 7px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}
@media (prefers-reduced-motion: reduce) {
    .aksb-stock-green .aksb-dot::after,
    .aksb-stock-turquoise .aksb-dot::after { animation: none; }
}

/* --- Ikonit (inline-SVG, currentColor) --- */
.aksb-ico { width: 1em; height: 1em; flex-shrink: 0; fill: currentColor; vertical-align: middle; }
.aksb-list-status .aksb-ico, .aksb-stock-status .aksb-ico { width: 16px; height: 16px; }
.aksb-stock-turquoise .aksb-ico-truck { color: #1abc9c; }
.aksb-stock-red .aksb-ico-block { color: #e74c3c; }

/* hehkuva, hienovaraisesti sykkivä kuljetusauto ("Tilattavissa" – kannustaa) */
.aksb-stock-turquoise .aksb-ico-truck { animation: aksb-truckglow 2.2s ease-in-out infinite; }
@keyframes aksb-truckglow {
    0%, 100% { filter: drop-shadow(0 0 1px rgba(26,188,156,.55)); }
    50%      { filter: drop-shadow(0 0 5px rgba(26,188,156,.95)); }
}
@media (prefers-reduced-motion: reduce) {
    .aksb-stock-turquoise .aksb-ico-truck { animation: none; }
}

/* --- Lihavointi varastossa oleville (vihreä) --- */
.aksb-stock-green .aksb-text { font-weight: 700; }

/* --- "Suosittu"-lippu kuvan päällä (liekki, brändi-pinkki) — kuin natiivi "Uusi" --- */
.product-flags .badge.aksb-popular {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #C368A8;
    color: #fff;
}
.product-flags .badge.aksb-popular .aksb-ico-fire { width: 13px; height: 13px; }

/* --- "Tilattavissa": auto paikallaan, TIE liikkuu alla (näyttää ajavan) --- */
.aksb-truckwrap { position: relative; display: inline-flex; align-items: center; padding-bottom: 3px; }
/* poista aiempi hehku-animaatio autolta */
.aksb-stock-turquoise .aksb-ico-truck { animation: none; filter: none; }
/* hienovarainen "moottorin käynti" -tärinä */
.aksb-truckwrap .aksb-ico-truck { animation: aksb-bob .5s ease-in-out infinite; }
/* liikkuva tie autolle */
.aksb-truckwrap::after {
    content: '';
    position: absolute;
    left: -1px; right: -1px; bottom: 0;
    height: 2px;
    border-radius: 1px;
    background: repeating-linear-gradient(90deg, #1abc9c 0 3px, transparent 3px 7px);
    background-size: 7px 2px;
    animation: aksb-road .45s linear infinite;
}
@keyframes aksb-road { to { background-position-x: -7px; } }
@keyframes aksb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.5px); } }
@media (prefers-reduced-motion: reduce) {
    .aksb-truckwrap .aksb-ico-truck, .aksb-truckwrap::after { animation: none; }
}

/* --- Sinertävämpi turkoosi "Tilattavissa" (ettei sekoitu vihreään "varastossa") --- */
.aksb-stock-turquoise .aksb-dot { background-color: #12a5c4; }
.aksb-stock-turquoise .aksb-text { color: #0b6e85; }
.aksb-stock-turquoise .aksb-ico-truck { color: #12a5c4; }
.aksb-truckwrap::after {
    background: repeating-linear-gradient(90deg, #12a5c4 0 3px, transparent 3px 7px);
    background-size: 7px 2px;
}

/* tie lähemmäs renkaita (ei leijuntaa) */
.aksb-truckwrap { padding-bottom: 0; }
.aksb-truckwrap::after { bottom: 2px; }

/* tien viivat pidemmiksi, välit lyhyemmiksi (viiva 5px / väli 2px) */
.aksb-truckwrap::after {
    background: repeating-linear-gradient(90deg, #12a5c4 0 5px, transparent 5px 7px);
    background-size: 7px 2px;
}
