/*
 * misc.mobile.css - Category misc (search / comments / author / order-lookup / 404)
 * Viewport: max-width:1023.98px (loaded via media attribute)
 * Prefix: ep- (error page standalone) - search- - comment- - author- - ol- - e404-
 */

/* Error pages standalone (ep-) */

/* Root */
.ep-root {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-soft);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header strip */
.ep-header {
  background: var(--color-primary);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.ep-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: #fff;
}

.ep-logo__mark {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--font-size-base);
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

/* Small-screen: hide name/sub (<=480px from source; mobile-first = base) */
.ep-logo__name,
.ep-logo__sub {
  display: none;
}

/* Tablet+ within mobile viewport - show name/sub */
@media (min-width: 481px) {
  .ep-logo__name {
    display: block; /* restore */
    font-size: var(--font-size-base);
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
  }
  .ep-logo__sub {
    display: block; /* restore */
    font-size: 0.625rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

.ep-header__hotline {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.ep-header__hotline:hover { color: rgba(255,255,255,.8); }
.ep-header__hotline svg { flex-shrink: 0; }

/* Main body */
.ep-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 3rem;
}

/* Card */
.ep-card {
  background: var(--color-bg);
  border-radius: var(--radius-16);
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  /* Small-screen override (<=480px from source = base here) */
  padding: 2rem 1.25rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
}

/* Tablet+ within mobile viewport */
@media (min-width: 481px) {
  .ep-card { padding: 3rem 2.5rem; }
}

/* Stamp illustration */
.ep-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Small-screen size (<=480px from source = base) */
  width: 88px;
  height: 88px;
  border: 5px dashed var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  position: relative;
  background: #fff5f5;
}

@media (min-width: 481px) {
  .ep-stamp { width: 110px; height: 110px; }
}

.ep-stamp__code {
  /* Small-screen size = base */
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  position: relative;
  z-index: 1;
}

@media (min-width: 481px) {
  .ep-stamp__code { font-size: 2.5rem; }
}

/* Inner ring decoration */
.ep-stamp::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(200,16,46,.25);
}

.ep-title {
  /* Small-screen size = base */
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

@media (min-width: 481px) {
  .ep-title { font-size: 1.625rem; }
}

.ep-msg {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0 0 1.75rem;
}

/* CTA buttons */
.ep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
/* Small-screen: stack column */
.ep-actions { flex-direction: column; align-items: center; }
.ep-actions .btn { width: 100%; justify-content: center; }

@media (min-width: 481px) {
  .ep-actions { flex-direction: row; align-items: initial; }
  .ep-actions .btn { width: auto; justify-content: initial; }
}

/* Contact links */
.ep-contacts {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.ep-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.ep-contact-link:hover { color: var(--color-primary); }
.ep-contact-link svg { flex-shrink: 0; }

/* Debug block (500) */
.ep-debug {
  max-width: 100%;
  text-align: left;
  margin-bottom: 1.5rem;
}
.ep-debug summary {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  padding: 0.5rem 0;
  user-select: none;
}
.ep-debug pre {
  background: var(--color-bg-soft);
  padding: var(--space-4);
  border-radius: var(--radius-8);
  overflow: auto;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--color-border);
  color: #374151;
}

/* Footer strip */
.ep-footer {
  background: var(--color-footer-bg);
  color: rgba(255,255,255,.45);
  text-align: center;
  font-size: 0.75rem;
  padding: 0.875rem 1.5rem;
}
.ep-footer a { color: rgba(255,255,255,.5); text-decoration: none; }
.ep-footer a:hover { color: #fff; }


/* Search page (search-) */

/* Search hero */
.search-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #AA0E27 100%);
  /* Small-screen padding (<=640px from source = base) */
  padding: 1.75rem 0 2.5rem;
  margin-bottom: -1.5rem;
}

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .search-hero { padding: 2.5rem 0 3rem; }
}

.search-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-2);
  text-align: center;
}

