/* Vouchers and favorites inside the shared customer account hub. */
body {
  background-color: #050505;
  color: #fff;
}

/* Hub Container & Sidebar */
.hub-container {
  display: flex;
  gap: 30px;
  padding: 50px 5%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 70vh;
}

.hub-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #0a0a0a;
  border-radius: 8px;
  border: 1px solid #222;
  padding: 30px 0;
  height: fit-content;
  /* Same as the profile page: follows the scroll under the fixed header. */
  position: sticky;
  top: 157px;
  align-self: flex-start;
  max-height: calc(100vh - 177px);
  overflow-y: auto;
}

.hub-user-info {
  text-align: center;
  padding: 0 20px 20px;
  border-bottom: 1px solid #222;
  margin-bottom: 20px;
}

.hub-avatar {
  width: 90px;
  height: 90px;
  max-width: 90px;
  max-height: 90px;
  border-radius: 50%;
  background-color: #111;
  color: #ff0000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-weight: 900;
  margin: 0 auto 15px;
  border: 2px solid #ff0000;
  overflow: hidden;
  position: relative;
}

.hub-avatar img {
  width: 100%;
  height: 100%;
  max-width: 90px;
  max-height: 90px;
  object-fit: cover;
  display: block;
}

.hub-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hub-nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 22px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: #aaa;
  text-align: left;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.hub-nav-btn:hover {
  background-color: #111;
  color: #fff;
}

.hub-nav-btn.active {
  background-color: #111;
  color: #fff;
  border-left-color: #ff0000;
}

.hub-content-area {
  flex: 1;
  min-width: 0;
  background: #0a0a0a;
  border-radius: 8px;
  border: 1px solid #222;
  padding: 32px;
}

.hub-tab-content {
  display: none;
  animation: fadeInTab 0.4s ease forwards;
}

.hub-tab-content.active {
  display: block;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-title {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 6px;
}

.hub-subtitle {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

@media (max-width: 991px) {
  .hub-container {
    flex-direction: column;
    padding: 30px 15px;
  }
  .hub-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.voucher-grid,
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.voucher-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  border: 1px solid #333;
  border-top: 3px solid #ff0000;
  border-radius: 8px;
  background: #111;
}

.voucher-discount {
  margin-bottom: 14px;
  color: #ff3333;
  font-size: 1.35rem;
  font-weight: 900;
}

/* The customer's own store credit (from a completed refund review). */
.voucher-card.is-store-credit {
  border-top-color: #28a745;
}

.voucher-card.is-store-credit .voucher-discount {
  color: #7bd793;
  font-size: 1.15rem;
}

.voucher-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.voucher-card p,
.voucher-card small {
  color: #999;
}

.voucher-card p {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.voucher-card small {
  margin-bottom: 20px;
}

.voucher-copy-btn {
  width: 100%;
  margin-top: auto;
  padding: 11px 16px;
  border: 1px solid #ff0000;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.voucher-copy-btn:hover,
.voucher-copy-btn:focus-visible {
  background: #ff0000;
  color: #fff;
  outline: none;
}

.collection-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 24px;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  color: #999;
  text-align: center;
}

.collection-card {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.3s,
    border-color 0.3s;
  cursor: pointer;
}

.collection-card:hover {
  transform: translateY(-5px);
  border-color: #ff0000;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.collection-img {
  height: 160px;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.collection-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition:
    opacity 0.3s,
    transform 0.5s;
}

.collection-card:hover .collection-img img {
  opacity: 1;
  transform: scale(1.05);
}

.collection-info {
  padding: 20px;
}

.collection-info h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 5px;
  font-weight: 700;
}

.collection-info p {
  color: #aaa;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
}

.collection-info .view-link {
  color: #ff0000;
  font-weight: 600;
}

/* CREATE NEW BUTTON */
.create-collection-btn {
  background: transparent;
  border: 2px dashed #444;
  color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.create-collection-btn:hover {
  border-color: #ff0000;
  color: #ff0000;
  background: rgba(255, 0, 0, 0.05);
  transform: translateY(-5px);
}

.create-collection-btn svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  margin-bottom: 15px;
}

@media (max-width: 600px) {
  .voucher-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }
}

/* Collection Empty State & Dialog Enhancements */
.collection-empty-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 30px 10px;
}

.collection-empty-box {
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed #3a3a3a;
  border-radius: 12px;
  background: #0f0f0f;
  max-width: 520px;
  width: 100%;
}

.collection-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.collection-empty-box h3 {
  color: #f5f5f5;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.collection-empty-box p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 22px;
}

.collection-empty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-explore-products {
  background: #ff0000;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.btn-explore-products:hover {
  background: #cc0000;
  color: #fff;
}

.btn-create-collection {
  background: transparent;
  border: 1px solid #444;
  color: #ccc;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-create-collection:hover {
  border-color: #ff0000;
  color: #ff0000;
}

