:root {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #e0e0e0;
    --accent: #4dabf7;
    --accent-hover: #64b5f6;
    --border: #2a2a2a;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: var(--card);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
header h1 {
    margin: 0;
    font-size: 22px;
    color: var(--accent);
}
header .cart-icon {
    font-size: 26px;
    cursor: pointer;
    position: relative;
}
header .cart-icon::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px 6px;
}

/* ===== PROIZVODI ===== */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 150px 25px 25px;
    justify-content: center;
}
.product {
    background: var(--card);
    border-radius: 12px;
    padding: 15px;
    width: 22%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .2s ease, box-shadow .2s ease;
}
.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(77,171,247,0.4);
}
.product img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: var(--card);
    border-radius: 8px;
}
.product h3 {
    margin: 10px 0 5px;
}
.product p {
    font-size: 14px;
    color: #bbb;
}
.price {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    white-space: nowrap;
}
button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .2s;
}
button:hover { background: var(--accent-hover); }

/* ===== KOŠARICA ===== */
.cart {
    position: fixed;
    right: -480px;
    top: 0;
    height: 100%;
    width: 450px;
    background: var(--card);
    padding: 20px;
    border-left: 2px solid var(--border);
    box-shadow: -2px 0 10px rgba(0,0,0,0.4);
    overflow-y: auto;
    overflow-x: hidden;
    transition: right .35s ease;
    z-index: 1001;
}
.cart.active { right: 0; }

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    z-index: 1000;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}
.close-cart {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    transition: color .2s;
}
.close-cart:hover {
    color: #fc0505b9;
    background: var(--card);
}

/* ===== TABLICA KOŠARICE ===== */
.cart table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: auto;
}
.cart td {
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
}
.cart td:nth-child(1) { width: 45%; }
.cart td:nth-child(2) { width: 30%; text-align: center; }
.cart td:nth-child(3) { width: 20%; text-align: right; }
.cart td:nth-child(4) { width: 5%; text-align: right; }

/* Gumbi količine 
.cart td button {
    background: none;
    color: var(--accent);
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    padding: 0 4px;
}
.cart td button:hover {
    color: var(--accent-hover);
}
*/
/* Gumbi količine - novo  */
.cart td button {
    background: color-mix(in srgb, var(--card) 80%, white 20%);
    color: var(--accent);
    border: none;
    border-radius: 4px;
    font-size: 12px;                  /* manji od 20px */
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    padding: 2px 4px;                 /* kompaktni razmak */
}
.cart td button:hover {
    background: #3a3a3a;              /* malo svjetlija pozadina pri hoveru */
    color: var(--accent-hover);
}

/* =============  kraj  =================  */

.cart td input[type="text"] {
    width: 32px;
    text-align: center;
    background: transparent;
    color: white;
    border: none;
    font-size: 14px;
    margin: 0 2px;
    vertical-align: middle;
}

/* ===== UKUPNO I POŠTARINA ===== */
.shipping {
    text-align: right;
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}
.total {
    text-align: right;
    font-weight: bold;
    font-size: 16px;
    margin-top: 8px;
}

/* ===== FORMA ZA NARUDŽBU ===== */
form {
    margin-top: 15px;
    text-align: center;
}
input[type=text], input[type=email] {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    background: #2a2a2a;
    color: white;
    border: none;
    border-radius: 6px;
}
.submit-btn {
    background: var(--accent);
    width: 100%;
    margin-top: 10px;
    font-size: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .product { width: 47%; }
}

@media (max-width: 800px) {
    .cart {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        height: auto;
        border-radius: 16px 16px 0 0;
        padding: 20px;
        border-left: none;
        transition: none;
        display: none;
        overflow-x: hidden;
    }
    .cart.active { display: block; }
    .overlay { display: none; }
    .product { width: 100%; }
}
/* ===== DODATNI STILOVI ===== --> */
  
    .nav-link {
      color: var(--accent);
      text-decoration: none;
      font-weight: 500;
      transition: color 0.2s ease;
    }
    .nav-link:hover {
      color: var(--accent-hover);
    }

    .ntc-section {
      background: var(--bg);
      color: var(--text);
      padding: 120px 25px 60px;
      line-height: 1.7;
    }

    .ntc-container {
      max-width: 900px;
      margin: 0 auto;
      background: var(--card);
      border-radius: 16px;
      padding: 40px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.5);
      border: 1px solid var(--border);
    }

    .ntc-title {
      color: var(--accent);
      text-align: center;
      font-size: 28px;
      margin-bottom: 25px;
    }

    .ntc-container h3 {
      color: var(--accent);
      margin-top: 30px;
      margin-bottom: 10px;
      font-size: 20px;
    }

    .ntc-container p {
      margin-bottom: 14px;
      color: var(--text);
    }

    .ntc-container ol, 
    .ntc-container ul {
      margin-left: 25px;
      margin-bottom: 16px;
    }

    .ntc-container li {
      margin-bottom: 6px;
    }

    .ntc-btn {
      display: inline-block;
      margin-top: 25px;
      background: var(--accent);
      color: white;
      padding: 10px 18px;
      border-radius: 8px;
      text-decoration: none;
      transition: background 0.2s ease;
      font-weight: bold;
    }

    .ntc-btn:hover {
      background: var(--accent-hover);
    }

    @media (max-width: 768px) {
      .ntc-container {
        padding: 25px 20px;
      }
      .ntc-title {
        font-size: 24px;
      }
    }
    /* stilovi za modal detalji o proizvodu */
    
/* ===== MODAL STIL ===== */
.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.product-modal * { -webkit-tap-highlight-color: transparent; }

.product-modal.active {
  display: flex;
}

/* ----- MODAL BOX ----- */
.modal-content {
  position: relative;       /* ključni dio */
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  max-width: 560px;
  width: 90%;
  padding: 25px 20px 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  text-align: center;
  
  /* 🧩 OGRANIČI VISINU I DODAJ SCROLL */
  max-height: 90vh;           /* najviše 90% visine ekrana */
  overflow-y: auto;           /* scroll unutar modala */
  scrollbar-width: thin;      /* tanja traka (Firefox) */
  scrollbar-color: var(--accent) var(--card);
}
.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 4px;
}


/* ----- GUMB ✕ (sad span, ne button) ----- */
.close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 16px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  user-select: none;
  transition: color 0.25s ease, transform 0.2s ease;
  line-height: 1;
}

.close-modal:hover {
  color: #ff4d4d;
  transform: scale(1.2);
}

/* nema više plavih efekata jer nije button */
.modal-image {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  background: #222;
  margin-bottom: 15px;
}

.modal-content button {
  margin-top: 12px;
  width: 100%;
}

.short-desc {
  font-size: 14px;
  color: #bbb;
  margin-bottom: 10px;
}

.long-desc {
  margin-top: 10px;
  text-align: left;
  font-size: 14px;
  color: #ccc;
  line-height: 1.6;
}

.long-desc ul {
  padding-left: 18px;
}