/* ==========================================================================
   CRNI PETEK 2026 - skin cez redno temo (custom.css).
   Vsa pravila so pod body.sv-bf (razred doda Magento_Theme/layout/default.xml), zato brez njega ta datoteka
   nima ucinka. Izklop: glej oznako CRNI PETEK v Magento_Theme/layout/default.xml.
   Barve (zacasne, po handoffu): skoraj crna podlaga, jantar samo na CTA, akcijskih cenah in znacki v meniju.
   ========================================================================== */

html body.sv-bf {
    --bf-bg: #0B0B0C;
    --bf-bg-2: #17171A;
    --bf-fg: #FFFFFF;
    --bf-muted: rgba(255, 255, 255, 0.72);
    --bf-line: rgba(255, 255, 255, 0.14);
    --bf-accent: #F5B841;
    --bf-accent-fg: #0B0B0C;
    --bf-bar-h: 44px;
}

/* temni pas s prednostmi (sv-topbar.phtml) med akcijo zamenja pas z odstevanjem */
html body.sv-bf .sv-topbar {
    display: none;
}

/* ---------- odstevalnik (Magento_Theme::html/sv-bf-timer.phtml) ---------- */
html body.sv-bf .sv-bf-timer {
    display: inline-flex;
    font-variant-numeric: tabular-nums;
}

html body.sv-bf .sv-bf-timer--bar {
    align-items: baseline;
    gap: 8px;
}

html body.sv-bf .sv-bf-timer__label {
    color: var(--bf-muted);
}

html body.sv-bf .sv-bf-timer--bar b {
    font-weight: 700;
}

html body.sv-bf .sv-bf-timer--box {
    gap: 10px;
}

html body.sv-bf .sv-bf-timer--box .sv-bf-timer__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 10px 8px;
    border: 1px solid var(--bf-line);
    border-radius: var(--sv-radius);
    background: var(--bf-bg-2);
    color: var(--bf-muted);
    font-size: 12px;
    line-height: 16px;
}

html body.sv-bf .sv-bf-timer--box b {
    color: var(--bf-fg);
    font-size: 28px;
    line-height: 1.1;
}

/* po koncu akcije (sv-bf.js) pas in odstevalniki izginejo */
html.sv-bf-ended body.sv-bf .sv-bf-bar,
html.sv-bf-ended body.sv-bf .sv-bf-timer {
    display: none;
}

/* ---------- pas nad glavo (Magento_Theme::html/sv-bf-bar.phtml) ---------- */
html body.sv-bf .sv-bf-bar {
    background: var(--bf-bg);
    color: var(--bf-fg);
    font-size: 14px;
    line-height: 18px;
}

html body.sv-bf .sv-bf-bar__inner,
html body.sv-bf .sv-bf-bar__inner:visited,
html body.sv-bf .sv-bf-bar__inner:hover {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 20px;
    /* rezervirana visina: stevilke se zamenjajo brez premika vsebine */
    min-height: var(--bf-bar-h);
    max-width: var(--sv-wrap);
    margin: 0 auto;
    padding: 8px 24px;
    color: inherit;
    text-decoration: none;
}

html body.sv-bf .sv-bf-bar__text {
    font-weight: 700;
}

html body.sv-bf .sv-bf-bar__text b {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 767px) {
    html body.sv-bf {
        --bf-bar-h: 58px;
    }

    html body.sv-bf .sv-bf-bar {
        font-size: 13px;
    }

    html body.sv-bf .sv-bf-bar__inner {
        padding: 8px 16px;
    }
}

/* ---------- meni: povezava na akcijo kot crn gumb z jantarno znacko ----------
   href: /odprodaja.html (zdaj) ali /kampanja/crni-petek (po spremembi v adminu); besedilo menija se zamenja v adminu */
@media (min-width: 768px) {
    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0:has(> a[href*="/kampanja/crni-petek"]) {
        order: 99;
        margin-left: auto;
        padding-left: 16px;
    }

    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0:has(> a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"])) {
        display: flex;
        align-items: center;
    }

    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0 > a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"]) {
        height: 40px;
        padding: 0 8px 0 16px;
        border-radius: var(--sv-radius);
        background: var(--bf-bg);
        color: var(--bf-fg);
        font-weight: 700;
    }

    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0 > a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"]):hover {
        background: var(--bf-bg-2);
        color: var(--bf-fg);
    }

    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0 > a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"])::after {
        content: "\2212 80 %";
        padding: 3px 7px;
        border-radius: var(--sv-radius);
        background: var(--bf-accent);
        color: var(--bf-accent-fg);
        font-size: 11px;
        font-weight: 700;
    }

    /* napis "Odprodaja" (ime v megameniju v adminu) -> "Črni petek" */
    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0 > a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"]) > span {
        font-size: 0;
    }

    html body.sv-bf .page-header .cdz-horizontal-menu .groupmenu > li.level0 > a:is([href$="/odprodaja.html"], [href*="/kampanja/crni-petek"]) > span::before {
        content: "Črni petek";
        font-size: 14px;
    }
}

