/**
 * 3D ART BOX - prikaz na stranici proizvoda
 * Boje i oblici prate dizajn tokene redizajna (redizajn/SPECIFIKACIJA.md).
 * Tema ih može prepisati istim CSS promenljivama (--artbox-*).
 *
 * @author    B.Dragan
 * @copyright 2026 B.Dragan
 */

:root {
    --artbox-ink: #0F1A2A;
    --artbox-muted: #475569;
    --artbox-line: #E2E6EC;
    --artbox-chip-bg: #F1F4F8;
    --artbox-chip-text: #334155;
    --artbox-ok-bg: #E7F5EC;
    --artbox-ok-text: #166534;
    --artbox-warn-bg: #FAEEE9;
    --artbox-warn-text: #9A3412;
    --artbox-accent: #C2410C;
    --artbox-radius: 16px;
    --artbox-radius-sm: 10px;
}

/* --- Lager za izabranu kombinaciju --- */
.artbox-stock {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--artbox-ink);
}

.artbox-stock__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.artbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--artbox-chip-bg);
    color: var(--artbox-chip-text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
}

.artbox-chip strong {
    font-weight: 800;
    color: inherit;
}

.artbox-chip--ok {
    background: var(--artbox-ok-bg);
    color: var(--artbox-ok-text);
}

.artbox-chip--warn {
    background: var(--artbox-warn-bg);
    color: var(--artbox-warn-text);
}

.artbox-stock__note {
    margin: 0;
    font-size: 13.5px;
    color: var(--artbox-muted);
}

.artbox-stock__pack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin: 0;
    font-size: 14px;
}

.artbox-stock__pack div {
    display: flex;
    gap: 6px;
}

.artbox-stock__pack dt {
    font-weight: 600;
    color: var(--artbox-muted);
}

.artbox-stock__pack dd {
    margin: 0;
    font-weight: 800;
}

.artbox-stock.is-loading {
    opacity: .55;
    transition: opacity .15s;
}

.artbox-qty-warning {
    margin: 10px 0 0;
    padding: 10px 14px;
    border-radius: var(--artbox-radius-sm);
    background: var(--artbox-warn-bg);
    color: var(--artbox-warn-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    width: 100%;
}

/* --- Tabovi: specifikacija, brendiranje, dokumentacija --- */
.artbox-h3 {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--artbox-ink);
}

.artbox-branding > .artbox-h3:first-child,
.artbox-docs > .artbox-h3:first-child {
    margin-top: 0;
}

.artbox-spec {
    display: grid;
    grid-template-columns: minmax(140px, 32%) 1fr;
    margin: 0;
    border-top: 1px solid var(--artbox-line);
    font-size: 15px;
}

.artbox-spec dt,
.artbox-spec dd {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--artbox-line);
    line-height: 1.5;
}

.artbox-spec dt {
    padding-right: 16px;
    font-weight: 700;
    color: var(--artbox-muted);
}

.artbox-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--artbox-line);
    border-radius: var(--artbox-radius);
}

.artbox-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.artbox-table th,
.artbox-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--artbox-line);
}

.artbox-table th {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--artbox-muted);
    background: #F7F9FB;
}

.artbox-table tbody tr:last-child td {
    border-bottom: 0;
}

.artbox-doclist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.artbox-doclist a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1.5px solid #CBD2DC;
    border-radius: var(--artbox-radius-sm);
    background: #fff;
    color: var(--artbox-ink);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
}

.artbox-doclist a:hover,
.artbox-doclist a:focus-visible {
    border-color: var(--artbox-ink);
    color: var(--artbox-ink);
}

.artbox-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

.artbox-figures figure {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--artbox-line);
    border-radius: var(--artbox-radius);
    background: #fff;
    text-align: center;
}

.artbox-figures img {
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
}

.artbox-figures figcaption {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--artbox-muted);
}

.artbox-video {
    position: relative;
    max-width: 640px;
    aspect-ratio: 16 / 9;
}

.artbox-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--artbox-radius-sm);
}

/* Opis proizvoda (HTML koji pravi modul) */
.artbox-description h3 {
    margin: 22px 0 10px;
    font-size: 18px;
    font-weight: 700;
}

.artbox-description ul {
    padding-left: 20px;
}

.artbox-description li {
    margin-bottom: 4px;
}

@media (max-width: 760px) {
    .artbox-spec {
        grid-template-columns: 1fr;
    }

    .artbox-spec dt {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .artbox-table th,
    .artbox-table td {
        padding: 10px 12px;
    }
}

/* Krugovi boja na kartici proizvoda (hook displayArtboxChips): uvek jedan red iste visine */
.artbox-chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    height: 20px;
    overflow: hidden;
}

.artbox-dot {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(15, 26, 42, .18);
}

.artbox-chips__more {
    flex: 0 0 auto;
    margin-left: 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--artbox-muted);
}
