/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* COOKIE CONSENT */
#cookie-baner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a237e;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 99999;
    font-size: 0.92rem;
    flex-wrap: wrap;
    transition: transform 0.4s ease;
}
#cookie-baner p {
    margin: 0;
    flex: 1;
    min-width: 200px;
}
#cookie-prihvati {
    background: #ffb300;
    color: #222;
    border: none;
    padding: 9px 22px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
}
#cookie-prihvati:hover {
    background: #ffa000;
}

/* SOCIAL MEDIA LINKOVI */
.social {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.social-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* BROJ PROIZVODA U KATEGORIJI */
.broj-proizvoda-stat {
    color: #888;
    font-size: 0.9rem;
    margin: -6px 0 14px 0;
}

/* BREADCRUMB */
.breadcrumb {
    font-size: 0.88rem;
    color: #888;
    margin-bottom: 12px;
}
.breadcrumb a {
    color: #1976d2;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    margin: 0 5px;
    color: #aaa;
}

/* ADMIN PANEL CENTRIRANJE I FORMA */
.admin-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}
#forma-dodaj-proizvod, #forma-izmeni-proizvod {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px #0001;
    padding: 32px 24px 24px 24px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#forma-dodaj-proizvod label, #forma-izmeni-proizvod label {
    font-weight: 500;
    margin-bottom: 4px;
}
#forma-dodaj-proizvod input, #forma-dodaj-proizvod textarea,
#forma-izmeni-proizvod input, #forma-izmeni-proizvod textarea {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 4px;
    margin-bottom: 10px;
    font-size: 1em;
}
#forma-dodaj-proizvod button, #forma-izmeni-proizvod button {
    align-self: center;
    padding: 10px 28px;
    font-size: 1.1em;
    border-radius: 8px;
    background: #1976d2;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}
#poruka {
    margin-top: 18px;
    text-align: center;
    font-weight: 500;
}
@media (max-width: 600px) {
    #forma-dodaj-proizvod, #forma-izmeni-proizvod {
        padding: 16px 4px 12px 4px;
        max-width: 98vw;
    }
}
/* Efekat za slike proizvoda */
.proizvod img {
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    cursor: pointer;
}
.proizvod img:hover {
    transform: scale(1.13);
    box-shadow: 0 8px 32px #0004, 0 2px 8px #0002;
    z-index: 2;
}
.modal-slika-bg {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-slika-bg.active {
    display: flex;
}
.modal-slika-bg img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 8px 32px #0008;
    background: #fff;
    padding: 8px;
}
/* Checkout page styles moved from narucivanje.html */
.checkout-section .container {
    max-width: 900px;
    margin: 0 auto;
    background: #f8f8fc;
    border-radius: 12px;
    box-shadow: 0 2px 12px #0001;
    padding: 32px 18px;
}
.checkout-content {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}
.checkout-form {
    flex: 2;
    min-width: 280px;
}
.order-summary {
    flex: 1;
    min-width: 220px;
    background: #e3f2fd;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px #0001;
}
.form-section {
    margin-bottom: 24px;
}
.form-group label {
    font-weight: bold;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.btn-primary {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 18px;
}
.btn-primary:hover {
    background: #1565c0;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.08em;
    margin-bottom: 8px;
}
.summary-row.total {
    font-size: 1.18em;
    font-weight: bold;
}
@media (max-width: 900px) {
    .checkout-content {
        flex-direction: column;
    }
}
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
body {
    font-family: 'Open Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    color: #222;
}

h1, h2, h3 {
    font-family: 'Lora', Georgia, serif;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    margin-right: 32px;
}
header {
    background: #2d2d2d;
    color: #fff;
    padding: 14px 0 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    position: relative;
}

/* Hamburger dugme — vidljivo samo na mobilnom */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.9em;
    cursor: pointer;
    padding: 6px 18px;
    margin-left: auto;
    line-height: 1;
    transition: color 0.2s;
}
.hamburger:hover {
    color: #ffb300;
}
.logo img {
    height: 85px;
    margin-left: 24px;
    margin-right: 0;
}

