/* ============================================================
   JANOSCI — Storefront Pages Mobile (all customer pages)
   Loaded last after mobile-final.css
   ============================================================ */

/* ── Global page spacing ── */
@media (max-width: 768px) {
  .container.section,
  .container.section-sm {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .section,
  .section-sm {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .display-5 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }

  .lead {
    font-size: 1rem !important;
  }
}

/* ── Page hero (orders, products, etc.) ── */
@media (max-width: 768px) {
  .page-hero {
    padding: 1rem 0 !important;
    margin-bottom: 0 !important;
  }

  .page-hero-title {
    font-size: 1.3rem !important;
    line-height: 1.25 !important;
  }

  .page-hero-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
  }

  .breadcrumb {
    font-size: 0.72rem !important;
    flex-wrap: wrap;
    gap: 0.15rem;
  }
}

/* ── Policy pages ── */
.policy-card {
  background: #fff;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.policy-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--m-primary, #0a2540);
  font-size: 1.25rem;
  font-weight: 700;
}

.policy-content p,
.policy-content ul {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .policy-card {
    padding: 1.25rem !important;
    border-radius: 14px !important;
  }

  .policy-card h1 {
    font-size: 1.35rem !important;
  }

  .policy-content h3 {
    font-size: 1.05rem !important;
    margin-top: 1.25rem !important;
  }

  .policy-content p,
  .policy-content ul {
    font-size: 0.88rem !important;
  }
}

/* ── Contact page ── */
.contact-card,
.contact-form-card {
  background: #fff;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-text span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.info-text strong {
  font-size: 1rem;
  color: #0f172a;
  word-break: break-word;
}

.contact-form-card .form-label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
}

.contact-form-card .form-control {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  min-height: 48px;
}

@media (max-width: 768px) {
  .contact-card,
  .contact-form-card {
    padding: 1.25rem !important;
    border-radius: 14px !important;
  }

  .contact-card h2,
  .contact-form-card h2 {
    font-size: 1.2rem !important;
  }

  .contact-card .mb-5 {
    margin-bottom: 1.25rem !important;
  }

  .contact-info-list {
    gap: 1.1rem !important;
  }

  .info-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.1rem !important;
  }

  .info-text strong {
    font-size: 0.92rem !important;
  }

  .contact-form-card .btn {
    width: 100% !important;
  }
}

/* ── About page ── */
.stat-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.stat-box h3 {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.value-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.value-card:hover {
  transform: translateY(-3px);
}

.value-icon {
  width: 52px;
  height: 52px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.value-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 768px) {
  .value-card {
    padding: 1.25rem !important;
  }

  .about-img-wrap img {
    padding: 2rem !important;
  }

  .stat-box h3 {
    font-size: 1.5rem !important;
  }
}

/* ── Orders page ── */
.order-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.order-card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.order-card-total {
  text-align: right;
}

.order-timeline-wrap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.order-timeline {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.order-timeline::-webkit-scrollbar {
  display: none;
}

.order-timeline-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-width: 360px;
}

.order-timeline-line {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--border, #e2e8f0);
  z-index: 0;
}

.order-timeline-progress {
  position: absolute;
  top: 14px;
  left: 14px;
  height: 2px;
  background: var(--gold, #d4a017);
  z-index: 1;
  transition: width 0.5s;
}

.order-timeline-step {
  text-align: center;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

.order-timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin: 0 auto 0.35rem;
  border: 2px solid var(--border, #e2e8f0);
}

.order-timeline-label {
  font-size: 0.62rem;
  line-height: 1.2;
  padding: 0 2px;
}

.order-card-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .order-list-toolbar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .order-list-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  .order-card-head {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .order-card-body {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .order-card-total {
    text-align: left !important;
  }

  .order-timeline-label {
    font-size: 0.58rem !important;
  }

  .order-card-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .order-timeline-track {
    min-width: 320px;
  }

  .order-timeline-dot {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.6rem !important;
  }

  .order-timeline-label {
    font-size: 0.52rem !important;
  }
}

/* ── Checkout ── */
@media (max-width: 768px) {
  .checkout-container {
    margin: 0.5rem auto !important;
    padding: 0 0.65rem calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    max-width: 100% !important;
  }

  .checkout-container .card {
    padding: 1rem !important;
  }

  .checkout-container .btn {
    min-height: 44px;
  }
}

/* ── Profile ── */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr !important;
  }

  .profile-sidebar {
    order: -1;
  }
}

/* ── Wishlist empty / generic cards ── */
@media (max-width: 768px) {
  .card .card-body {
    padding: 1rem !important;
  }

  .empty-state,
  div[style*="text-align:center"][style*="padding:5rem"] {
    padding: 2.5rem 1rem !important;
  }
}

/* ── Register (wider auth card) ── */
body.auth-page.auth-register .auth-card {
  max-width: 520px;
}

@media (max-width: 600px) {
  body.auth-page.auth-register {
    align-items: flex-start !important;
    padding-top: 1.25rem !important;
  }

  body.auth-page.auth-register .auth-card {
    max-width: 100% !important;
  }

  body.auth-page.auth-register .auth-header,
  body.auth-page.auth-register .auth-body {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
}

/* ── Profile setup (standalone) ── */
@media (max-width: 480px) {
  body.profile-setup-page {
    padding: 0.75rem !important;
  }

  body.profile-setup-page .setup-card {
    padding: 1.25rem !important;
    border-radius: 14px !important;
  }
}
