/* ============================================================
   wishlist-cart.css — Renuce Wishlist & Cart Page Styles
   ============================================================ */

/* ─────────────────────────────────────
   PAGE WRAPPER
───────────────────────────────────── */
.wc-page {
  padding: 2rem 0 5rem;
  min-height: 60vh;
}

/* ─────────────────────────────────────
   TABS
───────────────────────────────────── */
.wc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border, #e5e5e5);
  margin-bottom: 2.5rem;
}

.wc-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted, #666);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.wc-tab svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.wc-tab:hover {
  color: var(--color-text, #111);
}

.wc-tab--active,
.wc-tab[aria-selected="true"] {
  color: var(--color-text, #111);
  border-bottom-color: var(--color-text, #111);
}

.wc-tab--active svg,
.wc-tab[aria-selected="true"] svg {
  opacity: 1;
}

.wc-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-text, #111);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

/* ─────────────────────────────────────
   PANELS
───────────────────────────────────── */
.wc-panel {
  animation: wc-fade-in 0.25s ease;
}

@keyframes wc-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────
   EMPTY STATES
───────────────────────────────────── */
.wc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1rem;
  gap: 1rem;
}

.wc-empty__icon {
  color: var(--color-text-muted, #aaa);
  margin-bottom: 0.5rem;
}

.wc-empty__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text, #111);
  margin: 0;
}

.wc-empty__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted, #666);
  max-width: 320px;
  margin: 0;
  line-height: 1.6;
}

/* ─────────────────────────────────────
   WISHLIST GRID
───────────────────────────────────── */
.wc-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* Wishlist Card */
.wc-wish-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e8e8e8);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.wc-wish-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}

.wc-wish-card__img-link {
  display: block;
  position: relative;
}

.wc-wish-card__media {
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--color-bg-subtle, #f5f5f5);
  overflow: hidden;
}

.wc-wish-card__media--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-wish-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wc-wish-card:hover .wc-wish-card__img {
  transform: scale(1.04);
}

.wc-wish-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-sale, #e53e3e);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.wc-wish-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wc-wish-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text, #111);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wc-wish-card__name:hover { text-decoration: underline; }

.wc-wish-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.wc-wish-card__price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text, #111);
}

.wc-wish-card__compare {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #999);
  text-decoration: line-through;
}

.wc-wish-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.wc-wish-card__atc {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
}

.wc-wish-card__remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: var(--radius-sm, 4px);
  color: var(--color-text-muted, #999);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.wc-wish-card__remove:hover {
  color: #e53e3e;
  border-color: #e53e3e;
  background: #fff5f5;
}

/* Wishlist footer */
.wc-wishlist-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border, #e5e5e5);
}

/* ─────────────────────────────────────
   CART PAGE LAYOUT
───────────────────────────────────── */
.wc-cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

/* Cart Rows */
.wc-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

.wc-cart-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border, #e5e5e5);
  background: var(--color-surface, #fff);
  transition: background 0.15s;
}

.wc-cart-row:last-child { border-bottom: none; }
.wc-cart-row:hover { background: var(--color-bg-subtle, #fafafa); }

.wc-cart-row__img-link { display: block; }

.wc-cart-row__img {
  width: 90px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm, 4px);
  background: var(--color-bg-subtle, #f5f5f5);
}

.wc-cart-row__details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.wc-cart-row__name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text, #111);
  text-decoration: none;
  line-height: 1.4;
}

.wc-cart-row__name:hover { text-decoration: underline; }

.wc-cart-row__variant {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #888);
}

.wc-cart-row__price {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #888);
}

.wc-cart-row__bottom {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
}

.wc-cart-row__line-total {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text, #111);
  white-space: nowrap;
}

.wc-cart-row__remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--color-text-muted, #bbb);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.wc-cart-row__remove:hover {
  color: #e53e3e;
  background: #fff5f5;
}

