/* Site header (non-hero pages) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--beige-dark);
  padding: 0.75rem 0;
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.site-header__logo {
  flex-shrink: 1;
  min-width: 0;
}

.site-header__logo img {
  height: 56px;
  width: auto;
  max-width: 140px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.site-header__nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.site-header__menu { display: flex; gap: 1.8rem; }
.site-header__menu a { font-size: 0.88rem; color: var(--text-light); }
.site-header__menu a:hover { color: var(--brown); }
.site-header__actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.site-header__icon-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--brown);
}
.site-header__icon-btn:hover { background: var(--beige); }
.site-header__cart-btn { position: relative; }
.site-header__wishlist-btn { position: relative; }
.site-header__cart-count {
  position: absolute; top: 4px; left: 4px; width: 18px; height: 18px;
  background: var(--gold); color: #fff; font-size: 0.65rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.site-header__wishlist-count {
  position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--gold); color: #fff; font-size: 0.65rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.site-header__discounts {
  display: none;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.site-header__discounts:hover { background: var(--gold-dark); color: var(--white); }
@media (min-width: 901px) {
  .site-header__discounts { display: inline-flex; }
}
.site-header__hamburger { display: none; flex-direction: column; gap: 5px; width: 28px; }
.site-header__hamburger span { height: 1.5px; background: var(--brown); display: block; }

.page-home .site-header { display: none; }

/* Back navigation */
.back-bar {
  padding: 0.65rem 1.25rem 0;
  background: transparent;
  border: none;
}

.back-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: none;
  background: transparent;
  color: var(--brown);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.back-bar__btn:hover {
  background: var(--beige);
  color: var(--brown);
}

.back-bar__btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.back-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-bar__icon .icon {
  transform: scaleX(-1);
}

