/* ============================================
   ARTIKAL_STRANICA.CSS
   ============================================ */

/* Breadcrumb */
.artikal-breadcrumb {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-size: 13px;
    color: var(--mid);
}
.artikal-breadcrumb a {
    color: var(--charcoal-mid);
    text-decoration: none;
    transition: color .15s;
}
.artikal-breadcrumb a:hover { color: var(--rose); }
.artikal-breadcrumb i {
    margin: 0 6px;
    font-size: 9px;
    color: var(--mid);
}
.artikal-breadcrumb span { color: var(--charcoal); font-weight: 500; }

/* Layout */
.artikal-page { padding: 32px 0 64px; }

.artikal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

/* ============================================
   GALERIJA
   ============================================ */
.artikal-galerija { position: sticky; top: 84px; align-self: start; }

.galerija-main {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 1;
    cursor: zoom-in;
}

.galerija-slides { width: 100%; height: 100%; position: relative; }

.galerija-slide {
    display: none;
    width: 100%;
    height: 100%;
}
.galerija-slide.active {
    display: block;
}

.galerija-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    -webkit-user-drag: none;
    user-select: none;
}

.galerija-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--border);
    font-size: 64px;
}

/* Strelice */
.galerija-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: var(--charcoal);
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    transition: all .2s;
    opacity: 0;
}
.galerija-main:hover .galerija-arrow { opacity: 1; }
.galerija-arrow:hover { background: white; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.galerija-arrow.prev { left: 12px; }
.galerija-arrow.next { right: 12px; }

/* Dots */
.galerija-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 6px;
}
.galerija-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all .2s;
}
.galerija-dot.active {
    background: white;
    transform: scale(1.3);
}

/* Sale badge */
.galerija-sale-badge {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 10;
    background: var(--rose);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 50px;
}

/* Thumbnails */
.galerija-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.galerija-thumb {
    width: 68px; height: 68px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: var(--cream);
    transition: border-color .2s;
    flex-shrink: 0;
}
.galerija-thumb img { width: 100%; height: 100%; object-fit: cover; }
.galerija-thumb.active { border-color: var(--charcoal); }
.galerija-thumb:hover:not(.active) { border-color: var(--border); }

/* ============================================
   INFO PANEL
   ============================================ */
.artikal-info { padding-top: 4px; }

/* Shop link */
.artikal-shop-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--charcoal-mid);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 7px 12px 7px 7px;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    transition: all .2s;
}
.artikal-shop-link:hover { border-color: var(--charcoal); color: var(--charcoal); }
.artikal-shop-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.artikal-shop-link i { font-size: 10px; color: var(--mid); margin-left: 2px; }

