:root{
  --blue:#4f74ff;
  --blue2:#5a82ff;
  --bg:#f4f6fb;
  --text:#0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --shadow:0 12px 28px rgba(2,8,23,.12);
  --shadow2:0 8px 18px rgba(2,8,23,.10);
  --radius:18px;
  --radius2:14px;
  --primary-blue:#4f74ff;
  --secondary-blue:#5a82ff;
  --darkbar:#1f2937;
  --darkbar-2:#111827;

  --dark-ui:#1f2937;
  --dark-ui-2:#111827;
  --dark-ui-3:#0f172a;
  --dark-border:rgba(148,163,184,.18);
  --dark-text:#e5e7eb;
  --dark-muted:#94a3b8;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}

body{
  min-height:100vh;
}

body.modal-open{
  overflow:hidden;
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

.container{
  width:min(1200px,92%);
  margin:0 auto;
}

/* HEADER */
.header{
  position:sticky;
  top:0;
  z-index:5000;
  background:var(--darkbar);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 28px rgba(0,0,0,.16);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.header-inner{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  position:relative;
  padding:8px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  font-weight:900;
  letter-spacing:.3px;
  min-width:0;
  flex:0 1 auto;
}

.brand img{
  width:40px;
  height:40px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
  flex:0 0 auto;
  object-fit:cover;
}

.brand span{
  font-size:18px;
  white-space:nowrap;
}

.nav{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.nav a{
  color:#fff;
  padding:9px 13px;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.06);
  transition:.2s ease;
  white-space:nowrap;
  font-size:14px;
}

.nav a:hover,
.nav a.active{
  background:rgba(255,255,255,.14);
}

.nav-toggle{
  display:none;
  width:42px;
  height:42px;
  border:none;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:22px;
  cursor:pointer;
  border:1px solid rgba(255,255,255,.08);
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  transition:.2s ease;
}

.nav-toggle:hover{
  background:rgba(255,255,255,.14);
}

.badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#c11212;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  line-height:1;
}

/* HERO */
.hero{
  position:relative;
  min-height:70vh;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.hero-slides{
  position:absolute;
  inset:0;
  z-index:0;
}

.hero-slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  opacity:0;
  transform:scale(1.02);
  transition:opacity 900ms ease, transform 1200ms ease;
}

.hero-slide.active{
  opacity:1;
  transform:scale(1);
}

.hero-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(45deg, rgba(66,103,242,.65), rgba(90,122,247,.65));
}

.hero-box{
  position:relative;
  z-index:2;
  text-align:center;
  max-width:720px;
  width:min(92%,720px);
  padding:28px 18px;
  color:#fff;
}

.hero-title{
  font-size:clamp(2rem, 5vw, 3.6rem);
  font-weight:800;
  margin:0 0 10px;
  text-shadow:0 10px 28px rgba(0,0,0,.35);
}

.hero-sub{
  margin:0 0 18px;
  font-size:clamp(1rem, 2.2vw, 1.25rem);
  opacity:.95;
  text-shadow:0 8px 22px rgba(0,0,0,.28);
}

.btn{
  border:0;
  cursor:pointer;
  padding:14px 22px;
  border-radius:999px;
  font-weight:800;
  font-size:16px;
  box-shadow:var(--shadow2);
  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
}

.btn.primary{
  background:#fff;
  color:#0f172a;
  border:2px solid var(--darkbar);
}

.btn.primary:hover{
  background:#f8fafc;
}

.btn.outline{
  background:#fff;
  color:#0f172a;
  border:2px solid var(--darkbar);
}

.btn.outline:hover{
  background:#f8fafc;
  color:#0f172a;
}

.hero .btn.primary{
  background:transparent !important;
  color:#fff !important;
  border:2px solid #fff !important;
}

.hero .btn.primary:hover{
  background:rgba(255,255,255,0.1) !important;
}

.center{
  display:flex;
  justify-content:center;
  align-items:center;
}

/* PAGE */
.page{
  padding:42px 0 60px;
}

.h1{
  font-size:44px;
  margin:0 0 26px;
  text-align:center;
}

.h2{
  font-size:34px;
  margin:0 0 18px;
}

.section-title{
  margin:20px 0 8px;
}

/* GRID / CARDS */
.grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
}

.about-features{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:26px;
  max-width:100%;
}