header nav {
    margin-left: auto;
}
nav ul.main-menu {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
nav ul.main-menu > li {
    position: relative;
}
nav ul.main-menu > li > a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
}
nav ul.main-menu > li > a:hover,
nav ul.main-menu > li > a.active {
    background: #ffb300;
    color: #222;
}
nav ul.submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #1a237e;
    color: #ffe082;
    min-width: 220px;
    min-height: 90px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 100;
    border-radius: 0 0 8px 8px;
    font-weight: bold;
    font-size: 1.08em;
    border: 1px solid #bbb;
    overflow: visible;
}
nav ul.main-menu > li:hover > ul.submenu {
    display: block;
}
nav ul.submenu li a {
    color: #ffe082;
    background: #1a237e;
    padding: 14px 22px;
    display: block;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
    white-space: normal;
}
nav ul.submenu li a:hover {
    background: #0d1335;
    color: #ffe082;
}
.hero {
    background: #fff;
    text-align: center;
    padding: 0;
    width: 100%;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hero-img {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
}
.hero-content {
    display: none;
}
.hero h1 {
    font-size: 2.2em;
    margin: 0 0 10px 0;
}
.hero .btn {
    margin-top: 15px;
}
.btn {
    display: inline-block;
    background: #ffb300;
    color: #222;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn:hover {
    background: #222;
    color: #ffb300;
}
.btn-nazad-kupovina {
    display: inline-block;
    background: transparent;
    color: #1565c0;
    border: 2px solid #1565c0;
    padding: 8px 22px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.97em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 16px;
}
.btn-nazad-kupovina:hover {
    background: #1565c0;
    color: #fff;
}
main {
    width: 100%;
    max-width: 100%;
    margin: 0 0 40px 0;
    background: #fff;
    color: #111;
    padding: 30px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: relative;
    z-index: 2;
}
.izdvojeni-proizvodi h2,
.kategorije h2,
.o-nama h2 {
    text-align: center;
    margin-top: 0;
}
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}
.proizvod {
    background: #fafafa;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 18px 12px 20px 12px;
    width: 220px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: kartica-ulaz 0.45s ease both;
}

@keyframes kartica-ulaz {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.proizvod img {
    width: 100%;
    max-width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 10px;
}
.proizvod h3 {
    font-size: 1.1em;
    margin: 10px 0 5px 0;
}
.proizvod .cena {
    color: #ffb300;
    font-weight: bold;
    margin-bottom: 10px;
}
/* Padajući meni za veličine na kartici proizvoda */
.velicine-select-wrap {
    width: 100%;
    margin-bottom: 10px;
}
.velicine-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.92em;
    font-weight: bold;
    color: #444;
}
.velicine-select {
    padding: 5px 10px;
    border-radius: 20px;
    border: 2px solid #ffb300;
    background: #fff;
    font-size: 0.95em;
    font-weight: bold;
    color: #222;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 80px;
    appearance: auto;
}
.velicine-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.15);
}
.kategorije .grid {
    gap: 40px;
}
.kategorija {
    background: #f3f3f3;
    border-radius: 8px;
    padding: 24px 18px;
    width: 320px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kategorija h3 {
    margin-top: 0;
}

/* Kategorijske kartice sa slikama na landing stranicama */
.kat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    padding: 10px 30px 30px 30px;
    max-width: 960px;
    margin: 0 auto;
}
.kat-kartica {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.11);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    background: #fff;
    cursor: pointer;
}
.kat-kartica:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}
.kat-ikona {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8em;
    line-height: 1;
}
.kat-slika-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.kat-naziv {
    padding: 14px 10px;
    font-weight: bold;
    font-size: 0.97em;
    color: #222;
    text-align: center;
    line-height: 1.3;
}
@media (max-width: 640px) {
    .kat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 10px 14px 20px 14px;
    }
    .kat-ikona, .kat-slika-img {
        height: 110px;
        font-size: 3em;
    }
}