@media (min-width: 901px) {
  .back-bar {
    padding: 0.75rem 2rem 0;
  }

  .back-bar__btn {
    font-size: 0.92rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (max-width: 900px) {
  .back-bar__label {
    font-size: 0.88rem;
  }
}

/* Flash messages */
.flash-messages { padding-top: 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.9rem; }
.flash--success { background: #e8f5e9; color: #2e7d32; }
.flash--danger { background: #ffebee; color: #c62828; }
.flash--warning { background: #fff8e1; color: #f57f17; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.product-detail__image img { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 12px 40px var(--shadow-md); }
.product-detail__title { font-family: var(--font-en); font-size: 2rem; color: var(--brown); margin: 0.5rem 0; }
.product-detail__price { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.product-detail__desc { color: var(--text-light); margin: 0; line-height: 1.8; }
.product-detail__desc-block { margin-bottom: 1.25rem; }
.product-detail__desc-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown);
}

.product-detail__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem;
}

.product-detail__image { position: relative; }
.product-detail__thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.product-detail__thumb { border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; cursor: pointer; }
.product-detail__thumb.is-active { border-color: var(--gold, #c9a962); }
.product-detail__thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.product-detail__sale-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: #c0392b; color: #fff; font-size: 0.8rem; font-weight: 600;
  padding: 0.4rem 0.85rem; border-radius: 20px;
}
.product-detail__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.5rem; }
.product-detail__toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
.product-detail__toggle-icon { display: inline-block; transition: transform 0.35s ease; font-size: 0.75rem; }
.product-detail__toggle[aria-expanded="true"] .product-detail__toggle-icon { transform: rotate(180deg); }

.product-detail__stock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.product-detail__stock--in {
  background: #e8f5e9;
  color: #2e7d32;
}

.product-detail__stock--out {
  background: #fdecea;
  color: #c0392b;
}

.product-detail__stock-icon {
  display: inline-flex;
  flex-shrink: 0;
}

.product-detail__purchase {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.product-detail__add-btn {
  flex: 1;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

.product-detail__qty {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 48px;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.product-detail__qty-btn {
  width: 38px;
  height: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--brown);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.product-detail__qty-btn:hover:not(:disabled) {
  background: var(--beige);
}

.product-detail__qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.product-detail__qty-value {
  min-width: 1.75rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown);
}

.product-detail__wishlist {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--beige-dark);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.product-detail__wishlist:hover {
  border-color: #e8b4b4;
  color: #c0392b;
}

.product-detail__wishlist.is-active {
  background: #fdecea;
  border-color: #f0c4c4;
  color: #c0392b;
}

.product-detail__wishlist.is-active .product-detail__wishlist-icon {
  color: #c0392b;
  fill: rgba(192, 57, 43, 0.12);
}

.product-detail__wishlist-icon {
  display: inline-flex;
  color: var(--text-light);
  transition: color var(--transition);
}

.page-product__related {
  margin-top: 3.5rem;
  padding-bottom: 1rem;
}

.product-detail__accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  opacity: 0;
  margin-top: 0;
}

.product-detail__accordion.is-open {
  opacity: 1;
  margin-top: 1.25rem;
}

.product-detail__accordion-inner {
  background: var(--white);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--beige-dark);
  box-shadow: 0 8px 28px var(--shadow);
}

/* Imported HTML: hide sticky footer chrome, keep text in normal flow */
.product-detail__accordion-inner footer.q-footer,
.product-detail__accordion-inner footer.footer,
.product-detail__accordion-inner .q-footer.fixed-bottom {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  display: inline !important;
  font: inherit !important;
  color: inherit !important;
}

.product-detail__accordion-inner .q-layout,
.product-detail__accordion-inner .q-layout__section--marginal {
  position: static !important;
  min-height: 0 !important;
}

@media (min-width: 901px) {
  .page-product .product-detail {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
    align-items: start;
  }

  .page-product__main .product-detail__accordion.is-open {
    margin-top: 2rem;
  }

  .product-detail__accordion-inner {
    padding: 2rem 2.5rem;
    font-size: 1rem;
    line-height: 1.95;
  }

  .product-detail__accordion-inner :where(p, li) {
    font-size: 1rem;
    line-height: 1.95;
  }

  .product-detail__accordion-inner :where(img, video, iframe) {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
  }
}

/* Product pricing */
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
.product-card__body .product-price {
  min-height: 3.25rem;
  margin-bottom: 0.75rem;
  align-content: flex-start;
}
.product-price--detail { margin-bottom: 1rem; }
.product-price__old { font-size: 0.95rem; color: var(--text-light); text-decoration: line-through; }
.product-price__current { font-size: 1.1rem; font-weight: 600; color: var(--brown); }
.product-price--detail .product-price__current { font-size: 1.35rem; color: #c0392b; }
.product-price__badge {
  font-size: 0.72rem; font-weight: 600; background: #fdecea; color: #c0392b;
  padding: 0.2rem 0.55rem; border-radius: 12px;
}
.product-card__badge--sale { background: #c0392b; top: auto; bottom: 1rem; }

/* Checkout */
.checkout__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.checkout__form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; }
.checkout__form input, .checkout__form textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.75rem; border: 1px solid var(--beige-dark);
  border-radius: var(--radius); font-family: inherit;
}
.checkout__summary { background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: 0 4px 24px var(--shadow); }
.checkout__item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--beige); font-size: 0.9rem; }
.checkout__total { display: flex; justify-content: space-between; margin-top: 1rem; font-size: 1.05rem; }

/* Cart page */
.cart-page__item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--beige); }
.cart-page__footer { margin-top: 2rem; display: flex; justify-content: space-between; align-items: center; }
.qty-btn { width: 32px; height: 32px; border: 1px solid var(--beige-dark); border-radius: var(--radius); background: var(--white); }

/* Auth */
.auth-box { max-width: 420px; margin: 0 auto; background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: 0 8px 32px var(--shadow); }
.auth-box label { display: block; margin-bottom: 1rem; }
.auth-box input, .auth-box textarea { width: 100%; padding: 0.75rem; margin-top: 0.3rem; border: 1px solid var(--beige-dark); border-radius: var(--radius); font-family: inherit; }
.auth-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 1rem; text-align: center; }