.category-card{
  text-align:center;
  cursor:pointer;
  transition:.15s transform ease;
}

.category-card:hover{
  transform:translateY(-3px);
}

.icon{
  width:60px;
  height:60px;
  border-radius:16px;
  margin:0 auto 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(79,116,255,.10);
  color:var(--blue);
  font-size:30px;
  font-weight:900;
}

.category-card h3{
  margin:0 0 8px;
  font-size:20px;
}

.category-card p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

/* FILTER BAR */
.filter-row{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
  margin:18px 0 26px;
}

.select,.input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:2px solid var(--darkbar);
  background:#fff;
  color:#0f172a;
  font-size:15px;
  outline:none;
}

.select:focus,.input:focus{
  border-color:var(--darkbar-2);
  box-shadow:0 0 0 4px rgba(31,41,55,.12);
}

.filter-col{
  flex:1;
  min-width:260px;
}

/* PRODUCTS */
.products{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.p-card{
  padding:18px;
}

.p-img{
  width:100%;
  height:170px;
  object-fit:contain;
  background:#ffffff;
  padding:10px;
}

.p-name{
  margin:12px 0 6px;
  font-weight:900;
}

.p-meta{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.p-price{
  margin:10px 0 12px;
  font-size:18px;
  font-weight:900;
}

.p-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.small{
  padding:10px 14px;
  font-size:14px;
}

.p-size{
  margin:10px 0 12px;
  padding:10px 12px;
  border-radius:12px;
}

/* EMPTY */
.empty{
  text-align:center;
  color:var(--muted);
  padding:40px 0;
}

.empty .big{
  font-size:62px;
  opacity:.5;
  margin-bottom:10px;
}

/* CART */
.cart-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:22px;
}

.cart-box{
  min-height:240px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.summary .row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid var(--dark-border);
}

.summary .total{
  margin-top:14px;
  background:#fff;
  border:2px solid var(--darkbar);
  border-radius:14px;
  padding:14px;
  font-weight:900;
  display:flex;
  justify-content:space-between;
}

/* FOOTER */
.footer{
  background:var(--darkbar);
  color:#e5e7eb;
  padding:34px 0;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1fr;
  gap:22px;
}

.footer h4{
  margin:0 0 12px;
}

.footer p{
  margin:8px 0;
  color:#cbd5e1;
}

.footer a{
  color:#cbd5e1;
}

.footer a:hover{
  color:#fff;
}

.footer ul{
  list-style:none;
  padding:0;
  margin:0;
}

.footer li{
  margin:10px 0;
}

/* ADMIN */
.admin-wrap{
  min-height:100vh;
  background:linear-gradient(180deg,var(--blue),#486df8);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px;
}

.login-card{
  width:min(520px,92%);
  background:#fff;
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:34px;
}

.login-title{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:center;
  margin-bottom:18px;
}

.login-title h2{
  margin:0;
  font-size:28px;
}

.help{
  margin-top:10px;
  color:var(--muted);
  font-size:13px;
  text-align:center;
}

.admin-shell{
  min-height:100vh;
  background:#f6f7fb;
}

.admin-top{
  min-height:64px;
  background:#fff;
  border-bottom:1px solid #eef2ff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 18px;
  gap:12px;
}

.admin-top .right{
  display:flex;
  align-items:center;
  gap:12px;
}

.pill{
  background:#fee2e2;
  color:#991b1b;
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}

.admin-main{
  display:flex;
  min-width:0;
}

.sidebar{
  width:260px;
  background:#fff;
  border-right:1px solid #eef2ff;
  padding:14px;
  flex:0 0 260px;
}

.side-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-radius:14px;
  cursor:pointer;
  color:#0f172a;
  min-width:0;
  min-height:52px;
  font-weight:600;
  transition:.2s ease;
}

.side-link.active{
  background:rgba(79,116,255,.12);
  color:var(--blue);
  font-weight:600;
}

.side-link .badge{
  margin-left:auto;
  flex-shrink:0;
}

.admin-content{
  flex:1;
  min-width:0;
  padding:22px;
  width:100%;
  overflow-x:auto;
}

.admin-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:0 0 14px;
}

.admin-section-head h2{
  margin:0;
  font-size:28px;
  font-weight:900;
}

.stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:16px 0 22px;
}

