/* ============================================
   Poklonko - Stylesheet v3
   Dizajn: Moderan, ozbiljan, za odrasle
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Sora:wght@400;600;700;800&display=swap');

:root {
  --brand:      #c94d0a;
  --brand-dk:   #a33d07;
  --navy:       #1a1a2e;
  --navy-light: #2d2d4a;
  --accent:     #e8773a;
  --bg:         #F8F6F2;
  --card-bg:    #FFFFFF;
  --border:     #EBEBEB;
  --border-md:  #D8D8D8;
  --muted:      #888;
  --text:       #1a1a2e;
  --text-sm:    #555;
  --shadow:     0 2px 16px rgba(0,0,0,.07);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.11);
  --radius:     16px;
  --radius-sm:  10px;
  --font-main:  'Nunito', sans-serif;
  --font-head:  'Sora', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header */
.site-header { background: var(--navy); padding: 0; position: relative; overflow: hidden; }
.site-header::after {
  content: ''; position: absolute; top: -120px; right: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,77,10,.22) 0%, transparent 70%);
  pointer-events: none;
}
.site-header::before {
  content: ''; position: absolute; bottom: -100px; left: 5%;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,119,58,.12) 0%, transparent 70%);
  pointer-events: none;
}
.header-inner {
  max-width: 860px; margin: 0 auto; padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; position: relative; z-index: 1;
}
.header-brand { display: flex; align-items: center; gap: 14px; }
.header-logo {
  width: 46px; height: 46px; background: var(--brand); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.header-titles h1 {
  font-family: var(--font-head); font-weight: 800; font-size: 1.7rem;
  color: #fff; letter-spacing: -0.5px; line-height: 1;
}
.header-titles h1 span { color: var(--accent); }
.header-titles p { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: 4px; font-weight: 400; }
.header-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.header-pill {
  padding: 6px 16px; border-radius: 999px; font-family: var(--font-head);
  font-size: .75rem; font-weight: 600; letter-spacing: .2px;
}
.pill-free { background: rgba(255,255,255,.07); color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.1); }
.pill-pro { background: var(--brand); color: #fff; }

/* Layout */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }
main { padding: 36px 0 80px; }

/* Packages */
.packages-section { margin-bottom: 24px; }
.section-label {
  font-family: var(--font-head); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 12px;
}
.packages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width: 500px) { .packages-grid { grid-template-columns: 1fr; } }

.pkg-card {
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s; position: relative;
}
.pkg-card:hover { box-shadow: var(--shadow); }
.pkg-card.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201,77,10,.1); }
.pkg-card.pkg-disabled { opacity: .5; cursor: not-allowed; }
.pkg-check {
  position: absolute; top: 16px; right: 16px;
  width: 22px; height: 22px; background: var(--brand); border-radius: 50%;
  display: none; align-items: center; justify-content: center; color: #fff; font-size: 11px;
}
.pkg-card.selected .pkg-check { display: flex; }
.pkg-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 8px;
}
.badge-free { background: #E8F5E9; color: #2E7D32; }
.badge-pro  { background: #FFF3E0; color: #E65100; }
.badge-used { background: #F0F0F0; color: #999; }
.pkg-name { font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 3px; }
.pkg-desc { font-size: .78rem; color: var(--muted); line-height: 1.45; }
.pkg-price { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--text); margin-top: 12px; }
.pkg-price small { font-size: .72rem; font-weight: 400; color: var(--muted); margin-left: 3px; }
.pkg-used-tag { position: absolute; top: 16px; right: 16px; font-size: .7rem; color: #bbb; font-weight: 700; }

/* Card */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px; border: 1.5px solid var(--border); margin-bottom: 28px;
}
@media(max-width: 600px) { .card { padding: 22px 18px; } }

/* Form */
.form-title {
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  color: var(--text); margin-bottom: 22px; display: flex; align-items: center; gap: 9px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-family: var(--font-head); font-weight: 700; font-size: .7rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: .5px;
}

input[type="text"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 15px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font-main); font-size: .92rem;
  color: var(--text); background: #FAFAFA; transition: border .2s, box-shadow .2s; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201,77,10,.1); background: #fff;
}
textarea { resize: vertical; min-height: 80px; }
.hint { font-size: .74rem; color: var(--muted); margin-top: 1px; }

/* Budget */
.budget-display {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  color: var(--brand); text-align: center; margin: 4px 0 8px;
}
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--brand) 0%, var(--brand) var(--pct,10%), var(--border) var(--pct,10%), var(--border) 100%);
  border: none; cursor: pointer; padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(201,77,10,.35);
  cursor: pointer; transition: transform .15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* Submit */
.btn-submit {
  display: block; width: 100%; margin-top: 24px; padding: 14px 24px;
  background: var(--navy); color: #fff; font-family: var(--font-head);
  font-size: 1rem; font-weight: 700; letter-spacing: .2px;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-submit:hover:not(:disabled) { background: var(--navy-light); transform: translateY(-1px); }
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; }

