.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.btn.is-loading {
  pointer-events: none;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-dark {
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.btn-dark:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-light {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

body.dark .btn-light {
  background: rgba(255, 255, 255, 0.06);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.92);
}

body.dark .btn-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.card-outline-info {
  border: 1px solid rgba(37, 99, 235, 0.28);
}

.card-outline-success {
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.card-outline-danger {
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.card-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.card-title-sm {
  font-size: 18px;
  margin-bottom: 4px;
}

.page-title {
  font-size: 32px;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--muted);
  margin-bottom: 24px;
}

.small-muted,
.muted {
  font-size: 14px;
  color: var(--muted);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-error {
  min-height: 18px;
  font-size: 12px;
  color: #dc2626;
  opacity: 0;
  transform: translateY(-2px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.field-error.visible {
  opacity: 1;
  transform: translateY(0);
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: rgba(220, 38, 38, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.empty-box {
  border: 1px dashed var(--line);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-box-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 2px;
  opacity: 0.55;
  filter: grayscale(0.3);
}

.empty-box-text {
  font-size: 14px;
  line-height: 1.5;
}

.empty-box-compact {
  padding: 20px 18px;
  border-radius: 18px;
  gap: 6px;
}

.empty-box-compact .empty-box-icon {
  font-size: 24px;
}

.empty-box-info {
  border-style: solid;
  background: rgba(37, 99, 235, 0.04);
}

.loading-box {
  border: 1px dashed var(--line);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.loading-spinner {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid rgba(37, 99, 235, 0.25);
  border-right-color: #2563eb;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.toast {
  position: relative;
  min-width: 280px;
  max-width: 380px;
  background: var(--card-solid, #fff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-strong);
  border-radius: 18px;
  padding: 14px 14px 14px 22px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  overflow: hidden;
}

/* Left colored indicator strip */
.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--line);
  transition: background 0.2s;
}

.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-hide {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
}

.toast-success {
  border-color: rgba(16, 185, 129, 0.25);
}
.toast-success::before {
  background: var(--success, #10b981);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.28);
}
.toast-error::before {
  background: var(--danger, #ef4444);
}

.toast-info {
  border-color: rgba(37, 99, 235, 0.28);
}
.toast-info::before {
  background: var(--accent, #2563eb);
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.28);
}
.toast-warning::before {
  background: #f59e0b;
}

.toast-content {
  padding-right: 24px;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.toast-message {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 550;
  padding: 20px;
}

.confirm-overlay.active {
  display: flex;
}

.confirm-modal {
  width: min(420px, 100%);
  background: var(--card-solid, #fff);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
  padding: 22px;
}

.confirm-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.confirm-text {
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 20px;
}

.soft-launch-top-banner {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(90deg, #92400e, #b45309);
  color: #fff7ed;
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.2);
}

.soft-launch-top-banner__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.45;
  font-size: 14px;
}

.soft-launch-top-banner__inner strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: #e2e8f0;
  color: #0f172a;
  white-space: nowrap;
}

.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.avatar-box {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #2563eb);
  color: white;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

/* =========================
   PRODUCT CARD SYSTEM
   ========================= */

.product-card {
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  backdrop-filter: blur(16px);
  min-width: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(37, 99, 235, 0.16);
}

.product-card-sold .product-title,
.product-card-sold .price {
  opacity: 0.82;
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid var(--line);
}

body.dark .product-image-wrap {
  background: rgba(255, 255, 255, 0.03);
}

.product-image-wrap > img,
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.product-card:hover .product-image-wrap > img,
.product-card:hover img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 12px;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  line-height: 1;
}

.favorite-fab {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: white;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.favorite-fab:hover {
  transform: scale(1.08);
}

/* Heart pop animation on click */
@keyframes fav-pop {
  0%   { transform: scale(1); }
  28%  { transform: scale(1.42); }
  58%  { transform: scale(0.86); }
  80%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.favorite-fab.fav-popping {
  animation: fav-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

body.dark .favorite-fab {
  background: rgba(15, 23, 42, 0.88);
}

.sold-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  top: auto;
  right: auto;
  z-index: 3;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.sold-badge-inline {
  background: #e74c3c;
  color: white;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  min-width: 0;
}

.product-meta {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-top: auto;
}

.price {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  flex-shrink: 0;
}

.product-bottom .btn {
  flex-shrink: 0;
}

.product-page-title {
  font-size: 34px;
  margin: 16px 0 10px;
  line-height: 1.15;
}

.product-description {
  line-height: 1.7;
  margin-bottom: 18px;
  white-space: pre-wrap;
}

.old-price-inline {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 18px;
  margin-right: 10px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 0;
}

.auth-card {
  width: min(480px, 92%);
  background: var(--card);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--muted);
  margin-bottom: 20px;
}

.offer-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.offer-modal-overlay.active {
  display: flex;
}

.offer-modal {
  width: min(460px, 100%);
  background: var(--card-solid, #ffffff);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.offer-modal-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.offer-modal-body {
  padding: 20px;
}

.offer-old-price {
  font-size: 22px;
  font-weight: 700;
  text-decoration: line-through;
  color: var(--muted);
  margin-right: 10px;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.review-user {
  display: flex;
  gap: 12px;
  align-items: center;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.review-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.review-stars {
  font-weight: 700;
  color: #f59e0b;
}

.review-text {
  line-height: 1.7;
}

@media (max-width: 768px) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
    align-items: stretch;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  .confirm-actions {
    justify-content: stretch;
  }

  .confirm-actions .btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .card {
    padding: 18px;
    border-radius: 22px;
  }

  .page-title {
    font-size: 26px;
  }

  .product-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .product-bottom .btn {
    width: 100%;
  }

  .product-page-title {
    font-size: 28px;
  }

  .favorite-fab {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
}

/* =========================
   SKELETON SCREENS
   ========================= */

@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.13) 25%,
    rgba(148, 163, 184, 0.26) 50%,
    rgba(148, 163, 184, 0.13) 75%
  );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 10px;
}

body.dark .skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-card {
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.skeleton-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
}

.skeleton-line-sm  { width: 55%; }
.skeleton-line-md  { width: 80%; }
.skeleton-line-lg  { width: 100%; }

.skeleton-line-title {
  height: 18px;
}

.skeleton-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.skeleton-price {
  width: 72px;
  height: 24px;
}

.skeleton-btn {
  width: 90px;
  height: 40px;
  border-radius: 18px;
}