/* Advisor products */
.advisor__products { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.advisor-product-card { background: rgba(255,255,255,0.1); padding: 0.75rem; border-radius: var(--radius); text-align: center; color: #fff; max-width: 120px; }
.advisor-product-card img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); margin-bottom: 0.5rem; }

.cart-panel__checkout { width: 100%; margin-top: 0.75rem; text-align: center; }

.content-page,
.content-page__body,
.page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.content-page__body { line-height: 1.9; color: var(--text-light); overflow-wrap: anywhere; word-break: break-word; }
.content-page__body h3 { color: var(--brown); margin: 1.5rem 0 0.5rem; }
.content-page__body :where(img, video, iframe, svg) {
  max-width: 100%;
  height: auto;
}
.content-page__body :where(table, pre) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.content-page__body :where(p, li, h1, h2, h3, h4, blockquote) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-card { display: flex; gap: 1.5rem; padding: 1rem; background: var(--white); margin-bottom: 0.75rem; border-radius: var(--radius); box-shadow: 0 2px 12px var(--shadow); }

.checkout__form--verify { background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: 0 4px 24px var(--shadow); }
.checkout-resend-form { margin-top: 1rem; }

/* Card-to-card payment */
.checkout-payment { background: var(--white); padding: 2rem; border-radius: var(--radius-lg); box-shadow: 0 4px 24px var(--shadow); }
.checkout-payment__header { margin-bottom: 1.5rem; }
.checkout-payment__lead { color: var(--text-light); line-height: 1.8; margin-top: 0.5rem; font-size: 0.92rem; }
.checkout-payment__card-box {
  background: linear-gradient(135deg, var(--brown) 0%, #3d2a22 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 32px rgba(61, 42, 34, 0.25);
}
.checkout-payment__bank { font-size: 0.85rem; opacity: 0.85; margin-bottom: 0.35rem; }
.checkout-payment__holder { font-size: 0.9rem; margin-bottom: 1rem; }
.checkout-payment__card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.checkout-payment__card-number {
  font-family: var(--font-en);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.checkout-payment__copy { color: var(--brown); background: var(--white); border-color: transparent; }
.checkout-payment__amount { font-size: 1.05rem; margin-bottom: 0.35rem; }
.checkout-payment__amount strong { color: var(--gold); }
.checkout-payment__hint { font-size: 0.82rem; opacity: 0.8; margin: 0; }
.checkout-payment__form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; }
.checkout-payment__form input[type="file"],
.checkout-payment__form textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.75rem; border: 1px solid var(--beige-dark);
  border-radius: var(--radius); font-family: inherit;
}
.checkout-payment__upload input[type="file"] { padding: 0.55rem; background: var(--cream); }
.checkout-payment__preview-wrap { margin-bottom: 1rem; }
.checkout-payment__preview-label { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.35rem; }
.checkout-payment__preview { max-width: 220px; border-radius: var(--radius); border: 1px solid var(--beige-dark); display: block; }
.checkout-payment__submit { width: 100%; margin-top: 0.5rem; }
.checkout__summary--payment .checkout-payment__steps {
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--beige);
  font-size: 0.85rem; color: var(--text-light); line-height: 1.9;
}
.page-success__note { max-width: 32rem; margin: 1rem auto 1.5rem; color: var(--text-light); line-height: 1.8; }

