/* shop.css — stilovi za shop.html, cart.html i drawer */

/* ─── cart ikona (nastavak od style.css) ─────────────────────────────────── */

/* toast - mala poruka u dnu ekrana */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 400;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-left: 2px solid var(--acc);
    color: var(--fg);
    font-size: 0.85rem;
    padding: 0.7rem 1.4rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── drawer ──────────────────────────────────────────────────────────────── */

#drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
}

#drawer-overlay.show { display: block; }

#drawer {
    position: fixed;
    top: 0; right: 0;
    z-index: 201;
    width: 360px;
    max-width: 95vw;
    height: 100vh;
    background: #111;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#drawer.otvoren { transform: translateX(0); }

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.drawer-head span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.drawer-head button {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.drawer-head button:hover { color: var(--fg); }

.drawer-lista {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* scrollbar detalji */
.drawer-lista::-webkit-scrollbar { width: 3px; }
.drawer-lista::-webkit-scrollbar-thumb { background: var(--line); }

.drawer-prazan {
    padding: 3rem 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* jedan artikl u draweru */
.d-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--line);
    align-items: flex-start;
}

.d-item img {
    width: 60px; height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 0;
}

.d-info { flex: 1; min-width: 0; }

.d-naziv {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.d-vel {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

/* kontrole količine */
.kol-ctrl {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kol-ctrl button {
    width: 24px; height: 24px;
    border: 1px solid var(--line);
    background: none;
    color: var(--fg);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s;
}

.kol-ctrl button:hover { border-color: var(--fg); }

.kol-ctrl span { font-size: 0.85rem; min-width: 18px; text-align: center; }

.d-desno {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.d-desno span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--acc);
}

.d-ukloni {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.d-ukloni:hover { color: #e55; }

/* donji dio drawera */
.drawer-footer {
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}

.drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.drawer-total strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--fg);
}

/* ─── shop.html ──────────────────────────────────────────────────────────── */

.shop-hero {
    padding: 10rem 0 5rem;
    border-bottom: 1px solid var(--line);
}

.shop-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: 0.02em;
    margin: 0.5rem 0 1.5rem;
}

.shop-hero p { color: var(--muted); max-width: 400px; }

/* lista proizvoda - ne grid s karticama nego redovi */
#products-list { margin-top: 0; }

.loading {
    padding: 4rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* jedan proizvod */
.proizvod {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line);
    min-height: 500px;
}

/* izmjenuj stranu slike svaki drugi proizvod */
.proizvod:nth-child(even) .p-slika { order: 2; }
.proizvod:nth-child(even) .p-info  { order: 1; }

.p-slika {
    overflow: hidden;
    background: #0a0a0a;
}

.p-slika img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.proizvod:hover .p-slika img { transform: scale(1.03); }

.p-info {
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.p-br {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    color: var(--line);
    line-height: 1;
    display: block;
    margin-bottom: -1rem;
}

.p-info h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.p-opis {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 380px;
}

.vel-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.vel-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.vel-btn {
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    background: none;
    color: var(--muted);
    font-size: 0.82rem;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.vel-btn:hover { border-color: var(--fg); color: var(--fg); }
.vel-btn.sel { border-color: var(--acc); background: var(--acc); color: #fff; }

.p-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
}

.p-cijena {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

.dodaj-btn {
    padding: 0.7rem 1.8rem;
    background: var(--acc);
    color: #fff;
    border: none;
    font-family: 'Barlow', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.2s;
}

.dodaj-btn:hover { background: #d44f00; }

/* animacija tresenja kad nije odabrana velicina */
@keyframes trese {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

.vel-btns.trese { animation: trese 0.35s ease; }

/* promo crta ispod proizvoda */
.shop-promo {
    padding: 3rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.shop-promo p { color: var(--muted); font-size: 0.9rem; }

/* ─── cart.html ──────────────────────────────────────────────────────────── */

.cart-sek { padding: 4rem 0 6rem; }

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: flex-start;
    margin-top: 2rem;
}

/* lista artikala */
.ci {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
}

.ci img {
    width: 80px; height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 0;
}

.ci-info { flex: 1; }
.ci-info > p:first-child { font-weight: 600; margin-bottom: 0.2rem; }

.sivi { color: var(--muted); font-size: 0.82rem; }

.ci-cijena {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--acc);
    flex-shrink: 0;
}

.cart-prazan {
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: var(--muted);
}

/* ukupno i forma - desna strana */
#cart-ukupno-wrap {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ukupno-red {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--muted);
}

.ukupno-red:last-of-type { margin-bottom: 1.5rem; }

#cart-ukupno {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--fg);
}

/* forma za narudzbu */
#checkout-forma { margin-top: 2rem; }

.forma-naslov {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.2rem;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
}

.fg {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.9rem;
}

.fg label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.fg input,
.fg textarea {
    width: 100%;
    padding: 0.65rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
}

.fg input:focus,
.fg textarea:focus { border-bottom-color: var(--acc); }

.fg textarea { resize: vertical; min-height: 65px; }

.forma-greska {
    display: none;
    padding: 0.7rem 0;
    color: #e55;
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

.narudzba-ok {
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ok-check {
    font-size: 2rem;
    color: var(--acc);
    font-family: 'Bebas Neue', sans-serif;
}

.narudzba-ok h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
}

.narudzba-ok p { color: var(--muted); max-width: 400px; }

/* ─── responzivno za shop ────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .proizvod { grid-template-columns: 1fr; min-height: auto; }
    .proizvod:nth-child(even) .p-slika { order: 0; }
    .proizvod:nth-child(even) .p-info  { order: 0; }
    .p-slika { min-height: 300px; }
    .p-info { padding: 2rem; }
    .cart-grid { grid-template-columns: 1fr; }
    #cart-ukupno-wrap { position: static; }
}

@media (max-width: 580px) {
    .shop-hero { padding: 8rem 0 3rem; }
    .shop-promo { flex-direction: column; align-items: flex-start; }
    .p-bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .dodaj-btn { width: 100%; text-align: center; }
}