.search-hero__title {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

/* Large search form */
.search-hero__form {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  border: 3px solid rgba(255,255,255,.25);
  border-radius: 0.625rem;
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.search-hero__input {
  flex: 1;
  height: 54px;
  padding: 0 1.25rem;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: transparent;
  min-width: 0;
}
.search-hero__input::placeholder { color: var(--color-text-soft); }

.search-hero__btn {
  background: var(--color-primary);
  border: none;
  /* Small-screen: icon-only (<=640px from source = base) */
  padding: 0 var(--space-4);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-hero__btn span { display: none; } /* small-screen: icon only */
.search-hero__btn:hover { background: #AA0E27; }

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .search-hero__btn { padding: 0 1.75rem; }
  .search-hero__btn span { display: inline; }
}

/* Results area */
.search-results-area {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

/* Meta bar */
.search-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
.search-meta__count { font-weight: 700; color: var(--color-text); }
.search-meta__term { color: var(--color-primary); font-weight: 700; }

/* Tabs */
.search-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 2rem;
}

.search-tab {
  position: relative;
  /* Small-screen padding (<=640px from source = base) */
  padding: 0.5rem 0.875rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.search-tab:hover { color: var(--color-primary); }
.search-tab.is-active { color: var(--color-primary); }
.search-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
}

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .search-tab { padding: 0.625rem 1.25rem; font-size: 0.9375rem; }
}

.search-tab__count {
  background: #F3F4F6;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.search-tab.is-active .search-tab__count {
  background: #fee2e2;
  color: var(--color-primary);
}

/* Tab panels */
.search-panel { display: none; }
.search-panel.is-active { display: block; }

/* Post list */
.search-post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.search-post-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.625rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.search-post-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(200,16,46,.08);
  text-decoration: none;
}

.search-post-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #fee2e2;
  border-radius: var(--radius-8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.search-post-item__body { flex: 1; min-width: 0; }

/* Small-screen: allow wrap (<=640px from source = base) */
.search-post-item__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.25rem;
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .search-post-item__title {
    white-space: nowrap;
  }
}

.search-post-item__excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Post list arrow icon */
.search-post-item__arrow {
  flex-shrink: 0;
  color: #9CA3AF;
  align-self: center;
}

/* Empty state */
.search-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.875rem;
}
.search-empty--centered { max-width: 520px; margin-left: auto; margin-right: auto; }

.search-empty__icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.search-empty__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.search-empty__text {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin: 0 0 1.5rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.search-empty__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-empty__divider {
  color: var(--color-text-soft);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.search-empty__contact {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.search-empty__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.search-empty__contact-link:hover { color: var(--color-primary); }


/* Comments partial (comment-, rating-modal) */

/* Section wrapper */
.comments-section {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}
.comments-section__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-6);
  color: var(--color-text);
}
.comments-section__empty {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: var(--space-6);
}

/* Comment list */
.comment-list {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
}
.comment-list--replies {
  margin: var(--space-4) 0 var(--space-4) var(--space-8);
  border-left: 3px solid var(--color-border);
  padding-left: var(--space-4);
}
.comment-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-item__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.comment-item__author { font-weight: 600; color: var(--color-text); }
.comment-item__phone {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-family: monospace;
}
.comment-item__time {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}
.comment-item__content {
  color: var(--color-text);
  line-height: 1.6;
}

/* Reply button */
.comment-reply-btn {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
}

/* Form */
.comment-form-wrap {
  background: var(--color-bg-alt);
  border-radius: var(--radius-8);
  padding: var(--space-6);
}
.comment-form__title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

/* Small-screen: single-column form-row (<=640px from source = base) */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .form-row { grid-template-columns: 1fr 1fr; }
}

.comment-captcha__input { max-width: 160px; }
.form-hint {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-1);
}
.required { color: var(--color-error); }

/* Honeypot */
.comment-honeypot {
  display: none !important; /* must stay hidden; !important justified - honeypot anti-spam */
  position: absolute;
  left: -9999px;
}