.o-nama {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(255,255,255,0.92);
    padding: 48px 64px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    max-width: 680px;
    margin: 48px auto;
}
footer {
    background: #2d2d2d;
    color: #fff;
    text-align: center;
    padding: 18px 0 10px 0;
    border-radius: 0 0 8px 8px;
    margin: 0 10px;
}
footer nav a {
    color: #ffb300;
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.98em;
}
footer nav a:hover {
    text-decoration: underline;
}
.kontakt-info {
    margin-bottom: 8px;
}
@media (max-width: 900px) {
    .grid {
        flex-direction: column;
        align-items: center;
        padding: 0 4vw;
    }
    .hero {
        flex-direction: column;
    }
    .hero-img {
        padding: 0 2vw;
    }
    .hero-overlay h1, .hero-overlay p {
        font-size: 1.1em;
        padding: 10px 8px;
    }
    .btn {
        font-size: 1em;
        padding: 8px 16px;
    }
    .hero-content {
        margin: 0;
        max-width: 98vw;
        min-width: unset;
        padding: 12px 4vw;
    }
    main {
        padding: 10px 2vw;
    }
    .izdvojeni-proizvodi {
        padding: 18px 0;
    }
    .kategorija, .proizvod {
        width: 90vw;
        max-width: 350px;
    }
}
@media (max-width: 600px) {
    .hero-img {
        padding: 0 1vw;
    }
    .hero-overlay h1, .hero-overlay p {
        font-size: 1em;
        padding: 8px 4px;
    }
    .btn {
        font-size: 0.95em;
        padding: 7px 12px;
    }
    .hero-content {
        margin-top: 0;
        padding: 8px 2vw;
    }
    .izdvojeni-proizvodi {
        padding: 10px 0;
    }
    .kategorija, .proizvod {
        width: 98vw;
        max-width: 98vw;
    }
    main {
        padding: 2vw 1vw;
    }
}

/* ===== TOAST - KORPA ===== */
@keyframes toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(120%); }
}
.toast-korpa {
    position: fixed;
    top: 82px;
    right: 20px;
    background: #2e7d32;
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 180px;
    max-width: 300px;
    line-height: 1.4;
    border-left: 5px solid #81c784;
}
.toast-ulaz {
    animation: toast-in 0.35s cubic-bezier(.22,.68,0,1.2) both;
}
.toast-izlaz {
    animation: toast-out 0.35s ease-in both;
}

/* ===== PLUTAJUĆA KORPA ===== */
#plutajuca-korpa {
    position: fixed;
    bottom: 28px;
    left: 22px;
    width: 54px;
    height: 54px;
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 9997;
    transition: background 0.2s, transform 0.2s;
    position: fixed;
}
#plutajuca-korpa:hover {
    background: #922b21;
    transform: translateY(-3px);
}
#plutajuca-korpa svg {
    flex-shrink: 0;
}
#plutajuca-korpa-broj {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ffb300;
    color: #222;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ===== SCROLL TO TOP ===== */
#scroll-to-top {
    position: fixed;
    bottom: 28px;
    right: 22px;
    width: 46px;
    height: 46px;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4em;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: background 0.2s, transform 0.2s;
}
#scroll-to-top:hover {
    background: #ffb300;
    color: #222;
    transform: translateY(-3px);
}
#scroll-to-top.vidljiv {
    display: flex;
}

/* ===== MOBILNI NAV - HAMBURGER ===== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    header nav {
        display: none;
        width: 100%;
        order: 10;
        margin-left: 0;
        background: #1a237e;
    }

    header nav.nav-otvoren {
        display: block;
    }

    nav ul.main-menu {
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px 0;
        align-items: stretch;
    }

    nav ul.main-menu > li > a {
        display: block;
        padding: 14px 24px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    nav ul.main-menu > li:last-child > a {
        border-bottom: none;
    }

    nav ul.submenu {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        border: none;
        min-width: unset;
        background: #0d1335;
    }

    nav ul.main-menu > li:hover > ul.submenu,
    nav ul.main-menu > li:focus-within > ul.submenu {
        display: block;
    }

    nav ul.submenu li a {
        padding: 12px 36px;
        font-size: 1em;
    }

    /* Bolje hero sekcija na mobilnom */
    .hero-img {
        min-height: 380px;
    }
    .hero-img img {
        min-height: 380px;
        height: 380px;
    }

    .hero-overlay {
        background: rgba(0,0,0,0.35);
        overflow: hidden;
    }

    .hero-overlay h1 {
        font-size: 1.3em !important;
        padding: 12px 16px !important;
    }

    .hero-overlay p {
        font-size: 0.9em !important;
        padding: 10px 16px !important;
    }

    /* Sakrij hero pretragu na mobilnom — header već ima pretragu */
    #globalna-pretraga,
    #globalna-pretraga + button,
    #globalna-pretraga ~ button {
        display: none;
    }
    .hero-overlay > div:last-child {
        display: none;
    }

    /* Toast ispod headera na mobilnom */
    .toast-korpa {
        top: auto;
        bottom: 80px;
        right: 12px;
        max-width: calc(100vw - 24px);
    }
}