/* Meta top */
.artikal-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.artikal-tag {
    font-size: 12.5px;
    color: var(--charcoal-mid);
    background: var(--cream);
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid var(--border);
}
.artikal-stanje {
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 500;
}
.artikal-stanje.novo { background: #F0FDF4; color: #16A34A; }
.artikal-stanje.koristeno { background: #FFF7ED; color: #EA580C; }

/* Naziv */
.artikal-naziv {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.25;
    margin-bottom: 18px;
}

/* Cijena */
.artikal-cijena-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.artikal-cijena {
    font-size: 30px;
    font-weight: 800;
    color: var(--charcoal);
}
.artikal-cijena-sale {
    font-size: 30px;
    font-weight: 800;
    color: var(--rose);
}
.artikal-cijena-old {
    font-size: 18px;
    font-weight: 400;
    color: var(--mid);
    text-decoration: line-through;
}
.artikal-discount-pill {
    font-size: 12.5px;
    font-weight: 600;
    color: #16A34A;
    background: #F0FDF4;
    padding: 4px 10px;
    border-radius: 50px;
    margin-left: 2px;
}

/* Specifikacije */
.artikal-specs {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 14px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--mid); }
.spec-value { color: var(--charcoal); font-weight: 500; text-align: right; }
.spec-color { display: flex; align-items: center; gap: 8px; }
.spec-color-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* CTA */
.artikal-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.kolicina-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    flex-shrink: 0;
}
.kol-btn {
    width: 38px; height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 300;
    color: var(--charcoal);
    transition: background .15s;
    display: flex; align-items: center; justify-content: center;
}
.kol-btn:hover { background: var(--cream); }
.kolicina {
    min-width: 32px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--charcoal);
    user-select: none;
}
.btn-korpa {
    flex: 1;
    height: 48px;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    transition: all .2s;
}
.btn-korpa:hover { background: var(--rose); transform: translateY(-1px); }
.btn-korpa:active { transform: translateY(0); }
.btn-korpa.added {
    background: #16A34A;
}
.btn-wishlist {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: 17px;
    color: var(--mid);
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}
.btn-wishlist:hover { border-color: var(--rose); color: var(--rose); }
.btn-wishlist.active { color: var(--rose); border-color: var(--rose); background: #FFF0F3; }
.btn-wishlist.active i { font-weight: 900; }

.btn-kontakt-butik {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    color: var(--charcoal-mid);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: all .2s;
}
.btn-kontakt-butik:hover { border-color: var(--charcoal); color: var(--charcoal); }

/* Opis */
.artikal-opis-wrap {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.artikal-opis-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--charcoal);
    transition: background .15s;
}
.artikal-opis-toggle:hover { background: var(--cream); }
.artikal-opis-toggle i {
    font-size: 12px;
    color: var(--mid);
    transition: transform .3s;
}
.artikal-opis-toggle.open i { transform: rotate(180deg); }
.artikal-opis {
    padding: 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--charcoal-mid);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
}
.artikal-opis.open {
    max-height: 500px;
    padding: 0 18px 18px;
}

/* ============================================
   RELATED
   ============================================ */
.related-section { margin-top: 16px; }
.related-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 20px;
}
.related-title a {
    color: var(--rose);
    text-decoration: none;
}
.related-title a:hover { text-decoration: underline; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.related-card {
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--white);
    transition: all .25s;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.related-img {
    position: relative;
    aspect-ratio: 1;
    background: var(--cream);
    overflow: hidden;
}
.related-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.related-card:hover .related-img img { transform: scale(1.06); }
.related-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 32px; }
.related-sale-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--rose);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
}
.related-info { padding: 12px 14px; }
.related-naziv { font-size: 13.5px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-cijena { font-size: 14px; font-weight: 700; color: var(--charcoal); }
.rc-sale { color: var(--rose); margin-right: 6px; }
.rc-old { font-size: 12px; font-weight: 400; color: var(--mid); text-decoration: line-through; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox.open { display: flex; }
.lb-img-wrap {
    max-width: 90vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-img-wrap img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}
.lb-close {
    position: fixed;
    top: 20px; right: 24px;
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,.3); }
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: white;
    width: 46px; height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
    z-index: 10;
}
.lb-arrow:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: 13px;
    background: rgba(0,0,0,.4);
    padding: 5px 14px;
    border-radius: 50px;
}

/* ============================================
   KORPA TOAST
   ============================================ */
.korpa-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    transform: translateY(120px);
    opacity: 0;
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
    min-width: 300px;
    max-width: 360px;
}
.korpa-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.korpa-toast-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.korpa-toast-inner img {
    width: 48px; height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--cream);
    flex-shrink: 0;
}
.korpa-toast-naziv {
    font-size: 14px;
    font-weight: 600;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.korpa-toast-sub { font-size: 12px; color: var(--mid); }
.korpa-toast-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: var(--charcoal);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
    flex-shrink: 0;
}
.korpa-toast-btn:hover { background: var(--rose); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .artikal-layout { grid-template-columns: 1fr; gap: 28px; }
    .artikal-galerija { position: static; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .artikal-naziv { font-size: 22px; }
    .artikal-cijena, .artikal-cijena-sale { font-size: 24px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .galerija-thumb { width: 54px; height: 54px; }
    .korpa-toast { left: 12px; right: 12px; min-width: 0; bottom: 16px; }
}