/* ==========================================
   products.css - Axaja Systems
   Stil za products.html - isti dizajn kao index
   ========================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    min-height: 100vh;
    background-color: #0a0a0a;
    background-image: url('pozadina.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Poppins', sans-serif;
    color: white;
    padding-top: 80px;
}

#bubbleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}


/* ==========================================
   HEADER (isti kao index)
   ========================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid #d4af37;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo { flex-shrink: 0; }

nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 30px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

nav a:hover { color: #00ffcc; text-shadow: 0 0 8px #00ffcc; }

.separator { color: rgba(255,255,255,0.3); margin: 0 5px; }

.auth-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: 0.3s;
}
.auth-link:hover { color: #00ffcc; }

/* Gold underline hover */
.desktop-nav a {
    position: relative;
    transition: color 0.35s ease, transform 0.35s ease, letter-spacing 0.35s ease;
    display: inline-block;
}
.desktop-nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    transition: width 0.4s ease, left 0.4s ease;
}
.desktop-nav a:hover {
    color: #d4af37;
    letter-spacing: 0.5px;
    transform: translateY(-1px);
}
.desktop-nav a:hover::after {
    width: 100%;
    left: 0;
}

.header-actions .auth-link {
    transition: color 0.35s ease, transform 0.35s ease, text-shadow 0.35s ease;
}
.header-actions .auth-link:hover {
    color: #d4af37;
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(212,175,55,0.4);
}


/* ==========================================
   HAMBURGER + SIDE NAV
   ========================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 28px;
    cursor: pointer;
    z-index: 100;
    margin-right: 14px;
}
.hamburger span {
    display: block;
    height: 3px;
    background: #d4af37;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.side-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: rgba(10, 11, 13, 0.96);
    backdrop-filter: blur(14px);
    border-left: 1px solid rgba(212,175,55,0.3);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 9999;
    padding-top: 70px;
    overflow-x: hidden;
    transition: width 0.3s ease;
}
.side-nav .close-btn-side {
    position: absolute;
    top: 14px;
    right: 20px;
    font-size: 2.2rem;
    color: #d4af37;
    text-decoration: none;
    font-weight: 300;
}
.side-nav-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 24px 30px 24px;
    white-space: nowrap;
}
.side-nav-content a {
    color: #ddd;
    padding: 12px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s, padding-left 0.35s ease;
    position: relative;
    padding-left: 14px !important;
}
.side-nav-content a::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-10px, -50%);
    color: #d4af37;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    font-size: 1.1rem;
    font-weight: bold;
}
.side-nav-content a:hover {
    padding-left: 26px !important;
    color: #d4af37 !important;
    background: rgba(212,175,55,0.08);
}
.side-nav-content a:hover::before {
    opacity: 1;
    transform: translate(4px, -50%);
}
.side-nav-content hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 12px 0;
}


/* ==========================================
   MAIN - TRGOVINA / PROIZVODI
   ========================================== */
.products-main {
    max-width: 1400px;
    margin: 110px auto 60px auto;
    padding: 0 40px;
}