/* Reply notice */
.comment-form__reply-notice {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-4);
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

/* Comment item stars */
.comment-item__stars { display: inline-flex; gap: 1px; }
.comment-star { font-size: var(--font-size-sm); color: var(--color-border); }
.comment-star--filled { color: var(--color-accent); }

/* Product rating modal */
.rating-modal {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.rating-modal.is-open { opacity: 1; visibility: visible; }
.rating-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.rating-modal__panel {
  position: relative; background: var(--color-bg);
  border-radius: var(--radius-12) var(--radius-12) 0 0;
  width: 100%; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.22);
  padding: var(--space-6) var(--space-5) var(--space-5);
  transform: translateY(100%); transition: transform .25s;
}
.rating-modal.is-open .rating-modal__panel { transform: translateY(0); }
.rating-modal__close {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: #F3F4F6; border-radius: 50%; cursor: pointer;
  color: #374151; font-size: 1rem; line-height: 1;
}
.rating-modal__heading {
  text-align: center; font-size: var(--font-size-lg); font-weight: 700;
  color: var(--color-text); margin: 0 0 var(--space-4);
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border);
}
.rating-modal__product {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-3); margin-bottom: var(--space-5);
}
.rating-modal__thumb {
  flex-shrink: 0; width: 104px; height: 104px; border-radius: var(--radius-8);
  overflow: hidden; border: 1px solid var(--color-border); background: var(--color-bg-soft);
}
.rating-modal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rating-modal__name { font-size: var(--font-size-base); font-weight: 600; color: var(--color-text); margin: 0; line-height: 1.4; }

/* Star rating row (label under each star) */
.rating-stars {
  list-style: none; margin: 0 0 var(--space-5); padding: 0;
  display: flex; justify-content: space-between; gap: var(--space-2);
}
.rating-stars__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); flex: 1; }
.rating-stars__btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 2.75rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px #D1D5DB;
  transition: color .1s, transform .1s;
}
.rating-stars__btn.is-on { color: var(--color-accent); -webkit-text-stroke: 1.5px var(--color-accent); }
.rating-stars__label { font-size: var(--font-size-xs); color: var(--color-text-muted); text-align: center; transition: color .1s; }
.rating-stars__label.is-on { color: var(--color-accent); font-weight: 600; }

/* Rating form body (revealed after star pick) */
.rating-form__body { border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.rating-form__textarea { min-height: 88px; resize: vertical; }
.rating-form__consent { font-size: var(--font-size-xs); color: var(--color-text-muted); margin: 0 0 var(--space-4); line-height: 1.5; }
.rating-form__consent a { color: var(--color-primary); text-decoration: none; }
.rating-form__submit { width: 100%; justify-content: center; font-size: var(--font-size-base); padding: var(--space-3) var(--space-5); }
.rating-form__policy {
  display: flex; justify-content: center; gap: var(--space-4); flex-wrap: wrap;
  margin: var(--space-4) 0 0; font-size: var(--font-size-xs);
}
.rating-form__policy a { color: var(--color-text-muted); text-decoration: none; }


/* Author page (author-) */

.author-page { padding: 24px 0 48px; }
.author-bc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.author-bc a { color: var(--color-text-muted); text-decoration: none; }
.author-bc a:hover { color: var(--color-primary); }

/* Small-screen: hero stacked (<=860px from source = base for mobile viewport) */
.author-hero {
  display: flex;
  gap: 22px;
  /* mobile: column-centred */
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-16);
  padding: 28px;
}
.author-chips,
.author-social { justify-content: center; }

