/* ==========================================================================
   Epoxy Corner — stilovi sajta
   Paleta: orah/drvo (tamna podloga) + tirkiz smole + zlatna
   ========================================================================== */

:root {
  --bg:        #100d0b;
  --bg-2:      #17120e;
  --surface:   #1e1814;
  --surface-2: #262019;
  --line:      rgba(255, 240, 220, 0.10);
  --line-2:    rgba(255, 240, 220, 0.18);

  --text:      #f4ece1;
  --muted:     #a99a89;
  --muted-2:   #7d7064;

  --resin:      #2ec4b6;
  --resin-soft: #6fded3;
  --resin-deep: #17726a;
  --gold:       #d8a657;
  --danger:     #e5645a;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 18px 45px rgba(0, 0, 0, 0.45);
  --serif:     'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --sans:      'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap:      1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 13, 11, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.logo svg, .logo img { width: 34px; height: 34px; flex: none; }
.logo-text { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .04em; }
.logo-text span { color: var(--resin); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: .93rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--resin); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .9rem;
  transition: border-color .18s, background .18s;
}
.cart-link:hover { border-color: var(--resin); background: rgba(46, 196, 182, .08); }
.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--resin);
  color: #06231f;
  font-size: .75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.cart-count[data-empty='1'] { background: var(--surface-2); color: var(--muted); }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 11px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 11vw, 130px) 0 clamp(56px, 9vw, 110px);
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(46, 196, 182, .17), transparent 62%),
    radial-gradient(760px 420px at 8% 106%, rgba(216, 166, 87, .12), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--resin-soft);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--resin);
}
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ------------------------------------------------------------------ dugmad */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--resin); color: #04211e; }
.btn-primary:hover { background: var(--resin-soft); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--resin); color: var(--resin-soft); }
.btn-gold { background: var(--gold); color: #241703; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-danger { background: transparent; border-color: rgba(229, 100, 90, .5); color: var(--danger); }
.btn-danger:hover { background: rgba(229, 100, 90, .12); }
.btn-sm { padding: 8px 15px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------------------------------------------- sekcije */

section.block { padding: clamp(54px, 8vw, 96px) 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
  flex-wrap: wrap;
}
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.section-head h2 { margin: 0 0 .25em; }

/* ------------------------------------------------------------- kategorije */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.cat-card {
  position: relative;
  padding: 26px 22px;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
  overflow: hidden;
}
.cat-card:hover { border-color: var(--resin-deep); transform: translateY(-3px); }
.cat-card svg { width: 30px; height: 30px; color: var(--resin); margin-bottom: 14px; }
.cat-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.cat-card span { font-size: .85rem; color: var(--muted-2); }

/* ---------------------------------------------------------------- proizvodi */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.chip {
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .88rem;
  cursor: pointer;
  transition: all .18s;
}
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.active { background: var(--resin); border-color: var(--resin); color: #04211e; font-weight: 600; }

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.badge-gold { background: rgba(216, 166, 87, .92); color: #241703; }
.badge-out { background: rgba(20, 16, 13, .85); color: var(--muted); border: 1px solid var(--line-2); }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.card-cat { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--resin); }
.card-body h3 { margin: 2px 0 6px; font-size: 1.18rem; }
.card-desc {
  font-size: .89rem;
  color: var(--muted);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price { font-family: var(--serif); font-size: 1.35rem; color: var(--gold); white-space: nowrap; }
.price small { font-size: .7rem; color: var(--muted-2); letter-spacing: .08em; }

.empty {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius);
  min-height: 330px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------ detalj proizvoda */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 60px);
  padding: 42px 0 20px;
}
.gallery-main {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button {
  width: 78px;
  height: 62px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}
.thumbs button.active { border-color: var(--resin); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.crumbs { font-size: .85rem; color: var(--muted-2); padding-top: 26px; }
.crumbs a:hover { color: var(--resin); }

.spec-list {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .93rem;
}
.spec-list span:first-child { color: var(--muted); }
.spec-list span:last-child { text-align: right; }

.buy-box {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.qty button {
  width: 40px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
}
.qty button:hover { background: var(--surface-2); }
.qty input {
  width: 46px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: center;
  font-size: 1rem;
  font-family: var(--sans);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ------------------------------------------------------------------ korpa */

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 40px;
}
.cart-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row img {
  width: 96px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cart-row h4 { margin: 0 0 3px; font-family: var(--serif); font-size: 1.1rem; }
.cart-row .line-price { font-family: var(--serif); font-size: 1.15rem; color: var(--gold); }
.link-remove {
  background: none;
  border: 0;
  color: var(--muted-2);
  font-size: .82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.link-remove:hover { color: var(--danger); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.panel h3 { margin-top: 0; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; color: var(--muted); }
.sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-family: var(--serif);
  font-size: 1.5rem;
}
.sum-total b { color: var(--gold); }

/* ------------------------------------------------------------------ forme */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field label .req { color: var(--resin); }
input[type='text'], input[type='tel'], input[type='email'],
input[type='number'], input[type='password'], select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--sans);
  font-size: .95rem;
  transition: border-color .18s, background .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--resin);
  background: var(--surface);
}
textarea { resize: vertical; min-height: 92px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: .93rem; color: var(--text); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--resin); }
.form-note { font-size: .82rem; color: var(--muted-2); }

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 16px;
}
.alert-error { background: rgba(229, 100, 90, .14); border: 1px solid rgba(229, 100, 90, .4); color: #ffb9b3; }
.alert-ok { background: rgba(46, 196, 182, .12); border: 1px solid rgba(46, 196, 182, .4); color: var(--resin-soft); }
.alert-warn { background: rgba(216, 166, 87, .12); border: 1px solid rgba(216, 166, 87, .4); color: #f0cf95; }

/* ------------------------------------------------------------------ proces */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.step { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.step span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--resin-deep);
  color: var(--resin);
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: .9rem; color: var(--muted); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.about-visual {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 32% 28%, rgba(46, 196, 182, .35), transparent 55%),
    radial-gradient(circle at 72% 74%, rgba(216, 166, 87, .28), transparent 52%),
    repeating-linear-gradient(102deg, #241a13 0 7px, #2d211a 7px 15px, #1d1510 15px 24px);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 54px 0 26px;
  margin-top: 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}
.footer-grid h4 {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.footer-grid a, .footer-grid p { color: var(--muted); font-size: .92rem; display: block; margin: 0 0 8px; }
.footer-grid a:hover { color: var(--resin); }
.footer-grid a.social { display: inline-flex; align-items: center; gap: 8px; }
.footer-grid a.social svg { width: 17px; height: 17px; flex: none; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--muted-2);
}

/* ------------------------------------------------------------------ toast */

#toast-host {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: .92rem;
  animation: pop .25s ease-out;
}
.toast-ok { border-color: var(--resin-deep); }
.toast-err { border-color: rgba(229, 100, 90, .5); color: #ffb9b3; }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 900px) {
  .product-layout, .cart-layout, .about-grid, .footer-grid { grid-template-columns: 1fr; }
  .about-visual { max-height: 320px; }
}

@media (max-width: 720px) {
  .burger { display: block; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav a.active { border-bottom-color: var(--line); color: var(--resin); }
  .cart-link { padding: 8px 13px; }
  .cart-link span.label { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row img { width: 72px; height: 60px; }
  .cart-row > div:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}