/* mobilni predal (sv-header.js) */
html body.sv-bf .sv-mnav a.sv-mnav__sale {
    color: var(--sv-ink);
    font-weight: 700;
    /* sv-header.js prepise napis iz menija ("Odprodaja") -> "Črni petek" */
    font-size: 0;
}

html body.sv-bf .sv-mnav a.sv-mnav__sale::before {
    content: "Črni petek";
    /* prazno besedilo je se vedno element flexa: odsteje odvecni gap */
    margin-right: -8px;
    font-size: 16px;
}

html body.sv-bf .sv-mnav__sale span {
    background: var(--bf-accent);
    color: var(--bf-accent-fg);
    font-weight: 700;
    /* sv-header.js izpise "-70 %"; med akcijo enako kot znacka v meniju na namizju */
    font-size: 0;
}

html body.sv-bf .sv-mnav__sale span::after {
    content: "\2212 80 %";
    font-size: 11px;
}

/* ---------- znacka popusta ob ceni (-50 % + precrtana cena): jantarna s crnim besedilom ----------
   povsod: kartice (drsniki, kategorija), stran izdelka, lepljiva vrstica kosarice; redna tema jo ima rdeco
   z !important (custom.css, najvisja specificnost 0,4,2), zato :is() + podvojen razred in !important */
html body.sv-bf :is(.price-container, .product-info-price, .scr-pprice) .price-discount-summary.price-discount-summary {
    background: var(--bf-accent) !important;
    color: var(--bf-accent-fg) !important;
}

html body.sv-bf :is(.price-container, .product-info-price, .scr-pprice) .price-discount-summary.price-discount-summary .price-discount-badge {
    color: var(--bf-accent-fg) !important;
    font-weight: 700 !important;
}

/* popust (-50 %) vecji od precrtane cene: kartice 16 / 14 px (redno 12,5 / 15), stran izdelka 20 / 16 px */
html body.sv-bf .price-container .price-discount-summary.price-discount-summary .price-discount-badge {
    font-size: 16px !important;
    line-height: 20px !important;
}

html body.sv-bf .price-container .price-discount-summary.price-discount-summary .old-price .price {
    font-size: 14px !important;
    font-weight: 500 !important;
}

html body.sv-bf.catalog-product-view .product-info-price .price-discount-summary.price-discount-summary .price-discount-badge {
    font-size: 20px !important;
    line-height: 24px !important;
}

html body.sv-bf.catalog-product-view .product-info-price .price-discount-summary.price-discount-summary .old-price .price {
    font-size: 16px !important;
}

html body.sv-bf :is(.price-container, .product-info-price, .scr-pprice) .price-discount-summary.price-discount-summary .old-price,
html body.sv-bf :is(.price-container, .product-info-price, .scr-pprice) .price-discount-summary.price-discount-summary .old-price .price {
    color: var(--bf-accent-fg) !important;
    opacity: 1 !important;
    text-decoration-color: var(--bf-accent-fg) !important;
}

/* lepljiva vrstica kosarice na strani izdelka: redna tema znacko skrije (brez podlage, brez -50 %), med akcijo je
   manjsa razlicica znacke s kartic */
html body.sv-bf.catalog-product-view.pdv-l06 .box-tocart.scr-loaded.att-scr-qty.active .scr-pinfo .scr-pprice .price-discount-summary.price-discount-summary {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 2px 7px !important;
    border-radius: var(--sv-radius) !important;
}

html body.sv-bf.catalog-product-view.pdv-l06 .box-tocart.scr-loaded.att-scr-qty.active .scr-pinfo .scr-pprice .price-discount-summary.price-discount-summary .price-discount-badge {
    display: inline !important;
    font-size: 13px !important;
    line-height: 18px !important;
}

html body.sv-bf.catalog-product-view.pdv-l06 .box-tocart.scr-loaded.att-scr-qty.active .scr-pinfo .scr-pprice .price-discount-summary.price-discount-summary .old-price .price {
    font-size: 12px !important;
    line-height: 18px !important;
}