.order-tracking-banner {
  background: linear-gradient(135deg, #3d2b1f 0%, #5a4034 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 32px rgba(61, 42, 34, 0.2);
}
.order-tracking-banner__title { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--gold, #c4a265); }
.order-tracking-banner__text { margin: 0 0 1rem; font-size: 0.92rem; line-height: 1.7; opacity: 0.95; }
.order-tracking-banner__row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: stretch; }
.order-tracking-banner__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.85rem;
}
.order-tracking-banner__hint { margin: 0.75rem 0 0; font-size: 0.85rem; color: #c8e6c9; }
.page-order-view .order-view__header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.page-order-view .order-view__title {
  margin-bottom: 1.125rem;
}

.page-order-view .order-view__ref-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.page-order-view .order-view__ref {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #fff9f0 0%, #fff3e0 100%);
  border: 1px solid rgba(201, 161, 91, 0.35);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(201, 161, 91, 0.12);
  animation: order-ref-pulse 2.8s ease-in-out infinite;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-order-view .order-view__ref:hover {
  border-color: rgba(201, 161, 91, 0.55);
  box-shadow: 0 6px 24px rgba(201, 161, 91, 0.18);
}

.page-order-view .order-view__ref:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.page-order-view .order-view__ref.is-copied {
  border-color: rgba(76, 175, 80, 0.45);
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}

.page-order-view .order-view__ref-copy-icon {
  position: absolute;
  top: 0.45rem;
  inset-inline-start: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: rgba(168, 124, 61, 0.45);
  pointer-events: none;
}

.page-order-view .order-view__ref-copy-icon .icon {
  width: 12px;
  height: 12px;
  display: block;
}

.page-order-view .order-view__ref-hint {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5a8f4e;
}

.page-order-view .order-view__ref-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
}

.page-order-view .order-view__ref-code {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brown);
  letter-spacing: 0.06em;
  animation: order-ref-shimmer 2.8s ease-in-out infinite;
}

@keyframes order-ref-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(201, 161, 91, 0.12);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 28px rgba(201, 161, 91, 0.22);
    transform: scale(1.02);
  }
}

@keyframes order-ref-shimmer {
  0%, 100% { color: var(--brown); }
  50% { color: #a67c3d; }
}

@media (prefers-reduced-motion: reduce) {
  .page-order-view .order-view__ref,
  .page-order-view .order-view__ref-code {
    animation: none;
  }
}

.page-order-view .order-view__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.order-address-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.order-address-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35rem;
  direction: rtl;
  text-align: right;
}

.order-address-row dt {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  width: auto;
  text-align: right;
  margin: 0;
}

.order-address-row dd {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.65;
  text-align: right;
}

.order-address-row__value--phone {
  text-align: right;
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline;
}

.page-order-view {
  --order-view-section-pad: 1.25rem;
}

.page-order-view .account-order-detail.order-view__grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

.page-order-view .order-view__card.account-detail-card {
  padding: var(--order-view-section-pad);
  text-align: right;
}

.page-order-view .order-view__section-title {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.01em;
  text-align: right;
}

.page-order-view .order-view__section-body {
  width: 100%;
  text-align: right;
}

.page-order-view .account-detail-card h2 {
  font-size: 1.0625rem;
  margin-bottom: 0.85rem;
}

.page-order-view .account-detail-card--address {
  padding-top: var(--order-view-section-pad);
}

.page-order-view .account-detail-card > p {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  text-align: right;
}

.page-order-view .order-address-list {
  text-align: right;
}

.page-order-view .account-order-items {
  margin: 0;
  padding: 0;
  text-align: right;
}

.page-order-view .account-order-items li {
  text-align: right;
}

.page-order-view .account-detail-card > p:last-child {
  margin-bottom: 0;
}

.page-order-view .order-status-banner {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  text-align: center;
}

.page-order-view .order-status-banner__text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.7;
  color: #3e2723;
}

.page-order-view .order-status-banner--payment_submitted,
.page-order-view .order-status-banner--pending_payment {
  background: #ffcc80;
  border: 1px solid #ffb74d;
}

.page-order-view .order-status-banner--payment_submitted .order-status-banner__text,
.page-order-view .order-status-banner--pending_payment .order-status-banner__text {
  color: #4e342e;
}

.page-order-view .order-status-banner--paid,
.page-order-view .order-status-banner--shipped,
.page-order-view .order-status-banner--delivered {
  background: #a5d6a7;
  border: 1px solid #81c784;
}

