/* بطاقات، أزرار، شيبس، سكيلتون */

/* ===== أزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-secondary {
  background-color: var(--bg-muted);
  color: var(--text-primary);
}

.btn-outline {
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-block {
  width: 100%;
}

/* ===== بطاقة منتج ===== */
.product-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-card__img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  background: var(--bg-muted);
}

.product-card__body {
  padding: 12px;
}

.product-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===== سكيلتون ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-muted) 25%,
    var(--border-color) 50%,
    var(--bg-muted) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-card .skeleton-img {
  aspect-ratio: 1 / 1;
}

.skeleton-card .skeleton-line {
  height: 14px;
  margin: 8px 12px;
}

.skeleton-card .skeleton-line:last-child {
  width: 40%;
  margin-bottom: 12px;
}

/* ===== توست ===== */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(90%, 360px);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  text-align: center;
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}

.toast--success {
  border-right: 4px solid #22C55E;
}

.toast--error {
  border-right: 4px solid #EF4444;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== أيقونة SVG ===== */
.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.icon--lg {
  width: 32px;
  height: 32px;
}