/* telefon: za ime in ceno je ~150 px, zato samo precrtana cena (brez -50 %), da znacka ne sega pod gumb */
@media (max-width: 767px) {
    html body.sv-bf.catalog-product-view.pdv-l06 .box-tocart.scr-loaded.att-scr-qty.active .scr-pinfo .scr-pprice .price-discount-summary.price-discount-summary {
        padding: 1px 5px !important;
    }

    html body.sv-bf.catalog-product-view.pdv-l06 .box-tocart.scr-loaded.att-scr-qty.active .scr-pinfo .scr-pprice .price-discount-summary.price-discount-summary .price-discount-badge {
        display: none !important;
    }
}

/* ---------- stran izdelka: vrstica zaupanja (Magento_Catalog::product/view/sv-bf-proof.phtml) ----------
   za pasom do brezplacne dostave (sv-product.js, order 2); kljukice in razpored kot .product-service-benefit, ki ga med
   akcijo nadomesti (samo 3 prednosti, ne 6) */
html body.sv-bf.catalog-product-view.pdv-l06 .product-service-panel__benefits,
html body.sv-bf.catalog-product-view.pdv-l06 .product-service-cta--price-match {
    /* med akcijo skrita tudi "Nizja cena drugje?" (izenacimo ceno) */
    display: none;
}

html body.sv-bf.catalog-product-view .sv-bf-proof {
    order: 2 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

html body.sv-bf.catalog-product-view .sv-bf-proof__item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--sv-muted);
    font-size: 13px;
    line-height: 1.25;
}

html body.sv-bf.catalog-product-view .sv-bf-proof__item::before {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    background: #3FAF82;
    -webkit-mask: var(--sv-ic-tick) center / contain no-repeat;
    mask: var(--sv-ic-tick) center / contain no-repeat;
}

html body.sv-bf.catalog-product-view .sv-bf-proof__short {
    display: none;
}

/* telefon: vse tri v eni vrsti (12 px, krajse besedilo ocene; 375 px zaslon -> ~327 od 343 px); na ozjih od
   ~360 px se zadnja postavka prelomi v drugo vrsto namesto cez rob */
@media (max-width: 767px) {
    html body.sv-bf.catalog-product-view .sv-bf-proof {
        gap: 6px 8px;
    }

    html body.sv-bf.catalog-product-view .sv-bf-proof__item {
        gap: 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    html body.sv-bf.catalog-product-view .sv-bf-proof__item::before {
        width: 12px;
        height: 12px;
    }

    html body.sv-bf.catalog-product-view .sv-bf-proof__long {
        display: none;
    }

    html body.sv-bf.catalog-product-view .sv-bf-proof__short {
        display: inline;
    }
}

/* razmiki v stolpcu z gumbom enaki (20 px = gap .product-purchase-section): vrstica kosarice (.box-tocart) je na
   namizju inline-block, poravnan na osnovno crto -> 15 px praznine nad gumbom; Codazon to visino (67 px) nato zapise
   kot min-height lepljive vrstice, zato je poravnana na vrh in rezerva enaka visini gumba (52 px, kot na telefonu). */
html body.sv-bf.catalog-product-view .product-purchase-section .qtybox-anchor > .box-tocart {
    vertical-align: top;
}

html body.sv-bf.catalog-product-view .product-purchase-section .qtybox-anchor {
    min-height: 52px !important;
}

/* ---------- domaca stran (Magento_Cms::sv-bf-home.phtml) ---------- */
/* redni hero in Akcije iz admina zamenja BF uvod in mreza odprodaje; Najbolj prodajano ostane (mreza spodaj) */
html body.sv-bf.cms-index-index .sv-hero,
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-akcije-title"] {
    display: none;
}

html body.sv-bf .sv-bf-hero {
    position: relative;
    overflow: hidden;
    /* poravnano z vsebino .sv-section (--sv-wrap vkljucuje 24 px roba) */
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: calc(var(--sv-wrap) - 48px);
    margin: 28px auto 0;
    border-radius: var(--sv-radius);
    background: var(--bf-bg);
    color: var(--bf-fg);
    font-size: 16px;
    line-height: normal;
}

/* namizje: lezeca slika cez celo polje, besedilo levo na temnem prelivu */
html body.sv-bf .sv-bf-hero__media,
html body.sv-bf .sv-bf-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html body.sv-bf .sv-bf-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bf-bg) 0%, rgba(11, 11, 12, 0.88) 42%, rgba(11, 11, 12, 0) 75%);
}

html body.sv-bf .sv-bf-hero__text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    max-width: 640px;
    padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px);
}