/* Qty Selector */
.wc-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border, #ddd);
  border-radius: var(--radius-sm, 4px);
  overflow: hidden;
  height: 36px;
}

.wc-qty__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 100%;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text, #333);
  cursor: pointer;
  transition: background 0.15s;
}

.wc-qty__btn:hover { background: var(--color-bg-subtle, #f5f5f5); }

.wc-qty__input {
  width: 40px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--color-border, #ddd);
  border-right: 1px solid var(--color-border, #ddd);
  text-align: center;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text, #111);
  background: transparent;
  -moz-appearance: textfield;
}

.wc-qty__input::-webkit-inner-spin-button,
.wc-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ─────────────────────────────────────
   CART SUMMARY SIDEBAR
───────────────────────────────────── */
.wc-cart-summary {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: var(--radius-md, 8px);
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}

.wc-cart-summary__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text, #111);
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border, #e5e5e5);
}

/* Coupon */
.wc-coupon { margin-bottom: 1.25rem; }

.wc-coupon__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--color-text-muted, #666);
  cursor: pointer;
  padding: 0;
  width: 100%;
  text-align: left;
}

.wc-coupon__toggle:hover { color: var(--color-text, #111); }

.wc-coupon__chevron {
  margin-left: auto;
  transition: transform 0.2s;
}

.wc-coupon__toggle[aria-expanded="true"] .wc-coupon__chevron {
  transform: rotate(180deg);
}

.wc-coupon__form { margin-top: 0.75rem; }

.wc-coupon__input-row {
  display: flex;
  gap: 0.5rem;
}

.wc-coupon__input {
  flex: 1;
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: var(--radius-sm, 4px);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-text, #111);
  background: var(--color-bg, #fff);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wc-coupon__input:focus {
  outline: none;
  border-color: var(--color-text, #111);
}

.wc-coupon__msg {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.wc-coupon__msg--success { color: #2d7a4a; }
.wc-coupon__msg--error   { color: #c53030; }

/* Summary rows */
.wc-cart-summary__rows {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.wc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted, #555);
}

.wc-summary-row__value { font-weight: 500; color: var(--color-text, #111); }
.wc-summary-row__value--discount { color: #2d7a4a; }

.wc-summary-row--total {
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--color-border, #e5e5e5);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text, #111);
}

.wc-summary-row--total .wc-summary-row__value {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Shipping bar */
.wc-shipping-bar {
  margin-bottom: 1.5rem;
}

.wc-shipping-bar__track {
  height: 4px;
  background: var(--color-bg-subtle, #eee);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.wc-shipping-bar__fill {
  height: 100%;
  background: var(--color-text, #111);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.wc-shipping-bar__label {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #666);
  margin: 0;
}

.wc-shipping-bar__label--free {
  color: #2d7a4a;
  font-weight: 500;
}

/* Checkout button */
.wc-checkout-btn {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Or divider */
.wc-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
  color: var(--color-text-muted, #aaa);
  font-size: 0.8125rem;
}

.wc-or::before,
.wc-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border, #e5e5e5);
}

/* Trust badges */
.wc-trust {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border, #e5e5e5);
}

.wc-trust__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted, #666);
}

.wc-trust__item svg { flex-shrink: 0; }

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */
@media (max-width: 900px) {
  .wc-cart-layout {
    grid-template-columns: 1fr;
  }

  .wc-cart-summary {
    position: static;
  }
}

@media (max-width: 600px) {
  .wc-wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .wc-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .wc-cart-row {
    grid-template-columns: 70px 1fr auto;
    gap: 0.875rem;
    padding: 1rem;
  }

  .wc-cart-row__img {
    width: 70px;
    height: 88px;
  }

  .wc-cart-row__bottom {
    flex-wrap: wrap;
    gap: 0.625rem;
  }
}

@media (max-width: 400px) {
  .wc-wishlist-grid {
    grid-template-columns: 1fr;
  }
}