.products-page-header {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 20px;
    padding: 30px 35px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.products-page-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.products-page-header p {
    color: #aaa;
    font-size: 0.88rem;
    margin: 0;
}

.products-page-header-stat {
    text-align: right;
    flex-shrink: 0;
}

.products-page-header-stat span {
    display: block;
    color: #d4af37;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.products-page-header-stat small {
    color: #777;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ==========================================
   KATEGORIJA SEKCIJA (Administrativni / Igrice / Inžinjerski)
   ========================================== */
.kategorija-sekcija {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 30px;
    transition: border-color 0.3s;
}

.kategorija-sekcija:hover {
    border-color: rgba(212, 175, 55, 0.25);
}

.kategorija-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kategorija-ikona {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-boja       { background: rgba(212,175,55,0.15); color: #d4af37; border: 1px solid rgba(212,175,55,0.3); }
.igrice-boja      { background: rgba(231,76,60,0.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,0.3);  }
.inzinjerski-boja { background: rgba(52,152,219,0.15); color: #3498db; border: 1px solid rgba(52,152,219,0.3); }

.kategorija-naslov {
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kategorija-opis {
    font-size: 0.82rem;
    color: #888;
    margin: 0;
}

.kategorija-broj {
    margin-left: auto;
    font-size: 0.78rem;
    color: #d4af37;
    background: rgba(212,175,55,0.1);
    padding: 4px 12px;
    border-radius: 10px;
    border: 1px solid rgba(212,175,55,0.25);
    white-space: nowrap;
    font-weight: 600;
}


/* ==========================================
   GRID PROIZVODA
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-prazno {
    grid-column: 1 / -1;
    text-align: center;
    color: #555;
    padding: 50px 30px;
    font-size: 0.9rem;
    font-style: italic;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.06);
}


/* ==========================================
   KARTICE
   ========================================== */
.product-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: #d4af37;
    box-shadow: 0 15px 40px rgba(212,175,55,0.12);
}

.product-card-body {
    padding: 16px;
}

.product-card-naslov {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.product-card-opis {
    font-size: 0.85rem;
    color: #aaa;
    margin: 0 0 14px 0;
    line-height: 1.55;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.78rem;
}

.product-card-datum {
    color: #888;
}

.product-card-komentari {
    color: #d4af37;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 12px;
    font-weight: 600;
}

/* Skeleton loader */
.product-card-skeleton {
    height: 280px;
    border-radius: 18px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.02) 0%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.02) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}


/* ==========================================
   MODALI (Login / Register)
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(15px);
    border: 2px solid #d4af37;
    border-radius: 25px;
    padding: 50px 60px;
    width: 550px;
    margin: 5% auto;
    color: white;
    box-shadow: 0 15px 60px rgba(212,175,55,0.15);
    position: relative;
}

.modal-content h2 {
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
}
.input-group { margin-bottom: 30px; }
.input-group label {
    display: block;
    color: #f9e27d;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
}
.input-group input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(212,175,55,0.4);
    border-radius: 15px;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.4s ease;
}
.input-group input:focus {
    border-color: #d4af37;
    background: rgba(212,175,55,0.05);
    box-shadow: 0 0 15px rgba(212,175,55,0.3);
    transform: scale(1.02);
}
.btn-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e27d 100%);
    border: none;
    border-radius: 15px;
    color: #000;
    font-weight: 800;
    cursor: pointer;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    margin-top: 20px;
}
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212,175,55,0.5);
    filter: brightness(1.1);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.close-btn {
    position: absolute;
    right: 25px;
    top: 20px;
    color: #d4af37;
    font-size: 30px;
    cursor: pointer;
    transition: 0.3s;
}
.close-btn:hover { color: #fff; transform: rotate(90deg); }

.form-poruka {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.form-poruka.greska {
    background: rgba(255, 77, 77, 0.12);
    color: #ff7878;
    border: 1px solid rgba(255, 77, 77, 0.3);
}
.form-poruka.uspjeh {
    background: rgba(39, 174, 96, 0.12);
    color: #6ee59a;
    border: 1px solid rgba(39, 174, 96, 0.3);
}


/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
    background-color: #0b0e14;
    color: #ffffff;
    padding: 60px 10% 20px;
    margin-top: 50px;
    border-top: 2px solid #00ffcc;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}
.footer-column {
    flex: 1;
    min-width: 200px;
}
.footer-logo {
    color: #00ffcc;
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: 0.3s;
}
.footer-column ul li a:hover {
    color: #00ffcc;
    padding-left: 5px;
}
.social-list { list-style: none; }
.social-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #cbd5e0;
    text-decoration: none;
    padding: 5px 0;
    transition: 0.3s;
}
.social-link-item:hover {
    color: #00ffcc;
    padding-left: 5px;
}
.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: #718096;
}


/* ==========================================
   USER STATUS BOX
   ========================================== */
#user-status-box {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid #d4af37;
    padding: 12px 16px;
    border-radius: 10px;
    color: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-size: 0.9rem;
}


/* ==========================================
   JEZIK SELECTOR
   ========================================== */
#jezik-selector { position: relative; margin-right: 15px; }
.aktivan-jezik {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.aktivan-jezik:hover {
    background: rgba(0,255,204,0.1);
    border-color: #00ffcc;
    color: #00ffcc;
}
.aktivan-jezik .strelica { font-size: 0.7rem; opacity: 0.7; transition: transform 0.2s; }
.jezik-meni {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10,10,15,0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    z-index: 5000;
    flex-direction: column;
    gap: 2px;
}
.jezik-meni.otvoren { display: flex; }
.jezik-opcija {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: #aaa;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    text-align: left;
    transition: all 0.15s;
}
.jezik-opcija:hover { background: rgba(0,255,204,0.08); color: #fff; }
.jezik-opcija.izabran { background: rgba(0,255,204,0.12); color: #00ffcc; font-weight: bold; }


/* ==========================================
   RESPONZIVNOST
   ========================================== */
@media (max-width: 900px) {
    .desktop-nav { display: none !important; }
    .hamburger   { display: flex !important; }
    header {
        justify-content: space-between !important;
        padding: 10px 16px !important;
    }
    .logo img { height: 60px !important; }
    #user-status-box,
    #user-status-mini {
        display: none !important;
    }
}

/* Sakri side nav user info linkove na DESKTOPU */
@media (min-width: 901px) {
    .side-nav-user-info {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .products-main {
        padding: 0 15px;
        margin-top: 90px;
    }
    .products-page-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .products-page-header-stat { text-align: center; }
    .kategorija-sekcija { padding: 18px; }
    .kategorija-header { flex-wrap: wrap; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .modal-content {
        width: 90%;
        padding: 30px 25px;
        margin: 10% auto;
    }
    .footer-container { flex-direction: column; text-align: center; }
    .social-link-item { justify-content: center; }
    #jezik-selector { margin-right: 0; margin-bottom: 10px; }
    .jezik-meni { right: auto; left: 0; }
    .aktivan-jezik { font-size: 0.8rem; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   LANGUAGE TABS u modalima (BS, EN, DE, FR, ES, IT, TR)
   ===================================================== */
.lang-tabs {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin: 14px 0 18px 0;
    padding: 8px;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    border: 1px solid var(--line);
}
.lang-tab {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.03);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}
.lang-tab:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-1);
}
.lang-tab.active {
    background: rgba(56,200,130,0.18);
    border-color: rgba(56,200,130,0.5);
    color: #6ee0a4;
}
.lang-tab .lang-dot {
    font-size: 0.7rem;
    color: var(--text-4);
}
.lang-tab.has-data .lang-dot { color: #38c882; }
.lang-tab.required-empty {
    border-color: rgba(255,85,114,0.5);
    color: #ff7a8d;
}
.lang-tabs-info {
    font-size: 0.74rem;
    color: var(--text-3);
    margin-top: 6px;
    margin-left: 4px;
}