.stat{
  background:#fff;
  border-radius:16px;
  box-shadow:var(--shadow2);
  padding:16px;
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}

.stat .s-ico{
  width:46px;
  height:46px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
  flex:0 0 auto;
}

.s-blue{background:#3b82f6}
.s-red{background:#ef4444}
.s-green{background:#22c55e}
.s-yellow{background:#f59e0b}

.table{
  width:100%;
  min-width:900px;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow2);
}

.table th,.table td{
  padding:12px 14px;
  border-bottom:1px solid #eef2ff;
  text-align:left;
  font-size:14px;
}

.table th{
  background:var(--dark-ui);
  color:var(--dark-text);
  font-weight:900;
}

.tag{
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  display:inline-block;
}

.t-wait{background:#fde68a;color:#92400e}
.t-ok{background:#bbf7d0;color:#166534}
.t-proc{background:#bfdbfe;color:#1e40af}
.t-no{background:#fecaca;color:#7f1d1d}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.iconbtn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
}

.b-ok{background:#16a34a}
.b-proc{background:#2563eb}
.b-no{background:#dc2626}
.b-edit{background:#f59e0b}
.b-del{background:#ef4444}

/* MODALS */
.modal,
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9999;
}

.modal.open,
.modal-backdrop.open{
  display:flex;
}

.modal-card{
  width:min(600px,100%);
  max-height:90vh;
  overflow-y:auto;
  background:#fff;
  color:#0f172a;
  border:2px solid var(--darkbar);
  border-radius:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  animation:modalFade .25s ease;
  overflow:hidden;
}

/* LABELI (Ime, Prezime...) */
.checkout-form label{
  color:#0f172a !important;
  font-weight:700;
}

/* INPUT TEXT */
.checkout-form input{
  color:#0f172a !important;
  font-weight:500;
}

/* PLACEHOLDER (tekst u inputu) */
.checkout-form input::placeholder{
  color:#64748b;
}

/* RADIO TEXT (Plaćanje pouzećem) */
.payopt span{
  color:#0f172a !important;
  font-weight:600;
}

/* DISABLED TEXT (kartica uskoro) */
.payopt.disabled span,
.payopt small{
  color:#64748b !important;
}

@keyframes modalFade{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:16px 20px;
  background:var(--darkbar);
  color:#fff;
  border-bottom:1px solid var(--dark-border);
}

.modal-head h3{
  margin:0;
  font-size:18px;
  font-weight:700;
}

.close,
.modal-close{
  border:0;
  cursor:pointer;
  font-weight:900;
}

.close{
  background:#fff;
  color:#0f172a;
  border:2px solid var(--darkbar);
  border-radius:10px;
  padding:8px 10px;
}

.modal-close{
  width:38px;
  height:38px;
  border-radius:12px;
  background:rgba(255,255,255,.10);
  color:#fff;
  font-size:18px;
  transition:.2s;
  border:1px solid rgba(255,255,255,.08);
}

.modal-close:hover{
  background:rgba(255,255,255,.18);
}

.modal-body{
  padding:20px;
  color:var(--dark-text);
  line-height:1.6;
  font-size:15px;
  max-height:60vh;
  overflow-y:auto;
  white-space:pre-wrap;
}

.checkout-form{
  padding:16px;
  color:var(--dark-text);
}

.row2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}

.field label{
  font-weight:600;
  font-size:14px;
  color:var(--dark-text);
}

.payopt{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px;
  border:2px solid var(--darkbar);
  border-radius:12px;
  cursor:pointer;
  background:#fff;
  color:#0f172a;
}

.payopt small{
  display:block;
  color:var(--dark-muted);
  margin-top:4px;
}

.payopt.disabled{
  opacity:.55;
  cursor:not-allowed;
}

#saveProduct,
#cancelProduct{
  padding:10px 26px !important;
  font-size:16px !important;
  min-height:44px;
  border-radius:999px;
}

/* TERMS */
.terms-modal{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.72);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:10000;
}

.terms-modal.open{
  display:flex;
}

.terms-box{
  width:min(640px,100%);
  max-height:90vh;
  overflow:hidden;
  background:#fff;
  color:#0f172a;
  border:2px solid var(--darkbar);
  border-radius:22px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}

.terms-head{
  padding:18px 22px;
  background:var(--darkbar);
  color:#fff;
  border-bottom:1px solid var(--dark-border);
}

.terms-head h2{
  margin:0;
  font-size:22px;
}

.terms-intro{
  margin:0;
  padding:18px 22px 6px;
  color:#334155;
  line-height:1.6;
}

.terms-scroll{
  margin:0 22px;
  max-height:260px;
  overflow-y:auto;
  border:2px solid var(--darkbar);
  border-radius:16px;
  padding:16px;
  background:#fff;
  line-height:1.7;
  color:#0f172a;
}

.terms-scroll p{
  margin:0 0 12px;
}

.terms-scroll p:last-child{
  margin-bottom:0;
}

.terms-check{
  padding:16px 22px 6px;
  color:#0f172a;
  font-weight:600;
}

.terms-check label{
  display:flex;
  gap:10px;
  align-items:flex-start;
  line-height:1.5;
}

.terms-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  padding:16px 22px 22px;
  flex-wrap:wrap;
}

/* ADMIN DARK */
body.admin-dark{
  background:#0b1220;
  color:#e5e7eb;
}

body.admin-dark .admin-shell{
  min-height:100vh;
  background:#0b1220;
}

body.admin-dark .admin-top{
  min-height:70px;
  background:rgba(15,23,42,.75);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(148,163,184,.14);
  color:#e5e7eb;
}

body.admin-dark .admin-top > div:first-child{
  color:#e5e7eb !important;
  font-size:22px;
}

body.admin-dark .pill{
  background:rgba(239,68,68,.18);
  color:#fecaca;
  border:1px solid rgba(239,68,68,.25);
}

body.admin-dark .pill:hover{
  background:rgba(239,68,68,.25);
}

body.admin-dark .admin-main{
  min-height:calc(100vh - 70px);
  display:flex;
}

body.admin-dark .sidebar{
  width:280px;
  flex:0 0 280px;
  background:rgba(15,23,42,.75);
  backdrop-filter:blur(10px);
  border-right:1px solid rgba(148,163,184,.14);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

body.admin-dark .admin-content{
  flex:1;
  min-width:0;
  padding:24px;
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(79,116,255,.16), transparent 55%),
    radial-gradient(1000px 600px at 85% 10%, rgba(34,197,94,.10), transparent 55%),
    #0b1220;
}

body.admin-dark .side-link{
  font-size:16px;
  padding:14px 14px;
  border-radius:14px;
  color:#cbd5e1;
  background:transparent;
  border:1px solid transparent;
  min-height:58px;
  justify-content:flex-start;
}

body.admin-dark .side-link:hover{
  background:rgba(148,163,184,.08);
  border-color:rgba(148,163,184,.12);
}

body.admin-dark .side-link.active{
  background:linear-gradient(135deg, rgba(79,116,255,.22), rgba(90,122,247,.14));
  border-color:rgba(79,116,255,.35);
  color:#e5e7eb;
  font-weight:600;
}

body.admin-dark .badge{
  background:#ef4444;
  color:#fff;
}

body.admin-dark h2,
body.admin-dark h3{
  color:#e5e7eb;
}

body.admin-dark .stat{
  background:rgba(15,23,42,.70);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:none;
}

body.admin-dark .stat > div:last-child div:last-child{
  color:#94a3b8 !important;
}

body.admin-dark .stat .s-ico{
  box-shadow:0 12px 24px rgba(0,0,0,.25);
}

body.admin-dark .card{
  background:rgba(15,23,42,.70);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:none;
  color:#e5e7eb;
}

body.admin-dark .table{
  background:rgba(15,23,42,.70);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:none;
  color:#e5e7eb;
}

body.admin-dark .table th{
  background:rgba(2,6,23,.35);
  color:#e5e7eb;
  border-bottom:1px solid rgba(148,163,184,.14);
}

body.admin-dark .table td{
  border-bottom:1px solid rgba(148,163,184,.10);
  color:#cbd5e1;
}

body.admin-dark .table tr:hover td{
  background:rgba(148,163,184,.06);
}

body.admin-dark .t-wait{background:rgba(245,158,11,.20);color:#fde68a}
body.admin-dark .t-ok{background:rgba(34,197,94,.18);color:#bbf7d0}
body.admin-dark .t-proc{background:rgba(59,130,246,.18);color:#bfdbfe}
body.admin-dark .t-no{background:rgba(239,68,68,.18);color:#fecaca}

body.admin-dark .input,
body.admin-dark .select,
body.admin-dark textarea.input{
  background:rgba(2,6,23,.35);
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,.18);
}

body.admin-dark .input::placeholder{
  color:rgba(203,213,225,.55);
}

body.admin-dark .input:focus,
body.admin-dark .select:focus{
  border-color:rgba(79,116,255,.55);
  box-shadow:0 0 0 4px rgba(79,116,255,.18);
}

body.admin-dark .btn{
  box-shadow:none;
}

body.admin-dark .btn.primary{
  background:linear-gradient(135deg, #4f74ff, #5a82ff);
  color:#fff;
}

body.admin-dark .modal{
  background:rgba(2,6,23,.72);
}

body.admin-dark .modal-card{
  background:rgba(15,23,42,.92);
  border:1px solid rgba(148,163,184,.14);
  color:#e5e7eb;
}

body.admin-dark .modal-head{
  background:linear-gradient(135deg, rgba(79,116,255,.35), rgba(90,122,247,.22));
}

body.admin-dark .close{
  background:rgba(148,163,184,.10);
  color:#e5e7eb;
}

body.admin-dark .close:hover{
  background:rgba(148,163,184,.16);
}

body.admin-dark .admin-wrap{
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(79,116,255,.22), transparent 55%),
    radial-gradient(900px 500px at 80% 20%, rgba(34,197,94,.14), transparent 55%),
    #0b1220;
}

body.admin-dark .login-card{
  background:rgba(15,23,42,.78);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:none;
  color:#e5e7eb;
}

body.admin-dark .login-title div:last-child div{
  color:#94a3b8 !important;
}

/* RESPONSIVE */
@media (max-width:1100px){
  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .about-features{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .products{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .footer-grid{
    grid-template-columns:1fr 1fr;
  }

  .stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px){
  body.admin-dark .sidebar{
    width:100%;
    flex:1 1 auto;
  }

  body.admin-dark .admin-main{
    flex-direction:column;
  }
}

@media (max-width:768px){
  .container{
    width:min(100%,94%);
  }

  .header{
    background:var(--darkbar);
    box-shadow:0 8px 24px rgba(0,0,0,.20);
  }

  .header-inner{
    min-height:56px;
    padding:8px 0;
  }

  .brand img{
    width:32px;
    height:32px;
  }

  .brand span{
    font-size:14px;
    max-width:130px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .nav-toggle{
    display:flex;
    margin-left:auto;
  }

  .nav{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    flex-direction:column;
    gap:8px;
    padding:12px;
    background:var(--darkbar);
    border:1px solid rgba(255,255,255,.06);
    border-radius:16px;
    box-shadow:0 20px 40px rgba(0,0,0,.28);
    z-index:6000;
  }

  .nav.open{
    display:flex;
  }

  .nav a{
    width:100%;
    justify-content:space-between;
    padding:12px 14px;
    font-size:14px;
    border-radius:14px;
    background:rgba(255,255,255,.05);
  }

  .badge{
    min-width:18px;
    height:18px;
    font-size:10px;
    padding:0 5px;
  }

  .hero{
    min-height:60vh !important;
  }

  .hero-title{
    font-size:32px !important;
    line-height:1.1;
  }

  .hero-sub{
    font-size:16px !important;
  }

  .grid,
  .products,
  .cart-grid,
  .footer-grid,
  .about-features{
    grid-template-columns:1fr !important;
  }

  .h1{
    font-size:30px;
    margin-bottom:18px;
  }

  .h2{
    font-size:24px;
  }

  .row2{
    grid-template-columns:1fr;
  }

  .about-support-card{
    max-width:100% !important;
  }

  .admin-main{
    flex-direction:column;
  }

  .admin-top{
    padding:14px 12px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:10px !important;
    text-align:center;
  }

  .admin-top > div:first-child{
    font-size:18px !important;
    text-align:center;
    line-height:1.2;
  }

  .admin-top .right{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }

  .admin-top .right > div{
    text-align:center !important;
  }

  .pill{
    padding:8px 12px !important;
    font-size:13px !important;
    border-radius:14px !important;
  }

  .sidebar{
    width:100% !important;
    flex:1 1 auto !important;
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:10px !important;
    padding:10px 12px !important;
    border-right:none !important;
    border-bottom:1px solid rgba(148,163,184,.14);
    overflow:visible !important;
  }

  .sidebar::-webkit-scrollbar{
    display:none;
  }

  .side-link{
    width:100%;
    min-width:0 !important;
    min-height:58px;
    white-space:nowrap;
    justify-content:center;
    padding:12px 14px !important;
    border-radius:16px;
    text-align:center;
  }

  .side-link .badge{
    margin-left:8px !important;
  }

  body.admin-dark .sidebar{
    width:100% !important;
    flex:1 1 auto !important;
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:10px !important;
    padding:10px 12px !important;
    border-right:none !important;
    border-bottom:1px solid rgba(148,163,184,.14);
    overflow:visible !important;
  }

  body.admin-dark .side-link{
    width:100%;
    min-width:0 !important;
    min-height:58px;
    justify-content:center;
    text-align:center;
    white-space:nowrap;
    padding:12px 14px !important;
    font-size:15px;
  }

  body.admin-dark .side-link.active{
    font-weight:600;
  }

  .admin-content{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:14px 12px !important;
    overflow-x:auto;
  }

  .stats{
    grid-template-columns:1fr !important;
  }

  .table{
    display:block !important;
    overflow-x:auto !important;
    white-space:nowrap;
    min-width:900px;
  }

  .modal,
  .modal-backdrop,
  .terms-modal{
    padding:12px;
  }

  .modal-card,
  .terms-box{
    width:100% !important;
    max-height:88vh;
  }

  .terms-head h2{
    font-size:20px;
  }

  .terms-actions{
    flex-direction:column;
  }

  .terms-actions .btn{
    width:100%;
  }
}

@media (max-width:700px){
  .hero-title{
    font-size:38px;
  }

  .products,
  .cart-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:768px){
  .admin-main,
  body.admin-dark .admin-main{
    display:flex !important;
    flex-direction:column !important;
  }

  aside.sidebar,
  .sidebar,
  body.admin-dark .sidebar{
    width:100% !important;
    max-width:100% !important;
    flex:none !important;
    height:auto !important;
    min-height:auto !important;
    display:grid !important;
    grid-template-columns:repeat(3, 1fr) !important;
    gap:10px !important;
    padding:10px 12px !important;
    overflow:hidden !important;
    align-items:stretch !important;
  }

  .side-link,
  body.admin-dark .side-link{
    width:100% !important;
    height:58px !important;
    min-height:58px !important;
    max-height:58px !important;
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    padding:12px 10px !important;
    margin:0 !important;
    font-weight:600 !important;
  }

  .side-link.active,
  body.admin-dark .side-link.active{
    font-weight:600 !important;
  }

  .side-link .badge,
  body.admin-dark .side-link .badge{
    margin-left:8px !important;
    flex-shrink:0 !important;
  }
}

html, body{
  background:var(--bg);
  height:100%;
}

body{
  display:flex;
  flex-direction:column;
}

footer.footer{
  margin-top:auto;
}

.about-features{
  grid-template-columns:repeat(2,1fr);
  max-width:800px;
  align-items:stretch;
  margin:0 auto;
}

.about-feature-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  height:100%;
  min-height:180px; /* možeš 200 ako hoćeš veće */
}

@media (max-width:768px){
  .header{
    z-index:10000;
  }

  .header-inner{
    position:relative;
    z-index:10001;
  }

  .nav-toggle{
    display:flex !important;
    position:relative;
    z-index:10002;
  }

  .nav{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    z-index:10001;
    flex-direction:column;
    gap:8px;
    padding:12px;
    background:var(--darkbar);
    border:1px solid rgba(255,255,255,.06);
    border-radius:16px;
    box-shadow:0 20px 40px rgba(0,0,0,.28);
  }

  .nav.open{
    display:flex !important;
  }
}

@media (max-width:768px){
  #checkoutModal{
    align-items:flex-start !important;
    overflow-y:auto !important;
    padding:12px !important;
  }

  #checkoutModal .modal-card{
    width:100% !important;
    max-height:none !important;
    margin:20px 0 !important;
    overflow:visible !important;
    border-radius:18px;
  }

  #checkoutModal .checkout-form{
    max-height:none !important;
    overflow:visible !important;
    padding-bottom:24px !important;
  }

  #checkoutModal .modal-head{
    position:sticky;
    top:0;
    z-index:2;
  }
}