.shop-page {
  padding: 2rem 0 3rem;
}

.shop-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.shop-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: start;
}

.shop-left {
  display: grid;
  gap: 1rem;
}

.shop-right {
  position: sticky;
  top: 1rem;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
}

.search-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  align-items: center;
}

.shop-cat-btn.is-active {
  border-color: rgba(197, 154, 82, 0.75);
  background: rgba(197, 154, 82, 0.12);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.category-row button {
  white-space: nowrap;
}

/* ── Wishlist Tab Button ── */
.wishlist-tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.wishlist-count-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}

.wishlist-count-badge.visible {
  display: flex;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.shop-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin: 1.1rem 0 0.2rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.10);
}

.shop-pagination .page-info {
  color: var(--muted);
  font-weight: 800;
  min-width: 110px;
  text-align: center;
}

.shop-pagination button {
  white-space: nowrap;
}

/* ── Product Card ── */
.product-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(197, 154, 82, 0.55);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.product-card.in-compare {
  border-color: rgba(197, 154, 82, 0.8);
  box-shadow: 0 0 0 2px rgba(197, 154, 82, 0.3);
}

/* ── Card top actions (wishlist + compare) ── */
.card-top-actions {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
}

.btn-wishlist,
.btn-compare {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--muted);
  padding: 0;
}

.btn-wishlist:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.15);
}

.btn-wishlist.is-wishlisted {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.btn-compare:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(197, 154, 82, 0.15);
}

.btn-compare.is-comparing {
  border-color: var(--gold);
  background: rgba(197, 154, 82, 0.2);
  color: var(--gold);
}

.product-top {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.product-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  object-fit: contain;
  padding: 8px;
}

.product-name {
  font-weight: 800;
  margin-bottom: 0.4rem;
  padding-right: 2.2rem;
}

.color-swatches {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border: 2px solid var(--gold);
  transform: scale(1.1);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.qty-control {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.qty-control button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
}

.qty-control input {
  width: 70px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101010;
  color: var(--text);
  padding: 0.45rem 0.5rem;
  font: inherit;
}

.cart-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.15);
  padding: 1rem;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
}

.cart-lines {
  display: grid;
  gap: 0.75rem;
  margin: 0.8rem 0;
}

.cart-line {
  display: grid;
  gap: 0.25rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 0.6rem;
}

.cart-line:last-child {
  border-bottom: none;
}

.cart-line-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.cart-line-name {
  font-weight: 800;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-top: 0.6rem;
}

.cart-total strong {
  color: var(--gold);
  font-size: 1.25rem;
}

.checkout-form {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.checkout-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.95rem;
}

.shop-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

/* ── Compare Bar (floating) ── */
.compare-bar {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(197, 154, 82, 0.5);
  border-radius: 20px;
  padding: 0.9rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(197, 154, 82, 0.15);
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.compare-bar.visible {
  bottom: 2rem;
}

.compare-bar-text {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.compare-bar-text span {
  color: var(--gold);
}

.compare-bar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

/* ── Compare Modal ── */
.compare-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.compare-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.compare-modal {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8);
  transform: translateY(30px);
  transition: transform 0.3s ease;
}

.compare-modal-overlay.active .compare-modal {
  transform: translateY(0);
}

.compare-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  gap: 1rem;
}

.compare-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--gold), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.compare-modal-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.compare-modal-close:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.compare-table th {
  background: rgba(197, 154, 82, 0.08);
  border-bottom: 2px solid rgba(197, 154, 82, 0.3);
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--gold);
}

.compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table .row-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.02);
}

.compare-table .price-cell {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
}

.compare-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  padding: 6px;
  margin-bottom: 0.5rem;
  display: block;
}

/* ── Wishlist Empty State ── */
.wishlist-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.wishlist-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

@media (max-width: 980px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-right {
    position: static;
  }

  .compare-bar {
    flex-direction: column;
    gap: 0.8rem;
    border-radius: 16px;
    text-align: center;
    width: calc(100% - 2rem);
  }

  .compare-table {
    font-size: 0.82rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.7rem 0.6rem;
  }
}
