﻿/* =====================================================
   FAVORITES PAGE — DEDICATED STYLES
   صفحة المفضلة — ملف CSS مخصص
   ===================================================== */

/* ── Page Wrapper ── */
.fav-page {
  padding: 10px 0 80px;
}

/* ── Header ── */
.fav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  position: relative;
}

.fav-header-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.fav-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark, #111827);
  margin: 0 0 2px 0;
}

.fav-subtitle {
  font-size: 13px;
  color: var(--muted, #9ca3af);
  margin: 0;
}

.fav-count-badge {
  margin-right: auto;
  background: var(--primary, #db2777);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
}

/* ── Items Grid ── */
.fav-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Card ── */
.fav-card {
  display: grid;
  /* image | body | actions */
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(242, 216, 226, 0.9);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: box-shadow 0.25s, transform 0.25s;
  overflow: hidden;
}

.fav-card:hover {
  box-shadow: 0 6px 24px rgba(219,39,119,0.10);
  transform: translateY(-1px);
}

/* Remove animation */
.fav-card.removing {
  opacity: 0;
  transform: scale(0.95) translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Product Image ── */
.fav-card-img-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.fav-card-img {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: #ffeef5;
  transition: transform 0.3s;
}

.fav-card-img-link:hover .fav-card-img {
  transform: scale(1.04);
}

/* ── Body ── */
.fav-card-body {
  min-width: 0;
}

.fav-card-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  /* Clamp to 2 lines on mobile */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-card-name:hover {
  color: var(--primary, #db2777);
}

.fav-card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark, #be185d);
}

/* ── Actions Column ── */
.fav-card-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

/* ── Buttons ── */
.fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 13px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  line-height: 1;
}

.fav-btn-icon {
  font-size: 13px;
  line-height: 1;
}

/* Add to Cart */
.fav-btn--cart {
  background: var(--primary, #db2777);
  border-color: var(--primary, #db2777);
  color: #fff;
  box-shadow: 0 2px 6px rgba(219,39,119,0.15);
}
.fav-btn--cart:hover {
  background: var(--primary-dark, #be185d);
  border-color: var(--primary-dark, #be185d);
}

/* In Cart */
.fav-btn--incart {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #059669;
  cursor: not-allowed;
}

/* Share */
.fav-btn--share {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.fav-btn--share:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* Remove */
.fav-btn--remove {
  background: #fff5f5;
  border-color: #fecaca;
  color: #ef4444;
}
.fav-btn--remove:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ── Empty State ── */
.fav-empty {
  text-align: center;
  padding: 60px 20px;
  width: 100%;
}

.fav-empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.fav-empty-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 0 0 6px 0;
}

.fav-empty-hint {
  font-size: 13px;
  color: var(--muted, #9ca3af);
  margin: 0 0 20px 0;
}

.fav-empty-btn {
  display: inline-block;
  text-decoration: none;
  padding: 11px 28px;
  border-radius: 12px;
  background: var(--primary, #db2777);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(219,39,119,0.20);
}

.fav-empty-btn:hover {
  background: var(--primary-dark, #be185d);
  transform: translateY(-1px);
}

/* ==============================================
   RESPONSIVE — MOBILE
   ============================================== */

/* Medium screens: hide button labels, show icons only */
@media (max-width: 520px) {
  .fav-card {
    grid-template-columns: 76px 1fr auto;
    gap: 10px;
    padding: 10px;
  }

  .fav-card-img {
    width: 76px;
    height: 76px;
  }

  .fav-title {
    font-size: 18px;
  }

  .fav-btn-label {
    display: none;
  }

  .fav-btn {
    padding: 9px;
    border-radius: 9px;
    font-size: 15px;
  }

  .fav-btn-icon {
    font-size: 16px;
  }

  .fav-card-name {
    font-size: 13px;
  }

  .fav-card-price {
    font-size: 14px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .fav-card {
    grid-template-columns: 68px 1fr auto;
    gap: 8px;
    padding: 8px;
  }

  .fav-card-img {
    width: 68px;
    height: 68px;
  }

  .fav-card-actions {
    gap: 5px;
  }

  .fav-btn {
    padding: 8px;
  }
}

/* ── Overrides for btn-add-cart conflict ── */
.fav-btn.btn-add-cart {
  width: auto !important;
  height: auto !important;
  border-radius: 9px !important;
  display: flex !important;
  font-size: 12px !important;
  box-shadow: 0 2px 6px rgba(219, 39, 119, 0.15) !important;
}

.fav-btn.btn-add-cart:hover {
  transform: translateY(-1px) !important;
}

.fav-btn--cart.btn-add-cart {
  background: var(--primary, #db2777) !important;
  border-color: var(--primary, #db2777) !important;
  color: #fff !important;
}

.fav-btn--cart.btn-add-cart:hover {
  background: var(--primary-dark, #be185d) !important;
  border-color: var(--primary-dark, #be185d) !important;
}

.fav-btn--incart.btn-add-cart {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #059669 !important;
}
