/* ==========================================================================
   MEN N BLACK — Customer Dashboard, Cart & Checkout Styling
   ========================================================================== */

.page-header {
  padding: 3.5rem 0 2rem 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- CART LAYOUT --- */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding-bottom: 6rem;
  align-items: start;
}

.cart-items-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1.8fr 1fr 1fr 40px;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
}

.cart-item-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-weight: 600;
  font-size: 1rem;
}

.cart-item-subtotal {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.cart-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.cart-remove-btn:hover {
  color: #C62828;
}

/* Summary Box */
.order-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2rem;
  position: sticky;
  top: 105px;
}

.summary-title {
  font-size: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
  margin-top: 1.2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.free-shipping-bar {
  background: var(--accent-gold-light);
  border: 1px solid var(--accent-gold-border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent-gold-hover);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* --- CHECKOUT LAYOUT --- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr;
  gap: 3.5rem;
  padding-bottom: 6rem;
  align-items: start;
}

.checkout-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2.2rem;
  margin-bottom: 2rem;
}

.checkout-section-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.checkout-section-title .step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-family: var(--font-sans);
}

.payment-methods-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-card-option {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.payment-card-option:hover,
.payment-card-option.selected {
  border-color: var(--accent-gold);
  background-color: var(--accent-gold-light);
}

.payment-card-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent-gold);
}

.payment-option-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.payment-option-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.upi-box-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: center;
}

#dynamic-qr-container {
  min-width: 0 !important;
  min-height: 0 !important;
}

#dynamic-qr-wrapper canvas,
#dynamic-qr-wrapper img,
#static-qr-wrapper img {
  display: block;
  width: min(190px, 100%);
  height: auto;
  margin: 0 auto;
}

/* --- CUSTOMER DASHBOARD --- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding-bottom: 6rem;
  align-items: start;
}

.dashboard-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: sticky;
  top: 105px;
}

.profile-card {
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #242424;
  color: var(--accent-gold);
  font-size: 1.8rem;
  font-family: var(--font-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  border: 2px solid var(--accent-gold);
}

.profile-name {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.profile-email {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dashboard-nav {
  list-style: none;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  font-weight: 600;
}

.dashboard-tab-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dash-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2rem;
}

.dash-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Orders Cards & Timeline */
.order-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 1.8rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.order-card-header {
  background: #202020;
  padding: 1.2rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.order-ref {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.order-card-body {
  padding: 1.6rem;
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.order-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

/* Order Timeline */
.timeline {
  display: flex;
  justify-content: space-between;
  margin: 1.8rem 0;
  position: relative;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.timeline-step.completed .timeline-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: white;
}

.timeline-step.active .timeline-dot {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #111111;
}

.timeline-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* Admin Cancellation Notice Alert */
.cancellation-notice {
  background-color: #351D1D;
  border: 1px solid #653838;
  border-left: 4px solid var(--status-cancelled);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin: 1.2rem 0;
}
.cancellation-notice h4 {
  color: var(--status-cancelled);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.cancellation-notice p {
  font-size: 0.88rem;
  color: #E0C8C8;
  line-height: 1.6;
}

/* Notification Item */
.notification-card {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.notification-card.unread {
  background-color: var(--accent-gold-light);
}

@media (max-width: 992px) {
  .cart-layout, .checkout-layout, .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }
  .dashboard-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .upi-box-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .upi-box-grid > div {
    min-width: 0;
  }

  #dynamic-qr-container {
    width: min(190px, 65vw);
    margin: 0 auto;
  }
}
