/* --- 1. OSNOVNE POSTAVKE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: #1a1a1a; line-height: 1.6; background: #fff; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; display: block; }

/* --- 2. HEADER (Sticky) --- */
.main-header { 
    position: sticky; 
    top: 0; 
    width: 100%;
    background: #ffffff; 
    z-index: 9999; 
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav { display: flex; justify-content: space-between; align-items: center; }

.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -1px; text-decoration: none; color: #1a1a1a; }
.logo span { color: #888; font-weight: 300; }

.nav-links { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: #1a1a1a; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; transition: 0.3s; }
.nav-links a:hover { color: #666; }

/* --- 3. PADUJUĆI IZBORNIK (DROPDOWN) --- */
.nav-links li.dropdown { position: relative; }
.nav-links .dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 280px;
    list-style: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 15px 0;
    z-index: 1000;
    border: 1px solid #eee;
}

.dropdown-menu.show { display: block !important; animation: fadeIn 0.2s ease-out; }

.dropdown-menu li { padding: 0 15px; position: relative; }
.dropdown-menu li a {
    color: #1a1a1a !important;
    padding: 8px 10px 8px 25px !important; 
    text-transform: none !important;
    font-weight: 600 !important;
}

.dropdown-menu li a::before { content: "•"; position: absolute; left: 10px; color: #888; }
.dropdown-menu li a:hover { background: #f9f9f9; border-radius: 8px; }

/* --- 4. STRANICA KATEGORIJA (Katalog) --- */
.category-header { padding: 60px 0 40px; text-align: center; }
.category-header h1 { font-size: 3rem; font-weight: 800; margin-bottom: 15px; }

.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-bottom: 60px; 
}

.product-item { 
    background: #fff; border-radius: 20px; overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #eee; transition: 0.3s;
    display: flex; flex-direction: column;
}

.product-item:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }

.product-img-container { position: relative; height: 280px; background: #f9f9f9; }
.product-img-container img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }

.product-info { padding: 25px; flex-grow: 1; }
.product-info h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.product-info p { font-size: 0.95rem; color: #666; margin-bottom: 20px; }

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.85rem; }
.spec-table td:last-child { text-align: right; font-weight: 700; }

.badge { position: absolute; top: 15px; left: 15px; padding: 6px 14px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge.premium { background: #FFD700; color: #000; }
.badge.novo { background: #1a1a1a; color: #fff; }

.btn-upit { 
    display: block; text-align: center; background: #1a1a1a; color: #fff; 
    padding: 14px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: 0.3s;
}
.btn-upit:hover { background: #333; }

/* --- 5. TRUST BOX (Brza dostava, Kvaliteta...) --- */
.trust-box { margin: 60px auto; padding: 50px; background: #fdfdfd; border-radius: 25px; border: 1px solid #f0f0f0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.trust-item { display: flex; align-items: flex-start; gap: 20px; }
.trust-item i { font-size: 2rem; color: #1a1a1a; }
.trust-item h4 { font-size: 1.1rem; margin-bottom: 8px; font-weight: 700; }
.trust-item p { font-size: 0.9rem; color: #666; }

/* --- 6. FOOTER --- */
.main-footer { background: #1a1a1a; color: #fff; padding: 80px 0 30px; margin-top: 100px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; }
.footer-bottom { text-align: center; border-top: 1px solid #333; margin-top: 60px; padding-top: 30px; font-size: 0.85rem; color: #666; }

/* --- 7. WHATSAPP FLOAT --- */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: #25d366;
    width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; z-index: 10000; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    color: #fff; font-size: 30px; text-decoration: none; transition: 0.3s;
    animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); background-color: #128c7e; }

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- 8. RESPONZIVNOST --- */
@media (max-width: 992px) {
    .trust-grid, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-content h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Ovdje bi išao mobilni meni po potrebi */
    .product-grid { grid-template-columns: 1fr; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MODERAN GRID PROIZVODA --- */
.featured-products { padding: 80px 0; background: #fff; }

.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; }
.section-title p { color: #888; font-size: 1.1rem; }

.product-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card-new {
    text-decoration: none;
    color: #1a1a1a;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.4s ease;
    border: 1px solid #f0f0f0;
}

.card-image {
    height: 300px;
    overflow: hidden;
    background: #f9f9f9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s ease;
}

.card-info { padding: 25px; text-align: center; }
.card-info h3 { font-size: 1.3rem; margin-bottom: 10px; font-weight: 700; }
.card-info span { 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: #888; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    transition: 0.3s;
}

/* HOVER EFEKTI */
.product-card-new:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: #1a1a1a;
}

.product-card-new:hover .card-image img {
    transform: scale(1.1);
}

.product-card-new:hover .card-info span {
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .product-grid-new { grid-template-columns: 1fr; }
}

html {
    scroll-behavior: smooth; /* Ovo omogućuje polagano putovanje do sekcije */
}

.section-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0));
    margin: 40px 0;
}

/* Osiguraj da sidro ne završi točno ispod stickey headera */
section {
    scroll-margin-top: 100px; 
}

/* Omogućuje da se stranica ne "trzne" nego glatko odskrola do sekcije */
html {
    scroll-behavior: smooth;
}

/* Razmak da fiksni header ne prekrije naslov sekcije nakon skrola */
section[id] {
    scroll-margin-top: 100px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #eee, transparent);
    margin: 60px 0;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.search-trigger {
    font-size: 1.2rem;
    color: #1a1a1a;
    transition: 0.3s;
}

.header-search-wrap {
    position: absolute;
    right: 0;
    top: 55px;
    background: #fff;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 40px; /* Jako zaobljeno kao pilula */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none; 
    width: 300px;
    z-index: 99999;
}

.header-search-wrap.active {
    display: flex; /* Koristimo flex za poravnanje */
    align-items: center;
    animation: fadeInDown 0.3s ease forwards;
}

.header-search-wrap input {
    width: 100%;
    padding: 12px 20px;
    border: none; /* Mičemo unutarnji okvir */
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.product-slider {
    padding: 20px 10px 50px;
    position: relative;
}

/* Prilagodba strelica da ne budu prevelike */
.swiper-button-next, .swiper-button-prev {
    color: #1a1a1a;
    background: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px;
    font-weight: 800;
}

/* Osiguraj da kartica unutar slidera ima punu širinu */
.swiper-slide {
    height: auto;
}

.product-card-overlay {
    position: relative;
    display: block;
    width: 100%;
    height: 250px; /* Možeš podesiti visinu po želji */
    border-radius: 20px; /* Jako zaobljeni rubovi */
    overflow: hidden;
    text-decoration: none;
}

.product-card-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-overlay:hover img {
    transform: scale(1.1);
}

.card-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: #fff;
}

.card-overlay-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-overlay-info span {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Smanjivanje i ušminkavanje strelica */
.swiper-button-next, .swiper-button-prev {
    width: 35px !important; /* Manje strelice */
    height: 35px !important;
    background: rgba(255, 255, 255, 0.8) !important; /* Poluprozirno bijelo */
    backdrop-filter: blur(5px); /* Moderni efekt zamućenja */
    border: 1px solid #ddd;
    color: #1a1a1a !important;
    border-radius: 50%;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 14px !important; /* Tanja i manja ikona strelice */
    font-weight: bold;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #1a1a1a;
}

/* Pozicioniranje strelica malo izvan slidera ako ima mjesta */
.swiper-button-prev { left: -10px !important; }
.swiper-button-next { right: -10px !important; }

/* Na mobitelima ih sakrijemo ili stavimo skroz uz rub */
@media (max-width: 768px) {
    .swiper-button-next, .swiper-button-prev { display: none; }
}

.swiper-button-next, .swiper-button-prev {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* --- 9. DODATAK ZA UPIT.PHP --- */
.upit-wrapper { max-width: 1100px; margin: 0 auto; }
.upit-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.upit-items { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 25px; }
.upit-form-box { background: #f9f9f9; padding: 30px; border-radius: 12px; height: fit-content; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f0f0f0; }
.main-footer { background: #1a1a1a; color: #fff; padding: 60px 0 20px; clear: both; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group textarea { 
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Inter', sans-serif; 
}
.btn-posalji { 
    width: 100%; background: #1a1a1a; color: #fff; border: none; padding: 16px; 
    border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.3s; 
}
.btn-posalji:hover { background: #333; }

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

/* --- TOTALNO ČIŠĆENJE DROPDOWNA --- */
.nav-links .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff !important;
    min-width: 220px; /* Malo uže da bude kompaktnije */
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 8px;
    padding: 5px 0 !important; /* Minimalni vertikalni razmak */
    list-style: none !important;
}

/* OVO PONIŠTAVA TOČKICU S LINIJE 145 */
.nav-links .dropdown-menu li::before {
    content: none !important; /* Eksplicitno miče "•" */
    display: none !important;
}

.nav-links .dropdown-menu li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
}

.nav-links .dropdown-menu li a {
    display: flex !important;
    align-items: center !important;
    padding: 4px 15px !important; /* JOŠ MANJI RAZMAK (prije je bilo 6px ili 10px) */
    color: #333 !important;
    text-decoration: none !important;
    gap: 10px;
    background: transparent !important;
    transition: 0.2s;
}

/* Hover samo na tekst */
.nav-links .dropdown-menu li a:hover span {
    font-weight: 800 !important;
    color: #1a1a1a !important;
}

/* Slikice u meniju */
.nav-links .dropdown-menu li a img {
    width: 32px !important; /* Malo smanjene slike za kompaktniji meni */
    height: 32px !important;
    object-fit: contain;
    border: none !important;
    background: transparent !important;
}

/* --- ZADNJI UDARAC TOČKICAMA --- */

/* Ciljamo točno tvoj custom-dropdown iz header.php */
.nav-links .custom-dropdown li::before,
.nav-links .dropdown-menu li::before,
ul.custom-dropdown li::before {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    position: absolute !important; /* Mičemo ga iz toka ako se i dalje pojavljuje */
}

/* SMANJENI RAZMAK I ČIŠĆENJE */
.nav-links .custom-dropdown {
    list-style: none !important;
    padding: 5px 0 !important;
    background-color: #fff !important;
}

.nav-links .custom-dropdown li a {
    display: flex !important;
    align-items: center !important;
    padding: 2px 15px !important; /* EKSTREMNO MALI RAZMAK */
    gap: 10px;
    background: transparent !important;
}

.nav-links .custom-dropdown li a img {
    width: 30px !important; /* Dodatno smanjena slika za uži meni */
    height: 30px !important;
    background: transparent !important;
}

/* Hover samo na tekst (moraš imati <span> u headeru) */
.nav-links .custom-dropdown li a:hover span {
    font-weight: 800 !important;
}

.dropdown-menu {
    list-style-type: none !important;
}
.dropdown-menu li {
    list-style-type: none !important;
}

/* --- KONAČNO RJEŠENJE ZA TOČKICE (Zalijepi na kraj fajla) --- */

/* 1. Prisilno uklanjanje točkice s linije 145 */
#nav-ambalaza li::before {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
}

/* 2. Osiguravanje da nema list-style-a */
#nav-ambalaza {
    list-style: none !important;
    list-style-type: none !important;
    padding: 5px 0 !important;
}

#nav-ambalaza li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Ekstremno mali razmak između linkova */
#nav-ambalaza li a {
    display: flex !important;
    align-items: center !important;
    padding: 2px 15px !important; /* Ovo ih drži stisnutima */
    gap: 10px;
    background: transparent !important;
    text-decoration: none !important;
}

/* 4. Sličice - bez pozadine i obruba */
#nav-ambalaza li a img {
    width: 30px !important;
    height: 30px !important;
    background: transparent !important;
    border: none !important;
}

/* 5. Hover efekt samo na tekst (bold) */
#nav-ambalaza li a:hover span {
    font-weight: 800 !important;
    color: #1a1a1a !important;
}

/* Makni bullet koji dolazi iz .dropdown-menu li a::before */
#nav-ambalaza li a::before {
  content: none !important;
  display: none !important;
}

/* Vrati normalan padding jer si ga prije gurao lijevo radi točkice */
#nav-ambalaza li a {
  padding-left: 15px !important;
}

/* === FOOTER SOCIAL ICONS FIX === */

.footer-socials {
    display: flex !important;
    align-items: center;
    gap: 14px;
}

.footer-socials a,
.footer-socials span {
    display: inline-flex;
    align-items: center;
}

/* hard override za SVG koji tema razvuče */
.footer-socials svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block !important;
    fill: #aaa;
}

/* hover samo za aktivni FB */
.footer-socials a:hover svg {
    fill: #1877f2;
    transform: translateY(-2px);
    transition: 0.2s ease;
}

.footer-socials .disabled svg {
    opacity: 0.5;
}

/* === RESPONSIVE GRID: 4 / 3 / 2 / 2 / 1 === */

/* 1) Veliki ekrani (default) – 4 u redu */
.product-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* 2) Manji desktop/laptop – 3 u redu */
@media (max-width: 1200px){
  .product-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 3) Tablet i veći mobiteli – 2 u redu */
@media (max-width: 900px){
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* 4) Mobitel – 2 u redu + kompaktnije kartice */
@media (max-width: 768px){
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  /* stisni karticu */
  .product-img-wrap{
    height: 140px !important;
    padding: 10px !important;
  }
  .product-info{
    padding: 12px !important;
  }
  .product-info h3{
    font-size: 1rem !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
  }
  .product-info .desc{
    font-size: 0.85rem !important;
    line-height: 1.25 !important;
    margin-bottom: 10px !important;
  }
  .spec-row{
    font-size: 0.8rem !important;
  }
  .btn-upit{
    padding: 12px !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
  }
}

/* 5) Baš mali mobiteli – 1 u redu (da ne bude zgnječeno) */
@media (max-width: 360px){
  .product-grid{
    grid-template-columns: 1fr !important;
  }
}

/* === UPIT / KOŠARICA: responsive layout === */
@media (max-width: 900px){
  .upit-wrapper{
    max-width: 100% !important;
  }

  .upit-grid{
    grid-template-columns: 1fr !important; /* umjesto 1.5fr 1fr */
    gap: 18px !important;
  }

  .upit-items,
  #cart-items-container{
    padding: 18px !important;
  }

  .upit-form-box{
    padding: 20px !important;
  }
}

/* === PRO CART: kartice na mobu === */
@media (max-width: 768px){

  /* lista dobije malo više zraka */
  #cart-items-container{
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* svaka stavka kao kartica */
  .cart-row{
    position: relative;
    display: block;                 /* više ne flex row */
    padding: 14px 44px 14px 14px;   /* desno prostora za trash */
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-bottom: none;            /* makni onu crtu */
  }

  .cart-item-text{
    display: -webkit-box;
    -webkit-line-clamp: 3;          /* max 3 reda */
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .cart-remove{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(231,76,60,0.10);
  }

  .cart-remove:hover{
    background: rgba(231,76,60,0.16);
  }
}

/* dodatni stilovi za code+title */
.cart-item-meta{ display: flex; flex-direction: column; gap: 6px; }

.cart-item-code{
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  color: #111;
  background: #f4f4f4;
  padding: 4px 8px;
  border-radius: 10px;
  width: fit-content;
}

.cart-item-title{
  font-size: 0.95rem;
  line-height: 1.35;
  color: #111;
  word-break: break-word;
}

/* =========================
   CART: Desktop default (vrati layout)
   ========================= */
.cart-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  position: static;
}

.cart-item-text{
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.cart-remove{
  position: static;
  width: auto;
  height: auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: transparent;
}

/* =========================
   CART: Pro kartice samo na mobu
   ========================= */
@media (max-width: 768px){

  #cart-items-container{
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .cart-row{
    position: relative;
    display: block;
    padding: 14px 54px 14px 14px;  /* desno mjesta za trash */
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    border-bottom: none;
  }

  /* ako koristiš Option B (code+title) */
  .cart-item-meta{ display:flex; flex-direction:column; gap: 6px; }

  .cart-item-code{
    display: inline-block;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2px;
    color: #111;
    background: #f4f4f4;
    padding: 4px 8px;
    border-radius: 10px;
    width: fit-content;
  }

  .cart-item-title{
    font-size: 0.95rem;
    line-height: 1.35;
    color: #111;
    word-break: break-word;
  }

  .cart-remove{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(231,76,60,0.10);
  }
  .cart-remove:hover{
    background: rgba(231,76,60,0.16);
  }
}

/* =========================
   UPIT (cart) – reprezentativni UI
   ========================= */

/* container već ima border/padding inline, ali kartice ćemo držat uredne */
#cart-items-container{
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* redak */
.cart-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 6px;
  border-bottom: 1px solid #f0f0f0;
}

/* lijevi dio (šifra + naziv) */
.cart-item-meta{
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cart-item-code{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f4f4;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}

.cart-item-title{
  font-size: 0.98rem;
  line-height: 1.35;
  color: #1a1a1a;
  word-break: break-word;
}

/* desni dio (qty + kanta) */
.cart-actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* qty input kao pill */
.cart-qty{
  width: 72px;
  height: 40px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 0 10px;
  text-align: center;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  background: #fafafa;
  outline: none;
  transition: 0.2s;
}

.cart-qty:focus{
  background: #fff;
  border-color: #bbb;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

/* makni spinnere (Chrome/Edge) */
.cart-qty::-webkit-outer-spin-button,
.cart-qty::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
/* Firefox */
.cart-qty{ -moz-appearance: textfield; }

/* kanta – uredan gumb */
.cart-remove{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.cart-remove i{
  font-size: 1rem;
  color: #1a1a1a;
  opacity: 0.85;
}

.cart-remove:hover{
  border-color: #bbb;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* =========================
   MOB: kartice + akcije gore desno
   ========================= */
/* FIX: mob – makni overlap qty + kanta */
/* =========================
   FINAL MOB LAYOUT FIX
   ========================= */
@media (max-width: 768px) {

  .cart-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 15px !important;
    gap: 12px !important;
    position: relative !important;
  }

  .cart-item-meta{
    width: 100% !important;
    margin: 0 !important;
  }

  /* footer red za qty + kanta */
  .cart-actions{
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-top: 1px solid #f5f5f5 !important;
    padding-top: 10px !important;
    margin-top: 4px !important;
    gap: 10px !important;
  }

  /* qty kompaktan */
  .cart-qty{
    width: 72px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
    text-align: center !important;
  }

  /* kanta desno, bez absolute */
  .cart-remove{
    position: static !important;
    margin-left: auto !important;
    width: 36px !important;
    height: 36px !important;
  }

  /* malo manji tekst */
  .cart-item-title{
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
  }
}

/* NOVI PEČAT DIZAJN - FINALNA VERZIJA */
.pecat-badge {
    width: 85px !important;
    height: 85px !important;
    border: 4px double #e74c3c !important; /* Dupli rub kao pečat */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.95) !important;
    transform: rotate(-12deg) !important; /* Zakrivljenost */
    box-shadow: 0 0 0 2px white !important;
}

.pecat-unutra {
    text-align: center !important;
    color: #e74c3c !important;
    line-height: 1 !important;
}

.pecat-top {
    font-family: 'Arial Black', sans-serif !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    display: block !important;
    margin: 0 !important;
}

.pecat-crta {
    height: 2px !important;
    background: #e74c3c !important;
    width: 100% !important;
    margin: 2px 0 !important;
}

.pecat-proizvod {
    font-family: Arial, sans-serif !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    display: block !important;
    letter-spacing: 0.5px !important;
}

/* OVO JE NAJJEDNOSTAVNIJE RJEŠENJE - dodaj na kraj CSS-a */
@media (max-width: 768px) {
    .controls-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .filter-input {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .filter-input input {
        width: 100% !important;
    }
    
    .reset-btn {
        width: 100% !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        justify-content: center !important;
    }
    
    .sort-buttons {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .sort-buttons span {
        font-size: 0.8rem !important; /* Umjesto toga, stavi manji font */
        white-space: nowrap !important;
        margin-right: 5px !important;
    }
}

/* Desktop - gumb pored inputa */
@media (min-width: 769px) {
    .controls-top {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        flex-wrap: nowrap !important;
    }
    
    .filter-input {
        flex: 1 !important;
        min-width: 300px !important;
    }
    
    .reset-btn {
        white-space: nowrap !important;
    }
}

/* --- STILOVI ZA RESET GUMB --- */
.reset-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,245,245,0.9)) !important;
    border: 1px solid rgba(200, 200, 200, 0.5) !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    color: #555 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    backdrop-filter: blur(10px) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    height: 48px; /* Ista visina kao input */
}

.reset-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(235,235,235,0.95)) !important;
    border-color: rgba(187, 187, 187, 0.9) !important;
    color: #333 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.reset-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* --- RESPONZIVNOST ZA KONTROLE --- */

/* Desktop: gumb pored inputa */
@media (min-width: 769px) {
    .controls-top {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        flex-wrap: nowrap !important;
    }
    
    .filter-input {
        flex: 1 !important;
        min-width: 300px !important;
    }
    
    .reset-btn {
        flex-shrink: 0; /* Ne smanjuj se */
    }
}

/* Mobile: gumb ispod inputa */
@media (max-width: 768px) {
    .controls-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .filter-input {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .filter-input input {
        width: 100% !important;
        height: 48px !important; /* Ista visina kao gumb */
    }
    
    .reset-btn {
        width: 100% !important;
        margin-bottom: 10px !important;
        justify-content: center !important;
    }
    
    .sort-buttons {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* Sakrij "Sortiraj:" tekst na mobitelu da štedi prostor */
    .sort-buttons span {
        font-size: 0 !important; /* Sakrij tekst */
    }
    
    .sort-buttons span::before {
        content: "⇅"; /* Ili neka druga ikona */
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #555;
        margin-right: 5px;
    }
}

/* Za veće mobile ekrane možemo staviti gumb pored inputa */
@media (min-width: 481px) and (max-width: 768px) {
    .controls-top {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .filter-input {
        flex: 1 !important;
        min-width: 200px !important;
        margin-bottom: 0 !important;
    }
    
    .reset-btn {
        width: auto !important;
        flex-shrink: 0 !important;
    }
    
    .sort-buttons {
        width: 100% !important;
        margin-top: 10px !important;
    }
}

/* Input polje - osiguraj da je iste visine kao gumb */
.filter-input input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(221, 221, 221, 0.7);
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    height: 48px; /* Ista visina kao gumb */
    box-sizing: border-box;
}

.filter-input input:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(26, 26, 26, 0.4);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

/* Alternative: zamijeni tekst sa ikonom na mobilu */
@media (max-width: 768px) {
    .sort-buttons span {
        font-size: 0 !important; /* Sakrij tekst */
    }
    
    .sort-buttons span::before {
        content: "⇅"; /* Ili neka druga ikona */
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #555;
        margin-right: 5px;
    }
}

/* Gumb "IZRAČUNAJ UŠTEDU" */
button.btn-calc {
  width: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px !important;
  margin-top: 10px;

  border: 1px solid #16a34a !important;
  background: #16a34a !important;
  color: #fff !important;

  border-radius: 10px !important;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.2px;

  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

/* IZRAČUNAJ UŠTEDU – kompaktna verzija */
button.btn-calc {
  width: 100% !important;
  height: 44px;                /* ista visina kao "Dodaj u upit" */
  padding: 0 14px !important;
  margin: 8px 0 6px;           /* mali razmak između gumba */

  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border-radius: 8px !important;
  font-size: 0.9rem;
  font-weight: 700;
  
    background:#fff !important;
  color:#16a34a !important;
  border:1px solid #16a34a !important;
  box-shadow:none !important;
}

/* Ikonica malo manja */
button.btn-calc i {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Suptilniji hover (da ne nadjača glavni CTA) */
button.btn-calc:hover {

  
    background:#16a34a !important;
  color:#fff !important;
}
