/* ======================================================
   TECHMART — WISHLIST PAGE
   Clean reference-matched design with table list,
   TechMart brand blue header, pill buttons, and spacious layout.
====================================================== */

:root {
  --wl-primary:    #0098D9;
  --wl-primary-dk: #007BB0;
  --wl-navy:       #0D2A45;
  --wl-navy-dk:    #081D31;
  --wl-green:      #10B981;
  --wl-red:        #EF4444;
  --wl-border:     #F0F2F5;
  --wl-text-main:  #111827;
  --wl-text-muted: #6B7280;
  --wl-text-light: #9CA3AF;
  --heading:       'Poppins', sans-serif;
  --body:          'Manrope', sans-serif;
  --max:           1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--body); background: #ffffff; color: var(--wl-text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

.wl-container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Breadcrumb ── */
.breadcrumb { padding: 20px 0 0; }
.breadcrumb nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { font-size: .82rem; color: #64748B; transition: color .2s; }
.breadcrumb a:hover { color: var(--wl-primary); }
.breadcrumb .sep { color: #94A3B8; font-size: .75rem; }
.breadcrumb .cur { font-size: .82rem; color: #0F172A; font-weight: 600; }

/* ── Page Header ── */
.wl-page-hd { padding: 24px 0 20px; }
.wl-page-hd h1 { font-family: var(--heading); font-size: clamp(1.75rem, 3.5vw, 2.2rem); font-weight: 800; color: var(--wl-navy); letter-spacing: -0.02em; }
.wl-page-hd .sub { font-family: var(--body); font-size: .875rem; color: #64748B; margin-top: 4px; font-weight: 500; }

/* ── Table Section & Viewport Fill ── */
.wl-table-card {
  padding-top: 32px;
  padding-bottom: 80px;
  min-height: calc(100vh - 440px);
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.wl-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Table Styling ── */
.wl-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 820px;
}

/* TechMart Brand Blue Header */
.wl-table thead tr {
  background: var(--wl-primary);
}
.wl-table thead th {
  padding: 18px 24px;
  font-family: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.wl-table thead th:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  padding-left: 32px;
}
.wl-table thead th:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  padding-right: 32px;
  text-align: right;
}

/* Table Body Rows */
.wl-table tbody tr {
  border-bottom: 1px solid var(--wl-border);
  transition: background 0.18s ease;
}
.wl-table tbody tr:hover {
  background: #fafbfc;
}
.wl-table tbody td {
  padding: 24px 20px;
  vertical-align: middle;
  font-size: 0.95rem;
}
.wl-table tbody td:first-child {
  padding-left: 20px;
}
.wl-table tbody td:last-child {
  padding-right: 24px;
  text-align: right;
}

/* Product Info Cell */
.wl-product-cell {
  display: flex;
  align-items: center;
  gap: 20px;
}
.wl-remove-btn {
  width: 28px;
  height: 28px;
  color: #9ca3af;
  font-size: 1.35rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.18s, transform 0.18s, background 0.18s;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 50%;
}
.wl-remove-btn:hover {
  color: var(--wl-red);
  background: #fee2e2;
  transform: scale(1.1);
}

.wl-thumb-box {
  width: 80px;
  height: 80px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wl-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.wl-table tbody tr:hover .wl-thumb-box img {
  transform: scale(1.06);
}

.wl-info-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.wl-item-title {
  font-family: var(--heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  transition: color 0.15s;
}
.wl-item-title:hover {
  color: var(--wl-primary);
}
.wl-item-meta {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}

/* Price Cell */
.wl-price-val {
  font-family: var(--heading);
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}
.wl-price-old {
  font-size: 0.82rem;
  color: #9ca3af;
  text-decoration: line-through;
  display: block;
  margin-top: 2px;
}

/* Date Added Cell */
.wl-date-val {
  font-size: 0.92rem;
  color: #4b5563;
  white-space: nowrap;
}

/* Stock Status Cell */
.wl-stock-val {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}
.wl-stock-val.in-stock {
  color: var(--wl-green);
}
.wl-stock-val.out-of-stock {
  color: var(--wl-red);
}

/* Action Button (TechMart Brand Blue) */
.wl-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wl-primary);
  color: #ffffff;
  padding: 11px 24px;
  border-radius: 8px;
  font-family: var(--heading);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1.5px solid var(--wl-primary);
  box-shadow: 0 3px 10px rgba(0, 152, 217, 0.20);
  cursor: pointer;
}
.wl-btn-pill:hover {
  background: var(--wl-primary-dk);
  border-color: var(--wl-primary-dk);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 152, 217, 0.30);
}
.wl-btn-pill:active {
  transform: translateY(0);
}
.wl-btn-pill:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* ── Bottom Controls Bar ── */
.wl-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #f3f4f6;
  flex-wrap: wrap;
}

/* Left share field */
.wl-share-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.wl-share-label {
  font-family: var(--heading);
  font-size: 0.92rem;
  font-weight: 600;
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: default;
}
.wl-share-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wl-share-input {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #4b5563;
  width: 320px;
  max-width: 100%;
  outline: none;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wl-share-input:focus {
  border-color: var(--wl-primary);
  box-shadow: 0 0 0 3px rgba(0, 152, 217, 0.15);
}
.wl-btn-copy {
  padding: 10px 20px;
  font-size: 0.84rem;
}

/* Right Action Buttons */
.wl-right-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}
.wl-btn-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.wl-btn-clear:hover {
  color: var(--wl-red);
  background: #fee2e2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* ── Empty State ── */
.wl-empty-wrap {
  text-align: center;
  padding: 80px 20px 100px;
  margin: auto;
}
.wl-empty-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 152, 217, 0.1);
  color: var(--wl-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 20px;
}
.wl-empty-wrap h2 {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}
.wl-empty-wrap p {
  font-size: 0.95rem;
  color: var(--wl-text-muted);
  max-width: 440px;
  margin: 0 auto 28px;
}

/* ── Toast Notification ── */
.wl-toast-bubble {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #111827;
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  z-index: 99999;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.wl-toast-bubble.show {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Clear Wishlist Modal ── */
.wl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.wl-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.wl-modal {
  background: #ffffff;
  border-radius: 14px;
  padding: 36px 32px 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}
.wl-modal-overlay.active .wl-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.wl-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.wl-modal h3 {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}
.wl-modal p {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 26px;
}
.wl-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.wl-modal-btn-cancel {
  flex: 1;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: var(--heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wl-modal-btn-cancel:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.wl-modal-btn-confirm {
  flex: 1;
  padding: 11px 20px;
  border-radius: 8px;
  font-family: var(--heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  background: #dc2626;
  border: 1.5px solid #dc2626;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wl-modal-btn-confirm:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
}
.wl-modal-btn-confirm:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .wl-table-card {
    padding-top: 24px;
    padding-bottom: 50px;
  }
  .wl-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .wl-right-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ── Mobile Wishlist Cards UI (≤ 768px) ── */
@media (max-width: 768px) {
  .wl-container {
    padding: 0 16px;
  }
  .wl-page-hd {
    padding: 16px 0 12px;
  }
  .wl-table-responsive {
    overflow-x: visible;
  }
  .wl-table {
    min-width: 0 !important;
    width: 100% !important;
    border: none !important;
  }
  .wl-table thead {
    display: none !important;
  }
  .wl-table,
  .wl-table tbody {
    display: block !important;
    width: 100% !important;
  }
  .wl-table tbody tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "prod prod"
      "price stock"
      "action action" !important;
    row-gap: 10px !important;
    column-gap: 12px !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 14px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
    position: relative !important;
  }
  .wl-table tbody td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
  }
  .wl-table tbody td:nth-child(1) {
    grid-area: prod !important;
    width: 100% !important;
  }
  .wl-table tbody td:nth-child(2) {
    grid-area: price !important;
  }
  .wl-table tbody td:nth-child(3) {
    display: none !important;
  }
  .wl-table tbody td:nth-child(4) {
    grid-area: stock !important;
    text-align: right !important;
  }
  .wl-table tbody td:nth-child(5) {
    grid-area: action !important;
    width: 100% !important;
  }

  /* Product Info */
  .wl-product-cell {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    position: relative !important;
    padding-right: 32px !important;
  }
  .wl-remove-btn {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    width: 28px !important;
    height: 28px !important;
    background: #f8fafc !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  }
  .wl-thumb-box {
    width: 68px !important;
    height: 68px !important;
    flex-shrink: 0 !important;
    padding: 6px !important;
    border-radius: 10px !important;
  }
  .wl-info-box {
    gap: 2px !important;
  }
  .wl-item-title {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .wl-item-meta {
    font-size: 0.74rem !important;
    color: #64748b !important;
  }

  /* Price & Stock status styling */
  .wl-price-val {
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    display: inline-block !important;
  }
  .wl-price-old {
    font-size: 0.75rem !important;
    display: inline-block !important;
    margin-left: 6px !important;
    margin-top: 0 !important;
  }
  .wl-stock-val {
    font-size: 0.72rem !important;
    padding: 3px 8px !important;
    border-radius: 9999px !important;
    display: inline-block !important;
    font-weight: 700 !important;
  }
  .wl-stock-val.in-stock {
    background: #dcfce7 !important;
    color: #15803d !important;
  }
  .wl-stock-val.out-of-stock {
    background: #fee2e2 !important;
    color: #b91c1c !important;
  }

  /* Add to Cart button */
  .wl-btn-pill.btn-add-cart {
    width: 100% !important;
    height: 40px !important;
    font-size: 0.84rem !important;
    justify-content: center !important;
    margin-top: 4px !important;
    border-radius: 8px !important;
  }

  /* Bottom Controls */
  .wl-bottom-bar {
    flex-direction: column !important;
    gap: 16px !important;
    margin-top: 24px !important;
    padding-top: 20px !important;
  }
  .wl-share-group {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .wl-share-label {
    font-size: 0.84rem !important;
  }
  .wl-share-input-wrap {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }
  .wl-share-input {
    flex: 1 !important;
    width: auto !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 0.82rem !important;
    border-radius: 8px !important;
  }
  .wl-btn-copy {
    height: 40px !important;
    padding: 0 16px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }
  .wl-right-actions {
    width: 100% !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .wl-right-actions form {
    width: 100% !important;
    display: block !important;
  }
  .wl-right-actions .wl-btn-pill {
    width: 100% !important;
    height: 42px !important;
    justify-content: center !important;
    font-size: 0.86rem !important;
    border-radius: 8px !important;
  }
  .wl-btn-clear {
    width: 100% !important;
    text-align: center !important;
    padding: 8px 0 !important;
    font-size: 0.84rem !important;
    display: block !important;
  }

  /* Empty state */
  .wl-empty-wrap {
    padding: 48px 16px 64px !important;
  }
  .wl-empty-circle {
    width: 64px !important;
    height: 64px !important;
    font-size: 1.8rem !important;
    margin-bottom: 16px !important;
  }
  .wl-empty-wrap h2 {
    font-size: 1.25rem !important;
  }
  .wl-empty-wrap p {
    font-size: 0.85rem !important;
    margin-bottom: 20px !important;
  }
}

