/* Shared UI components — cards, buttons, badges, alerts, utilities */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  background: var(--card);
  font-size: 13px;
  color: #4b5563;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.price {
  font-weight: 800;
  margin: 6px 0;
}

.breadcrumb {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.btn-lite {
  background: var(--card);
  color: var(--text);
  border-color: var(--input-border);
}

.btn-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--radius-pill);
}

.primary-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-pill);
  font-weight: 750;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.link-lite {
  font-size: 14px;
  text-decoration: underline;
  color: var(--primary);
}

.thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
}

.status-draft {
  color: #b54708;
}

.status-published {
  color: #027a48;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--divider-soft);
  padding-bottom: 8px;
}

.lazy-img {
  background: linear-gradient(135deg, #eceff3 0%, #f8f9fb 45%, #eceff3 100%);
  background-size: 220% 220%;
}

.lazy-img:not(.lazy-loaded):not(.lazy-error) {
  animation: progressive-shimmer 1.35s ease-in-out infinite;
}

.lazy-img.lazy-loading {
  filter: blur(14px);
  opacity: 0.88;
}

.lazy-img.lazy-loaded {
  filter: blur(0);
  opacity: 1;
  animation: none;
  transition: filter 0.4s ease, opacity 0.35s ease;
}

.lazy-img.lazy-error {
  background: #fee2e2;
  animation: none;
}

@keyframes progressive-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.commerce-alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.commerce-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.commerce-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.commerce-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.admin-alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.admin-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.admin-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.admin-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Global toast (storefront + admin) */
.yg-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.yg-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.yg-toast.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.yg-toast.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.yg-toast.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.input-full {
  width: 100%;
}

.required-star {
  color: var(--danger);
  font-weight: 700;
  margin-left: 2px;
}