html body.sv-bf .sv-bf-hero__title {
    margin: 0;
    color: var(--bf-fg);
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

html body.sv-bf .sv-bf-hero__sub {
    margin: -8px 0 0;
    color: var(--bf-fg);
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    line-height: 1.2;
}

/* jantar samo na CTA */
html body.sv-bf .sv-bf-hero .sv-btn--primary,
html body.sv-bf .sv-bf-hero .sv-btn--primary:visited,
html body.sv-bf .sv-bf-hero .sv-btn--primary:hover {
    background: var(--bf-accent);
    color: var(--bf-accent-fg);
}

/* mreza (2 vrsti po 4) namesto drsnika: izdelki iz odprodaje in Najbolj prodajano iz admina (kartice sv-carousel.phtml,
   kot .sv-pdp-similar); Najbolj prodajano ima 10 izdelkov -> prikazanih prvih 8 */
html body.sv-bf .sv-bf-products .sv-track,
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-track {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 24px;
    overflow: visible;
    scroll-snap-type: none;
}

html body.sv-bf .sv-bf-products .sv-track > .product-item,
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-track > .product-item {
    width: auto;
    min-width: 0;
}

html body.sv-bf .sv-bf-products .sv-track > .product-item:nth-child(n+9),
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-track > .product-item:nth-child(n+9) {
    display: none;
}

/* mreza nima drsenja -> brez bara pod drsnikom in brez puscic */
html body.sv-bf .sv-bf-products .sv-products::after,
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-products::after,
html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-arrow {
    display: none;
}

@media (max-width: 899px) {
    html body.sv-bf .sv-bf-products .sv-track,
    html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* telefon: drsnik v eni vrsti (do 8 izdelkov), z barom kot ostali drsniki */
@media (max-width: 767px) {
    html body.sv-bf .sv-bf-products .sv-track,
    html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-track {
        grid-auto-flow: column;
        grid-template-rows: none;
        grid-template-columns: none;
        grid-auto-columns: min(46vw, 240px);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    html body.sv-bf .sv-bf-products .sv-products::after,
    html body.sv-bf.cms-index-index .sv-section[aria-labelledby="sv-top-title"] .sv-products::after {
        display: block;
    }
}

/* telefon: najprej besedilo, pod njim pokoncna slika, ki se zgoraj prelije v crno podlago (kot preliv na namizju) */
@media (max-width: 767px) {
    html body.sv-bf .sv-bf-hero {
        display: flex;
        flex-direction: column;
        width: calc(100% - 32px);
        margin-top: 16px;
    }

    html body.sv-bf .sv-bf-hero__text {
        order: 1;
        padding: 28px 20px 8px;
    }

    html body.sv-bf .sv-bf-hero__media {
        order: 2;
        position: relative;
        display: block;
        aspect-ratio: 4 / 3;
        height: auto;
        /* brez svetle crte (zaokrozevanje na pol piksla) na stiku z besedilom */
        margin-top: -1px;
    }

    html body.sv-bf .sv-bf-hero::after {
        display: none;
    }

    html body.sv-bf .sv-bf-hero__media::after {
        content: "";
        position: absolute;
        inset: -1px 0 0;
        background: linear-gradient(180deg, var(--bf-bg) 0%, rgba(11, 11, 12, 0.6) 28%, rgba(11, 11, 12, 0) 60%);
    }

    html body.sv-bf .sv-bf-timer--box {
        align-self: stretch;
    }

    html body.sv-bf .sv-bf-timer--box .sv-bf-timer__unit {
        flex: 1;
        min-width: 0;
    }
}

/* ---------- kategorija odprodaja = Crni petek (catalog_category_view_id_313.xml) ---------- */
html body.sv-bf.category-odprodaja .sv-cat-head {
    margin-top: 24px;
    padding: clamp(28px, 4vw, 48px);
    border: 2px solid var(--bf-accent);
    border-radius: var(--sv-radius);
    background: var(--bf-bg);
    color: var(--bf-fg);
}

html body.sv-bf.category-odprodaja .sv-cat-head .page-title,
html body.sv-bf.category-odprodaja .sv-cat-head .page-title .base {
    color: var(--bf-fg);
}

html body.sv-bf.category-odprodaja .sv-cat-head__intro,
html body.sv-bf.category-odprodaja .sv-cat-head__trust,
html body.sv-bf.category-odprodaja .sv-cat-head__trust li {
    color: var(--bf-muted);
}

html body.sv-bf.category-odprodaja .sv-cat-head .sv-bf-timer {
    margin-top: 8px;
}

@media (max-width: 767px) {
    html body.sv-bf.category-odprodaja .sv-cat-head {
        padding: 24px 20px;
    }
}

/* Badge odprodaje na strani izdelka: "Odprodaja" -> "Črni petek" (brez prevoda v sl_SI.csv) */
html body.sv-bf .odprodaja-block__badge {
    font-size: 0;
}
html body.sv-bf .odprodaja-block__badge::after {
    content: "Črni petek";
    font-size: 11px;
}