/* Tablet: switch to row if viewport allows (source breakpoint 860px - in mobile file only up to 1023) */
@media (min-width: 861px) { /* source breakpoint: 860px - maintain parity S.1 */
  .author-hero {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
  .author-chips,
  .author-social { justify-content: initial; }
}

.author-hero__avatar {
  flex-shrink: 0;
  width: 92px; height: 92px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
}
.author-hero__name { font-size: 26px; font-weight: 800; margin: 0; color: var(--color-text); }
.author-hero__job { font-size: 15px; font-weight: 600; color: var(--color-primary); margin: 4px 0 0; }
.author-hero__cred { font-size: 13px; color: var(--color-text-muted); margin: 6px 0 0; }
.author-hero__bio { font-size: 15px; line-height: 1.7; color: #374151; margin: 14px 0 0; }
.author-hero__count { font-size: 13px; color: var(--color-text-muted); margin: 14px 0 0; font-weight: 600; }

.author-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.author-chips__item {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-full);
  color: var(--color-primary); background: rgba(200,16,46,.08);
}
.author-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.author-social__btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: 50%;
  color: #4B5563; background: var(--color-bg); text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}
.author-social__btn:hover { transform: translateY(-2px); color: #fff; border-color: transparent; }
.author-social__btn--email:hover    { background: var(--color-primary); }

.author-posts { margin-top: 36px; }
.author-posts__title { font-size: 20px; font-weight: 800; margin: 0 0 18px; color: var(--color-text); }

/* Small-screen: single column grid (<=860px from source = base) */
.author-posts__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

@media (min-width: 861px) { /* source breakpoint: 860px - maintain parity S.1 */
  .author-posts__grid { grid-template-columns: repeat(3, 1fr); }
}

.author-post-card {
  display: flex; flex-direction: column; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-12); overflow: hidden;
  text-decoration: none; transition: box-shadow var(--transition), transform var(--transition);
}
.author-post-card:hover { box-shadow: 0 8px 24px -10px rgba(16,24,40,.2); transform: translateY(-2px); }
.author-post-card__thumb { aspect-ratio: 16/9; background: #F3F4F6 center/cover no-repeat; }
.author-post-card__body { padding: 14px 16px 18px; }
.author-post-card__title { font-size: 15px; font-weight: 700; color: var(--color-text); line-height: 1.4; margin: 0; }
.author-post-card__meta { font-size: 12px; color: var(--color-text-muted); margin: 8px 0 0; }
.author-empty { color: var(--color-text-muted); }


/* Order lookup (ol-) */

.ol-page-wrap { padding-top: var(--space-8); padding-bottom: var(--space-16); }
.ol-bc { margin-bottom: 1.5rem; font-size: .8125rem; color: #6B7280; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; }
.ol-bc__link { color: #6B7280; text-decoration: none; }
.ol-bc__link:hover { color: var(--color-primary); }
.ol-bc__sep { margin: 0 .375rem; color: #6B7280; }
.ol-bc__current { color: #111827; }
.ol-error-icon { flex-shrink: 0; margin-top: 1px; }
.ol-hint { font-size: .75rem; color: #9CA3AF; margin: .25rem 0 0; }
.ol-btn-icon { display: inline-block; vertical-align: middle; margin-right: .375rem; }
.ol-divider { border: none; border-top: 1px solid #F3F4F6; margin: 1.5rem 0; }
.ol-code-label { font-size: .75rem; color: #6B7280; margin-bottom: .25rem; }
.ol-th-r { text-align: right; }
.ol-th-c { text-align: center; }
.ol-th-nowrap { white-space: nowrap; }
.ol-td-r { text-align: right; }
.ol-td-c { text-align: center; }
.ol-td-nowrap { white-space: nowrap; }
.ol-td-bold { font-weight: 500; }
.ol-item-name { font-weight: 500; }
.ol-item-opts { font-size: 12px; color: var(--color-text-muted); }
.ol-totals-wrap { margin-top: 1rem; }
.ol-total-row--discount { color: #059669; }
.ol-total-grand-amount { color: #C8102E; }
.ol-section-title--mt { margin-top: 1.5rem; }
.ol-support-box {
  margin-top: 1.5rem; padding: 1rem;
  background: #FEF2F2; border-radius: 8px; text-align: center;
}
.ol-support-title { margin: 0 0 .5rem; font-size: .875rem; color: #374151; }
.ol-support-btn {
  display: inline-flex; align-items: center; gap: .375rem;
  background: #C8102E; color: #fff;
  padding: .5rem 1.25rem; border-radius: 6px;
  font-weight: 700; font-size: .9375rem; text-decoration: none;
}
.ol-support-btn:hover { background: #a80e26; }

.ol-wrap { max-width: 640px; margin: 0 auto; }
.ol-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-12);
  /* Small-screen padding (<=640px from source = base) */
  padding: 1.25rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .ol-card { padding: 2rem; }
}

.ol-title { font-size: 1.375rem; font-weight: 700; color: #111827; margin: 0 0 .375rem; }
.ol-subtitle { font-size: var(--font-size-sm); color: var(--color-text-muted); margin: 0 0 1.5rem; }
.ol-form-row { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: 1.25rem; }
.ol-label { display: block; font-size: .8125rem; font-weight: 600; color: #374151; margin-bottom: .375rem; }
.ol-input {
  width: 100%;
  padding: .625rem .875rem;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--radius-8);
  font-size: .9375rem;
  color: #111827;
  background: #FAFAFA;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.ol-input:focus { outline: none; border-color: var(--color-primary); background: var(--color-bg); }
.ol-btn {
  width: 100%;
  padding: .75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-8);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.ol-btn:hover { background: #a80e26; }
.ol-error-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-8);
  padding: .875rem 1rem;
  color: #991B1B;
  font-size: var(--font-size-sm);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.ol-result { margin-top: 1.5rem; }
.ol-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.ol-code { font-size: 1.125rem; font-weight: 700; color: #111827; }
.ol-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  font-size: .8125rem;
  font-weight: 600;
}
.ol-status--new        { background: #EFF6FF; color: #1D4ED8; }
.ol-status--processing { background: #FEF3C7; color: #92400E; }
.ol-status--shipping   { background: #ECFDF5; color: #065F46; }
.ol-status--done       { background: #F0FDF4; color: #15803D; }
.ol-status--canceled   { background: #F9FAFB; color: var(--color-text-muted); }
.ol-status--refunded   { background: #FFF7ED; color: #C2410C; }
.ol-section-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  margin: 1.25rem 0 .625rem;
}
.ol-items-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.ol-items-table th {
  text-align: left;
  /* Small-screen padding (<=640px from source = base) */
  padding: .5rem .25rem;
  color: var(--color-text-muted);
  font-weight: 600;
  border-bottom: 1.5px solid #F3F4F6;
  font-size: .8125rem;
}
.ol-items-table td {
  /* Small-screen padding (<=640px from source = base) */
  padding: .5rem .25rem;
  color: #374151;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: top;
}
.ol-items-table tr:last-child td { border-bottom: none; }

@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .ol-items-table th { padding: .5rem .375rem; }
  .ol-items-table td { padding: .625rem .375rem; }
}

.ol-total-row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  font-size: var(--font-size-sm);
  color: #4B5563;
  border-top: 1px solid #F3F4F6;
}
.ol-total-row--grand {
  font-weight: 700;
  font-size: var(--font-size-base);
  color: #111827;
  border-top: 2px solid var(--color-border);
  padding-top: .75rem;
  margin-top: .25rem;
}
.ol-info-list { list-style: none; margin: 0; padding: 0; }
.ol-info-list li {
  display: flex;
  gap: .75rem;
  padding: .375rem 0;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid #F9FAFB;
}
.ol-info-list li:last-child { border-bottom: none; }
.ol-info-list .lbl { color: var(--color-text-muted); min-width: 120px; flex-shrink: 0; }
.ol-info-list .val { color: #111827; font-weight: 500; word-break: break-word; }


/* 404 body (e404-) */

/* Small-screen (<=640px from source = base for mobile) */
.e404 {
  background: var(--color-bg-warm);
  position: relative;
  overflow: hidden;
  padding: 40px 14px 48px;
}
.e404__imprint {
  position: absolute; top: 30px; right: -60px; opacity: .07;
  pointer-events: none; line-height: 0;
}
.e404__inner {
  max-width: 760px; margin: 0 auto; padding: 0; text-align: center; position: relative;
}

/* Hero */
.e404__hero { display: inline-flex; align-items: center; gap: 4px; line-height: 1; margin-bottom: 8px; }
.e404__digit { font-size: 120px; font-weight: 800; color: var(--color-text); letter-spacing: -5px; }
.e404__stamp { transform: rotate(-6deg); line-height: 0; }
.e404__stamp svg { display: block; filter: drop-shadow(0 4px 12px rgba(200,16,46,.2)); }
.e404__stamp svg { width: 120px; height: 120px; }

/* Text */
.e404__title { font-size: 22px; font-weight: 800; color: var(--color-text); letter-spacing: -.5px; margin-top: 16px; line-height: 1.2; }
/* Mobile: hide long desc, show short */
.e404__msg { display: none; }
.e404__msg-short {
  display: block; font-size: 13px; color: var(--color-text-muted); line-height: 1.55; margin-top: 8px;
}

/* Search */
.e404__search {
  margin: 20px auto 0; max-width: 480px; display: flex; align-items: center;
  height: 44px; padding: 0 4px 0 12px; border: 2px solid var(--color-primary);
  border-radius: 10px; background: var(--color-bg);
}
.e404__search input {
  flex: 1; min-width: 0; border: none; outline: none; font-size: 13px;
  padding: 0 10px; background: transparent; font-family: inherit; color: var(--color-text);
}
.e404__search .btn { flex-shrink: 0; }

/* CTA - mobile: btn 1 full-width, row2 side-by-side */
.e404__actions {
  margin-top: 16px; display: flex; gap: 8px;
  flex-direction: column; align-items: stretch;
}
.e404__actions-row2 { display: flex; gap: 8px; }
.e404__actions-row2 .btn { flex: 1; }
.e404__actions > .btn { width: 100%; }

/* Quick link chips */
.e404__links { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.e404__links-label { font-size: 11px; font-weight: 700; color: var(--color-text-muted); letter-spacing: 1.2px; margin-bottom: 10px; }
.e404__chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.e404__chip {
  padding: 6px 12px; background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); font-size: 12px; color: var(--color-text); font-weight: 600;
  transition: border-color var(--transition), color var(--transition);
}
.e404__chip:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Tablet (641px-1023px) - restore larger layout */
@media (min-width: 641px) { /* source breakpoint: 640px - maintain parity S.1 */
  .e404 { padding: 80px 0 96px; }
  .e404__imprint { right: -120px; opacity: .05; }
  .e404__inner { padding: 0 24px; }

  .e404__hero { gap: 8px; margin-bottom: 12px; }
  .e404__digit { font-size: 200px; letter-spacing: -8px; }
  .e404__stamp svg { width: 200px; height: 200px; }

  .e404__title { font-size: 32px; letter-spacing: -.7px; margin-top: 24px; }
  /* Desktop-style desc */
  .e404__msg { display: block; font-size: 16px; color: var(--color-text-muted); line-height: 1.6; max-width: 520px; margin: 12px auto 0; }
  .e404__msg-short { display: none; }

  .e404__search { height: 52px; padding: 0 6px 0 18px; margin-top: 28px; }
  .e404__search input { font-size: 14px; padding: 0 12px; }

  .e404__actions {
    margin-top: 20px; flex-direction: row; align-items: initial; gap: 10px;
    justify-content: center; flex-wrap: wrap;
  }
  .e404__actions-row2 { display: contents; }
  .e404__actions-row2 .btn { flex: initial; }
  .e404__actions > .btn { width: auto; }

  .e404__links { margin-top: 36px; padding-top: 24px; }
  .e404__links-label { font-size: 12px; margin-bottom: 12px; }
  .e404__chips { gap: 8px; }
  .e404__chip { padding: 8px 14px; font-size: 13px; }
}