.pay-note { text-align: center; margin-top: 9px; font-size: .75rem; color: var(--muted); display: none; }
.pay-note.show { display: block; }

/* Loader */
.loader-wrap { text-align: center; padding: 48px 0; }
.loader {
  display: inline-block; width: 48px; height: 48px;
  border: 4px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-wrap p { color: var(--muted); font-size: .88rem; font-weight: 600; font-family: var(--font-head); }

/* Alert */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 22px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: #FFF0F0; border: 1.5px solid #FFBDBD; color: #C0392B; }
.alert-error ul { margin: 6px 0 0 18px; }

/* Results header */
.results-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.results-header h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.summary-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: var(--bg); border: 1px solid var(--border-md); color: var(--text-sm);
  padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 700; font-family: var(--font-head);
}

/* Gift cards */
.gift-grid { display: grid; gap: 14px; }
.gift-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1.5px solid var(--border);
  overflow: hidden; transition: transform .2s, box-shadow .2s; animation: fadeUp .4s ease both;
}
.gift-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.gift-card-top { padding: 18px 22px 12px; display: flex; gap: 13px; align-items: flex-start; }
.gift-rank {
  min-width: 32px; height: 32px; background: var(--navy); color: #fff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.gift-info { flex: 1; }
.gift-title { font-family: var(--font-head); font-size: .97rem; font-weight: 700; color: var(--text); margin-bottom: 5px; line-height: 1.3; }
.gift-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.badge { padding: 2px 9px; border-radius: 999px; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.badge-toy     { background: #FEF3C7; color: #92400E; }
.badge-tech    { background: #DBEAFE; color: #1E40AF; }
.badge-creative{ background: #EDE9FE; color: #5B21B6; }
.badge-edu     { background: #D1FAE5; color: #065F46; }
.badge-exp     { background: #FCE7F3; color: #9D174D; }
.badge-fashion { background: #FEF9C3; color: #854D0E; }
.badge-other   { background: #F3F4F6; color: #374151; }
.safe-badge    { background: #D1FAE5; color: #065F46; }

.gift-price { font-family: var(--font-head); font-size: .88rem; font-weight: 700; color: var(--brand); }
.gift-body { padding: 12px 22px 16px; border-top: 1px solid var(--border); }
.gift-desc { font-size: .86rem; color: var(--text-sm); line-height: 1.6; margin-bottom: 11px; }

.gift-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 11px; }
@media(max-width:500px){ .gift-meta { grid-template-columns: 1fr; } }
.meta-item { background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.meta-label { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 2px; font-family: var(--font-head); }
.meta-val { font-size: .84rem; font-weight: 600; color: var(--text); }

.scores-row { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 11px; }
.score-item { flex: 1; min-width: 110px; }
.score-label { font-size: .68rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .4px; }
.score-bar-bg { background: var(--border); border-radius: 999px; height: 5px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 999px; background: var(--brand); transition: width .8s cubic-bezier(.4,0,.2,1); }
.score-bar.bar-green { background: #0F6E56; }
.score-num { font-weight: 700; font-size: .74rem; color: var(--text); margin-left: 6px; font-family: var(--font-head); }

.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.buy-label { font-size: .69rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-family: var(--font-head); }
.buy-tag { background: var(--navy); color: #fff; padding: 3px 10px; border-radius: 6px; font-size: .73rem; font-weight: 600; font-family: var(--font-head); }

.search-link { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 700; font-size: .8rem; text-decoration: none; margin-top: 8px; font-family: var(--font-head); transition: opacity .15s; }
.search-link:hover { opacity: .7; text-decoration: underline; }

/* Back button */
.btn-back {
  display: inline-flex; align-items: center; gap: 7px; background: var(--card-bg);
  color: var(--text); border: 1.5px solid var(--border-md); padding: 9px 18px;
  border-radius: var(--radius-sm); font-family: var(--font-head); font-weight: 600;
  font-size: .85rem; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; margin-bottom: 22px;
}
.btn-back:hover { border-color: var(--brand); color: var(--brand); }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.4); text-align: center; padding: 22px; font-size: .78rem; font-family: var(--font-head); }
.site-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* Animation delays */
.gift-card:nth-child(1)  { animation-delay: .04s; }
.gift-card:nth-child(2)  { animation-delay: .08s; }
.gift-card:nth-child(3)  { animation-delay: .12s; }
.gift-card:nth-child(4)  { animation-delay: .16s; }
.gift-card:nth-child(5)  { animation-delay: .20s; }
.gift-card:nth-child(6)  { animation-delay: .24s; }
.gift-card:nth-child(7)  { animation-delay: .28s; }
.gift-card:nth-child(8)  { animation-delay: .32s; }
.gift-card:nth-child(9)  { animation-delay: .36s; }
.gift-card:nth-child(10) { animation-delay: .40s; }

@media (max-width: 500px) {
  .header-inner { padding: 20px 18px; }
  main { padding: 24px 0 60px; }
}