.page-order-view .order-status-banner--paid .order-status-banner__text,
.page-order-view .order-status-banner--shipped .order-status-banner__text,
.page-order-view .order-status-banner--delivered .order-status-banner__text {
  color: #1b5e20;
}

.page-order-view .order-status-banner--cancelled,
.page-order-view .order-status-banner--failed {
  background: #ef9a9a;
  border: 1px solid #e57373;
}

.page-order-view .order-status-banner--cancelled .order-status-banner__text,
.page-order-view .order-status-banner--failed .order-status-banner__text {
  color: #b71c1c;
}

/* Account panel */
.account-section { padding-top: 2rem; padding-bottom: 3rem; }
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
.account-sidebar { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 4px 24px var(--shadow); padding: 1.5rem; position: sticky; top: 1.5rem; }
.account-sidebar__user { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--beige); }
.account-sidebar__label { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.35rem; }
.account-sidebar__user strong { display: block; color: var(--brown); margin-bottom: 0.2rem; }
.account-sidebar__user span { font-size: 0.85rem; color: var(--text-light); direction: ltr; display: inline-block; }
.account-nav { display: flex; flex-direction: column; gap: 0.35rem; }
.account-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.account-nav__link:hover {
  background: var(--cream);
  color: var(--brown);
}
.account-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(196, 162, 101, 0.14);
  color: var(--gold-dark);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.account-nav__icon .icon { display: block; }
.account-nav__text { line-height: 1.3; }
.account-nav__link:hover .account-nav__icon {
  background: rgba(196, 162, 101, 0.22);
  color: var(--brown);
  box-shadow: 0 2px 8px rgba(196, 162, 101, 0.18);
}
.account-nav__link.is-active {
  background: rgba(196, 162, 101, 0.14);
  color: var(--brown);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(196, 162, 101, 0.35);
}
.account-nav__link.is-active:hover {
  background: rgba(196, 162, 101, 0.2);
  color: var(--brown);
}
.account-nav__link.is-active .account-nav__icon {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--white);
  box-shadow: 0 2px 10px rgba(196, 162, 101, 0.32);
}
.account-nav__link--logout {
  color: #c62828;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--beige);
}
.account-nav__link--logout .account-nav__icon {
  background: rgba(198, 40, 40, 0.1);
  color: #c62828;
}
.account-nav__link--logout:hover {
  background: #ffebee;
  color: #b71c1c;
}
.account-nav__link--logout:hover .account-nav__icon {
  background: rgba(198, 40, 40, 0.16);
  color: #b71c1c;
  box-shadow: none;
}
.account-content { background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 4px 24px var(--shadow); padding: 2rem; min-height: 420px; }
.account-title { font-size: 1.5rem; color: var(--brown); margin-bottom: 1.5rem; }
.account-subtitle { font-size: 1.05rem; color: var(--brown); margin: 2rem 0 1rem; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.account-stat { background: var(--cream); padding: 1.25rem; border-radius: var(--radius); text-align: center; }
.account-stat span { display: block; font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.4rem; }
.account-stat strong { font-size: 1.1rem; color: var(--brown); }
.account-orders-list { display: flex; flex-direction: column; gap: 0.65rem; }
.account-orders-list--cards { gap: 1rem; }
.account-hint {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: -0.75rem 0 1.25rem;
  line-height: 1.6;
}
.account-order-card {
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.account-order-card:hover {
  border-color: var(--beige-dark);
  box-shadow: 0 4px 20px var(--shadow);
}
.account-order-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--beige);
}
.account-order-card__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}
.account-order-card__ref {
  display: block;
  font-size: 0.95rem;
  color: var(--brown);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.account-order-card__date {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.account-order-card__items {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.account-order-card__item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.85rem;
}
.account-order-card__thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--beige);
}
.account-order-card__item-name {
  color: var(--text);
  line-height: 1.35;
}
.account-order-card__item-price {
  color: var(--brown);
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.82rem;
}
.account-order-card__more {
  font-size: 0.8rem;
  color: var(--text-light);
  padding-right: 0.25rem;
}
.account-order-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.account-order-card__totals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
}
.account-order-card__total {
  font-size: 1rem;
  color: var(--brown);
}
.account-order-card__btn { flex-shrink: 0; }

