/* ebay theme overrides on top of the aiz-core / vendors design system. */

:root {
  --text-muted: #6b6b76;
  --text-dim: #8d8d8d;
}

.nx-wordmark {
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nx-wordmark span:nth-child(1) { color: #e53238; }
.nx-wordmark span:nth-child(2) { color: #0064d2; }
.nx-wordmark span:nth-child(3) { color: #f5af02; }
.nx-wordmark span:nth-child(4) { color: #86b817; }

.nx-hero {
  background: linear-gradient(135deg, rgba(0, 100, 210, 0.1), rgba(245, 175, 2, 0.12));
  border: 1px solid #eee;
  padding: 3rem 2rem;
  min-height: 260px;
  display: flex;
  align-items: center;
}

.nx-hero-content {
  max-width: 620px;
}

.nx-hero-tag {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 100, 210, 0.12);
  border-radius: 20px;
  color: #0064d2;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.nx-hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: #292933;
}

.nx-hero-desc {
  color: #6b6b76;
  margin-bottom: 1.5rem;
}

.nx-carousel-pending {
  min-height: 120px;
}

.nx-cat-icon-box {
  width: 100%;
  height: 90px;
  border-radius: 8px;
  background: #f5f6f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0px 0px 25px -15px rgba(171, 169, 171, 1);
}

.nx-cat-icon-box img {
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
}

.nx-price {
  color: var(--secondary-base, #0064d2);
}

.nx-btn-primary {
  background: var(--secondary-base, #0064d2);
  color: #fff;
  border: none;
}

.nx-btn-primary:hover {
  background: var(--hov-secondary-base, #004f9e);
  color: #fff;
}

.nx-discount-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 100, 210, 0.1);
  border: 1px solid rgba(0, 100, 210, 0.3);
  color: var(--secondary-base, #0064d2);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---- Cart drawer (shared floating component, not part of the aiz page markup) ---- */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #fff;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.cart-drawer-overlay.open .cart-drawer {
  transform: translateX(-420px);
}

.cart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  background: #f9f9fb;
  border-radius: 8px;
  align-items: center;
}

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #eee;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  color: #3490f3;
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eee;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #eee;
  background: #f9f9fb;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.btn-checkout {
  width: 100%;
  padding: 0.85rem;
  background: var(--secondary-base, #0064d2);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.btn-checkout:hover {
  background: var(--hov-secondary-base, #004f9e);
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  background: #fff;
  border: 1px solid var(--secondary-base, #0064d2);
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #8d8d8d;
}

.page-shell {
  max-width: 460px;
  margin: 2.5rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.page-shell.wide {
  max-width: 900px;
}

.page-shell h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: #292933;
}

.page-subtitle {
  color: #6b6b76;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #6b6b76;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #f9f9fb;
  border: 1px solid #dfdfe6;
  border-radius: 6px;
  color: #292933;
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0064d2;
  box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.12);
}

.btn-block {
  width: 100%;
  padding: 0.8rem;
  background: #0064d2;
  color: #fff;
  border: none;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.btn-block:hover {
  background: #004f9e;
}

.btn-block:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-footer-link {
  text-align: center;
  margin-top: 1.25rem;
  color: #6b6b76;
  font-size: 0.85rem;
}

.form-footer-link a {
  color: #0064d2;
  font-weight: 700;
}

.form-error {
  display: none;
  background: rgba(229, 50, 56, 0.08);
  border: 1px solid rgba(229, 50, 56, 0.3);
  color: #e53238;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.form-error.visible {
  display: block;
}

.btn-secondary {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: #eee;
  color: #292933;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-secondary:hover {
  background: #e2e2e2;
  color: #292933;
}

.order-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem;
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.order-id {
  font-family: monospace;
  color: #8d8d8d;
  font-size: 0.8rem;
}

.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-PENDING { background: rgba(243, 175, 61, 0.15); color: #a36a00; }
.status-PAID { background: rgba(0, 100, 210, 0.12); color: #0064d2; }
.status-SHIPPED { background: rgba(133, 181, 103, 0.15); color: #4c7a2e; }
.status-DELIVERED { background: rgba(133, 181, 103, 0.25); color: #2f5a17; }
.status-CANCELLED { background: rgba(229, 50, 56, 0.1); color: #e53238; }

/* ---- Product detail page ---- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 1.5rem 0 3rem;
}

.detail-image {
  background: #f9f9fb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.detail-image img {
  max-height: 320px;
  object-fit: contain;
}

.badge-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 100, 210, 0.08);
  color: #0064d2;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.product-rating {
  color: #f5af02;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}

.product-rating span {
  color: #8d8d8d;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.detail-price {
  font-size: 1.9rem;
  font-weight: 800;
  color: #292933;
}

.detail-price-original {
  font-size: 1rem;
  color: #8d8d8d;
  text-decoration: line-through;
}

.discount-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 100, 210, 0.1);
  border: 1px solid rgba(0, 100, 210, 0.3);
  color: #0064d2;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.stock-note {
  font-size: 0.85rem;
  color: #6b6b76;
  margin-bottom: 1.25rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.qty-stepper .qty-btn {
  width: 34px;
  height: 34px;
  background: #f0f0f3;
}

.page-header {
  margin: 1.5rem 0 1rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #292933;
}

.summary-card {
  background: #f9f9fb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: #6b6b76;
}

.summary-row.total {
  border-top: 1px solid #e2e2e8;
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #292933;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #f9f9fb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #292933;
}

.stat-label {
  color: #6b6b76;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* ---- Admin dashboard ---- */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  padding: 0.75rem 1.1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #6b6b76;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.tab-btn.active {
  color: #0064d2;
  border-bottom-color: #0064d2;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid #eee;
  border-radius: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: #f9f9fb;
  color: #6b6b76;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f3;
  vertical-align: middle;
}

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

.data-table select,
.data-table input {
  padding: 0.35rem 0.6rem;
  background: #f9f9fb;
  border: 1px solid #dfdfe6;
  color: #292933;
  border-radius: 6px;
  font-size: 0.8rem;
}

.btn-danger-outline {
  padding: 0.4rem 0.9rem;
  background: rgba(229, 50, 56, 0.06);
  border: 1px solid rgba(229, 50, 56, 0.3);
  color: #e53238;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
}

/* ============================================================
   MOBILE RESPONSIVE STYLES (added for mobile-friendliness)
   ============================================================ */

/* ---- Tablet & below (max-width: 768px) ---- */
@media (max-width: 768px) {

  /* Hero section */
  .nx-hero {
    padding: 2rem 1rem;
    min-height: auto;
  }
  .nx-hero-title {
    font-size: 1.35rem;
  }
  .nx-hero-desc {
    font-size: 0.85rem;
  }

  /* Page shell (login, register, account forms) */
  .page-shell {
    max-width: 100%;
    margin: 1rem 0.5rem;
    padding: 1.25rem;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .page-shell.wide {
    max-width: 100%;
  }
  .page-shell h1 {
    font-size: 1.25rem;
  }

  /* Form rows: stack to single column */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Product detail grid: stack image above info */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .detail-image {
    min-height: 240px;
    padding: 1rem;
  }
  .detail-image img {
    max-height: 240px;
  }
  .detail-price {
    font-size: 1.5rem;
  }

  /* Cart drawer: full width on mobile */
  .cart-drawer {
    right: -100vw;
    max-width: 100vw;
  }
  .cart-drawer-overlay.open .cart-drawer {
    transform: translateX(-100vw);
  }

  /* Toast notifications: center on mobile */
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 1rem;
  }
  .toast {
    text-align: center;
  }

  /* Tabs: allow horizontal scroll */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Order cards: stack header */
  .order-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Stat grid: 2 columns max */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Buttons: ensure touch-friendly */
  .btn-block,
  .btn-checkout,
  .nx-btn-primary {
    padding: 0.9rem;
    font-size: 1rem;
  }

  /* Form inputs: ensure touch-friendly */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.7rem 0.85rem;
    font-size: 1rem; /* prevent iOS zoom on focus */
  }

  /* Tables: horizontal scroll wrapper (already has .data-table-wrap) */
  .data-table th,
  .data-table td {
    padding: 0.6rem 0.75rem;
  }

  /* Category icons: smaller on mobile */
  .nx-cat-icon-box {
    height: 72px;
  }
  .nx-cat-icon-box img {
    max-width: 50px;
    max-height: 50px;
  }

  /* Footer columns: stack */
  .row .col-xl-6,
  .row .col-lg-7,
  .row .col-xxl-3,
  .row .col-xl-4,
  .row .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  /* Quantity stepper: bigger touch targets */
  .qty-stepper .qty-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  /* Summary card */
  .summary-card {
    padding: 1rem;
  }

  /* Order card */
  .order-card {
    padding: 1rem;
  }

  /* Nav search bar full width on mobile */
  .front-header-search {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ---- Small phones (max-width: 480px) ---- */
@media (max-width: 480px) {

  .nx-hero {
    padding: 1.5rem 0.75rem;
  }
  .nx-hero-title {
    font-size: 1.15rem;
  }
  .nx-hero-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
  }

  .page-shell {
    margin: 0.5rem 0;
    padding: 1rem;
  }

  .detail-price {
    font-size: 1.3rem;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .stat-card {
    padding: 0.85rem;
  }
  .stat-value {
    font-size: 1.2rem;
  }

  .cart-item {
    gap: 0.5rem;
    padding: 0.6rem;
  }
  .cart-item-img {
    width: 44px;
    height: 44px;
  }

  /* Even smaller category icons */
  .nx-cat-icon-box {
    height: 60px;
  }
}

/* ---- Global responsive images ---- */
img {
  max-width: 100%;
  height: auto;
}
