/**
 * Albi — components.css
 * Buttons, cards, badges, forms, quantity, price block.
 */

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.albi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  background: transparent;
  color: var(--albi-text);
  letter-spacing: 0.02em;
}

.albi-btn--primary {
  background: var(--albi-red);
  color: white;
  border-color: var(--albi-red);
  padding-inline: var(--space-8);
  font-size: var(--text-base);
  text-transform: uppercase;
}
.albi-btn--primary:hover {
  background: var(--albi-red-dark);
  border-color: var(--albi-red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}
.albi-btn--primary:active {
  transform: translateY(0);
}

.albi-btn--ghost {
  background: transparent;
  border-color: var(--albi-border-strong);
  color: var(--albi-text);
}
.albi-btn--ghost:hover {
  border-color: var(--albi-red);
  color: var(--albi-red);
}

/* ----------------------------------------
   Cards
   ---------------------------------------- */
.albi-card {
  background: var(--albi-bg);
  border: 1px solid var(--albi-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.albi-card:hover {
  box-shadow: var(--shadow-md);
}

/* ----------------------------------------
   Brand chip
   ---------------------------------------- */
.albi-brand-chip {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--albi-bg-soft);
  color: var(--albi-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ----------------------------------------
   Availability badge (Na stanju / Na upit / Nedostupno)
   ---------------------------------------- */
.albi-availability {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.albi-availability::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.albi-availability--in-stock {
  background: var(--albi-success-soft);
  color: var(--albi-success);
}
.albi-availability--on-request {
  background: var(--albi-warning-soft);
  color: var(--albi-warning);
}
.albi-availability--out {
  background: var(--albi-danger-soft);
  color: var(--albi-danger);
}

/* ----------------------------------------
   Meta rows (brand: ... | šifra: ... | dostupnost: ...)
   ---------------------------------------- */
.albi-product-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block: var(--space-2) var(--space-4);
}

.albi-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.albi-meta-row__label {
  color: var(--albi-text-muted);
  font-weight: 500;
  /* min-width uklonjen — bez praznine između labela i value-a; isto izgleda kao na referenci */
}
.albi-meta-row__value {
  color: var(--albi-text);
}
.albi-meta-row__value--mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* ----------------------------------------
   Price block — split format (1³⁸ €/kom)
   ---------------------------------------- */
.albi-price {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--albi-text);
  line-height: 1;
}
.albi-price__integer {
  font-size: var(--text-4xl);
}
.albi-price__comma {
  font-size: var(--text-2xl);
  font-weight: 700;
  align-self: flex-end;
}
.albi-price__decimal {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-left: 1px;
  vertical-align: super;
  line-height: 1;
}
.albi-price__suffix {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--albi-text-muted);
  margin-left: var(--space-2);
  white-space: nowrap;
  align-self: flex-end;
  line-height: 1.1;
}

/* Smaller variant za archive card */
.albi-price--card { gap: 0; }
.albi-price--card .albi-price__integer { font-size: var(--text-2xl); }
.albi-price--card .albi-price__comma { font-size: var(--text-lg); }
.albi-price--card .albi-price__decimal { font-size: var(--text-sm); }
.albi-price--card .albi-price__suffix  {
  font-size: 10px;
  margin-left: var(--space-1);
}

/* Fallback kad cijena nije postavljena (vidi price.php, content-product.php) */
.albi-price-unavailable {
  color: var(--albi-text-muted);
  font-style: italic;
  font-size: var(--text-base);
  font-weight: 500;
}

/* ----------------------------------------
   Quantity selector (+ / -)
   ---------------------------------------- */
.albi-quantity-wrap {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--albi-border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--albi-bg);
}
.albi-quantity-wrap .quantity {
  border: 0 !important;
  margin: 0 !important;
  background: transparent;
  display: inline-flex;
  align-items: center;
}
.albi-quantity-wrap .qty,
.albi-quantity-wrap input.qty {
  border: 0;
  outline: 0;
  width: 56px;
  height: 44px;
  text-align: center;
  font-size: var(--text-base);
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--albi-text);
}
.albi-quantity-wrap .qty::-webkit-outer-spin-button,
.albi-quantity-wrap .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.albi-qty-btn {
  border: 0;
  background: transparent;
  width: 40px;
  height: 44px;
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  color: var(--albi-text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.albi-qty-btn:hover {
  color: var(--albi-red);
  background: var(--albi-red-soft);
}

/* ----------------------------------------
   Wishlist link (heart)
   ---------------------------------------- */
.albi-wishlist-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--albi-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  margin-top: var(--space-3);
  transition: color var(--transition-fast);
}
.albi-wishlist-link:hover {
  color: var(--albi-red);
}
.albi-wishlist-link svg {
  flex-shrink: 0;
}

/* ----------------------------------------
   Sub-prices (VPC, cijena za j.m.)
   ---------------------------------------- */
.albi-sub-prices {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-block: var(--space-3) var(--space-5);
}
.albi-sub-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.albi-sub-price__label {
  color: var(--albi-text-muted);
  min-width: 110px;
}
.albi-sub-price__value {
  color: var(--albi-text);
  font-variant-numeric: tabular-nums;
}
.albi-sub-price__value--strong {
  font-weight: 600;
  color: var(--albi-red);
}

/* ----------------------------------------
   Form inputs (basic styling for native fields)
   ---------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border: 1px solid var(--albi-border-strong);
  border-radius: var(--radius-md);
  background: var(--albi-bg);
  color: var(--albi-text);
  transition: border-color var(--transition-fast);
  font-family: inherit;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--albi-red);
}

/* Search/cart icon button */
button[type="submit"] {
  font-family: inherit;
}

/* Toast — global (add-to-cart feedback on PDP and homepage). Moved from product-single.css. */
.albi-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(160%);
  background: #0B0B0C; color: #fff;
  padding: 14px 18px 14px 14px; border-radius: 14px;
  display: flex; align-items: center; gap: 14px;
  font: 500 14px/1.2 'Inter', sans-serif;
  box-shadow: 0 30px 60px -30px rgba(15,17,21,.18); z-index: 9999;
  transition: transform .28s cubic-bezier(.2,.9,.3,1.2); opacity: 0;
}
.albi-toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }
.albi-toast .tic { width: 36px; height: 36px; border-radius: 10px; background: #22C55E; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.albi-toast .tic svg { width: 18px; height: 18px; }
.albi-toast .ttitle { font-weight: 600; }
.albi-toast .tdesc { font: 400 12.5px/1.2 'Inter', sans-serif; color: #9CA0A8; margin-top: 3px; }
.albi-toast.error .tic { background: #DC2626; }

/* ── Frozen mini-chip — GLOBAL (arhiva grid + homepage kartice; PDP related ima svoj .albi-pdp scoped) ── */
.pbadge.frozen.mini { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; font-size: 10.5px; font-weight: 700; line-height: 1; border-radius: 6px; background: linear-gradient(180deg,#2563EB,#1D4ED8); color: #fff; border: 1px solid #1E40AF; white-space: nowrap; }
.pbadge.frozen.mini .snow { display: inline-grid; place-items: center; width: 13px; height: 13px; background: rgba(255,255,255,.18); border-radius: 3px; }
.pbadge.frozen.mini .snow svg { width: 9px; height: 9px; }
/* chip-tl: apsolutno gore-lijevo unutar position:relative medije (arhiva kartica) */
.product-media .chip-tl { position: absolute; top: 10px; left: 10px; z-index: 2; }