.account-order-view__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.account-order-view__ref-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
}
.account-order-view__ref {
  font-size: 1.1rem;
  color: var(--brown);
}
.account-order-view .order-status-banner {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--beige);
  background: var(--cream);
}
.account-order-view .order-status-banner__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}
.account-order-view .order-status-banner--payment_submitted,
.account-order-view .order-status-banner--pending_payment {
  background: #fff8e1;
  border-color: #ffe082;
}
.account-order-view .order-status-banner--paid,
.account-order-view .order-status-banner--shipped,
.account-order-view .order-status-banner--delivered {
  background: #e8f5e9;
  border-color: #a5d6a7;
}
.account-order-view .order-status-banner--cancelled,
.account-order-view .order-status-banner--failed {
  background: #ffebee;
  border-color: #ef9a9a;
}
.account-order-view__grid { margin-bottom: 1.25rem; }
.account-order-facts { margin: 0; }
.account-order-facts__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(237, 230, 218, 0.7);
  font-size: 0.88rem;
}
.account-order-facts__row:last-child { border-bottom: none; }
.account-order-facts__row dt {
  color: var(--text-light);
  font-weight: 500;
}
.account-order-facts__row dd {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}
.account-order-cart-card { margin-top: 0.5rem; }
.account-order-cart-card__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--brown);
}
.account-order-cart {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-order-cart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--beige);
}
.account-order-cart__row:last-child { border-bottom: none; }
.account-order-cart__product {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}
.account-order-cart__thumb-link { flex-shrink: 0; }
.account-order-cart__thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--beige);
}
.account-order-cart__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.account-order-cart__name {
  color: var(--brown);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.35;
}
a.account-order-cart__name:hover { color: var(--gold-dark); }
.account-order-cart__unit {
  font-size: 0.8rem;
  color: var(--text-light);
}
.account-order-cart__line-total {
  font-size: 0.9rem;
  color: var(--brown);
  white-space: nowrap;
}
.account-order-cart__empty {
  padding: 1rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
}
.account-order-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--beige-dark);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.account-order-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-light);
}
.account-order-summary__row--discount { color: #2e7d32; }
.account-order-summary__row--total {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--beige);
  font-size: 0.95rem;
  color: var(--brown);
}
.account-order-summary__row--total strong {
  font-size: 1.1rem;
  color: #c0392b;
}
.account-order-view__actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--beige);
}

.account-order-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; background: var(--cream); border-radius: var(--radius); color: var(--text); font-size: 0.88rem; transition: transform var(--transition), box-shadow var(--transition); }
.account-order-row:hover { transform: translateY(-2px); box-shadow: 0 4px 16px var(--shadow); }
.account-form label { display: block; margin-bottom: 1rem; font-size: 0.9rem; }
.account-form input, .account-form textarea {
  width: 100%;
  max-width: 480px;
  margin-top: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  font-family: inherit;
}
.account-form--profile {
  max-width: 720px;
}
.account-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 1.5rem;
}
.account-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
}
.account-form__field--full {
  grid-column: 1 / -1;
}
.account-form__label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--brown);
}
.account-form--profile input,
.account-form--profile textarea {
  width: 100%;
  max-width: none;
  margin-top: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.account-form--profile input::placeholder,
.account-form--profile textarea::placeholder {
  color: var(--text-light);
  opacity: 0.75;
}
.account-form--profile input:focus,
.account-form--profile textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 162, 101, 0.16);
}
.account-form--profile input:disabled {
  background: var(--cream);
  color: var(--text-light);
  cursor: not-allowed;
}
.account-form--profile textarea {
  resize: vertical;
  min-height: 6.5rem;
  line-height: 1.6;
}
.account-form__input--ltr {
  direction: ltr;
  text-align: left;
}
.account-form__actions {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--beige);
}
.account-detail-card { background: var(--cream); padding: 1.25rem; border-radius: var(--radius); }
.account-detail-card h2 { font-size: 0.95rem; color: var(--brown); margin-bottom: 0.75rem; }
.account-order-detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.account-order-items { list-style: none; }
.account-order-items li { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--beige); font-size: 0.9rem; }
.account-empty, .account-link, .account-back { font-size: 0.9rem; color: var(--text-light); }
.account-link { color: var(--gold-dark); }
.order-status { display: inline-block; font-size: 0.8rem; padding: 0.25rem 0.6rem; border-radius: 20px; background: var(--beige); }
.order-status--paid, .order-status--delivered { background: #e8f5e9; color: #2e7d32; }
.order-status--pending { background: #fff8e1; color: #f57f17; }
.order-status--pending_payment,
.order-status--payment_submitted { background: #fff3e0; color: #e65100; }
.order-status--failed, .order-status--cancelled { background: #ffebee; color: #c62828; }
.order-status--shipped { background: #e3f2fd; color: #1565c0; }

@media (max-width: 900px) {
  .site-header__menu--desktop {
    display: none !important;
  }

  .site-header__hamburger {
    display: flex;
    z-index: 3001;
    position: relative;
  }

  .site-header__inner {
    gap: 0.5rem;
  }

  .site-header__logo img {
    max-height: 48px;
    max-width: min(112px, 30vw);
  }

  .site-header__actions {
    gap: 0.15rem;
  }

  .site-header__icon-btn {
    width: 36px;
    height: 36px;
  }

  .product-detail, .checkout__grid { grid-template-columns: 1fr; }

  .page-product.section {
    padding-top: 0;
  }

  .page-product__main.container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .page-product .product-detail {
    gap: 0;
  }

  .product-detail__image {
    margin-bottom: 0.25rem;
  }

  .product-detail__image img {
    border-radius: 0;
    box-shadow: none;
  }

  .product-detail__info {
    padding: 1rem 1rem 0;
  }

  .product-detail__title {
    font-size: 1.15rem;
    line-height: 1.45;
    margin-top: 0.35rem;
  }

  .product-price--detail .product-price__current {
    font-size: 1.2rem;
  }

  .product-detail__purchase {
    gap: 0.5rem;
  }

  .product-detail__add-btn {
    font-size: 0.9rem;
  }

  .product-detail__qty-btn {
    width: 34px;
    min-height: 46px;
  }

  .product-detail__qty {
    min-height: 46px;
  }

  .page-product__main .product-detail__accordion {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .page-product__related.container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; padding: 1rem; }
  .account-sidebar__user {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .account-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
  }
  .account-nav__link {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.55rem 0.2rem;
    text-align: center;
    border-radius: var(--radius);
  }
  .account-nav__link:not(:first-child) {
    border-inline-start: 1px solid var(--beige);
  }
  .account-nav__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .account-nav__icon .icon {
    width: 16px;
    height: 16px;
  }
  .account-nav__text {
    font-size: 0.68rem;
    line-height: 1.3;
    max-width: 100%;
  }
  .account-nav__link--logout {
    margin-top: 0;
    padding-top: 0.55rem;
    border-top: none;
  }
  .account-nav__link.is-active {
    background: rgba(196, 162, 101, 0.1);
    box-shadow: inset 0 -2px 0 var(--gold);
  }
  .account-form__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .account-stats { grid-template-columns: 1fr; }
  .account-order-card__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .account-order-card__btn { width: 100%; text-align: center; }
  .account-order-card__item {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
  }
  .account-order-card__item-price {
    grid-column: 2;
    justify-self: start;
  }
  .account-order-facts__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .account-order-cart__row {
    flex-direction: column;
    align-items: stretch;
  }
  .account-order-cart__line-total {
    align-self: flex-end;
  }
  .account-order-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .account-order-detail { grid-template-columns: 1fr; }
}
