/* ========================================
   TechPara Mobile App Style (mall-app-web 复刻)
   ======================================== */

/* --- Design Tokens --- */
:root {
  --app-primary: #fa436a;
  --app-primary-light: #ff6b8a;
  --app-bg: #f5f5f5;
  --app-card: #ffffff;
  --app-text: #303133;
  --app-text-regular: #606266;
  --app-text-secondary: #909399;
  --app-text-placeholder: #C0C4CC;
  --app-border: #e4e7ed;
  --app-tabbar-height: 50px;
  --app-header-height: 44px;
  --app-radius: 8px;
  --app-radius-lg: 12px;
  --app-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --app-shadow-sm: 0 1px 4px rgba(0,0,0,0.04);
}

/* --- Reset & Base --- */
.app-body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app-body a {
  color: inherit;
  text-decoration: none;
}

/* --- App Shell --- */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--app-bg);
  position: relative;
  padding-bottom: var(--app-tabbar-height);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--app-primary);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header--simple {
  background: #fff;
  border-bottom: 1px solid var(--app-border);
}

.app-header-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.app-header--simple .app-header-back {
  color: var(--app-text);
}

.app-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex: 1;
  text-align: center;
  margin-right: 32px;
}

.app-header--simple .app-header-title {
  color: var(--app-text);
  text-align: left;
  margin-right: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-share {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--app-text);
  flex-shrink: 0;
}

.app-header-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 6px 12px;
  gap: 8px;
}

.app-header-search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--app-text);
}

.app-header-search input::placeholder {
  color: var(--app-text-placeholder);
}

.app-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.app-header-action {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Main Content --- */
.app-content {
  padding: 0;
}

/* --- TabBar --- */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border-top: 1px solid var(--app-border);
  display: flex;
  height: var(--app-tabbar-height);
}

.app-tabbar-inner {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  height: 100%;
}

.app-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--app-text-placeholder);
  font-size: 10px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: color 0.2s;
}

.app-tab.is-active {
  color: var(--app-primary);
}

.app-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-tab-icon img {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
}

.app-tab-label {
  font-size: 10px;
  line-height: 1;
}

/* --- Home Page --- */

/* Search overlay on carousel */
.app-home-search {
  background: var(--app-primary);
  padding: 8px 12px;
}

.app-home-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-home-search-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
}

.app-home-search-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  background: rgba(255,255,255,0.95);
  border-radius: 17px;
  padding: 0 14px;
  flex: 1;
}

.app-home-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-home-search form {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.app-home-search-input {
  width: 100px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 13px;
  color: var(--app-text);
  line-height: 1;
  padding: 0;
  margin: 0;
  height: 100%;
  min-height: 0;
  -webkit-appearance: none;
  appearance: none;
}

.app-home-search-input:focus {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.app-home-search-input::placeholder {
  color: var(--app-text-placeholder);
}

.app-home-search-placeholder {
  font-size: 13px;
  color: var(--app-text-placeholder);
}

/* Section header (mall-app-web f-header style) */
.app-home-fheader {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 3px 16px 4px;
  background: #fff;
  cursor: pointer;
}

.app-home-fheader img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.app-home-fheader-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-home-fheader-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.3;
}

.app-home-fheader-sub {
  font-size: 12px;
  color: var(--app-text-secondary);
  line-height: 1.3;
  margin-top: 1px;
}

.app-home-fheader-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Home promo banner */
.app-home-promo-banner {
  display: block;
  padding: 0 14px;
  margin-top: 8px;
}

.app-home-promo-banner img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

.app-carousel {
  position: relative;
  padding: 0 14px;
  margin-top: 10px;
}

.app-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 10px;
  overflow: hidden;
}

.app-carousel-track::-webkit-scrollbar {
  display: none;
}

.app-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
}

.app-carousel-slide a {
  display: block;
}

.app-carousel-slide img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
  max-width: 100%;
  border-radius: 10px;
}

.app-carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 3px 10px;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.app-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.app-carousel-dot.is-active {
  background: #fff;
  width: 16px;
  border-radius: 3px;
}

/* --- Category Icons (Home) --- */
.app-cate-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px;
  background: #fff;
  margin: 8px 16px;
  border-radius: var(--app-radius);
}

.app-cate-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--app-text);
}

.app-cate-icon-item img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 2px 2px 10px rgba(250, 67, 106, 0.25);
}

/* --- Section Header --- */
.app-section-header {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 3px 16px 4px;
  background: #fff;
  cursor: pointer;
}

.app-section-header img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

.app-section-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-section-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.3;
}

.app-section-header-sub {
  font-size: 12px;
  color: var(--app-text-secondary);
  line-height: 1.3;
  margin-top: 1px;
}

.app-section-header-arrow {
  font-size: 18px;
  color: var(--app-text-placeholder);
}

/* --- Product Grid (2 columns) --- */
.app-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
  background: #fff;
}

.app-product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-width: 0;
}

.app-product-image {
  width: 100%;
  padding-top: 100%;
  position: relative;
  border-radius: var(--app-radius);
  overflow: hidden;
  background: #f8f8f8;
}

.app-product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 100%;
  max-height: 100%;
}

.app-product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--app-text);
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-product-sub {
  font-size: 12px;
  color: var(--app-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.app-product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--app-primary);
  margin-top: 4px;
  text-align: right;
}

/* --- Hot Section (人气推荐 left-right) --- */
.app-hot-section {
  background: #fff;
  padding: 0 16px 16px;
}

.app-hot-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--app-border);
  cursor: pointer;
  min-width: 0;
}

.app-hot-item:last-child {
  border-bottom: none;
}

.app-hot-image {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--app-radius);
}

.app-hot-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-hot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.app-hot-info .app-product-name {
  margin-top: 0;
}

.app-hot-info .app-product-sub {
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

/* --- Horizontal Product Card (人气推荐) --- */
.app-product-row-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  cursor: pointer;
  min-width: 0;
}

.app-product-row-card .app-product-image {
  width: 100px;
  height: 100px;
  padding-top: 0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.app-product-row-card .app-product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-product-row-card .app-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.app-product-row-card .app-product-name {
  margin-top: 0;
}

/* --- Brand Grid (Home) --- */
.app-brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 16px;
  background: #fff;
}

.app-brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  cursor: pointer;
}

.app-brand-card {
  min-width: 0;
}

.app-brand-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  max-width: 100%;
}

.app-brand-name {
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

.app-brand-count {
  font-size: 11px;
  color: var(--app-text-secondary);
}

/* --- Flash Section (Home) --- */
.app-flash-section {
  background: #fff;
  padding: 0 16px 16px;
}

.app-flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.app-flash-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-flash-header-left img {
  width: 20px;
  height: 20px;
}

.app-flash-title {
  font-size: 16px;
  font-weight: 600;
}

.app-flash-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--app-text-secondary);
}

.app-flash-timer-num {
  display: inline-block;
  width: 24px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: #303133;
  color: #fff;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
}

.app-flash-colon {
  color: var(--app-text-secondary);
  font-weight: 600;
}

/* --- Load More --- */
.app-load-more {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--app-text-secondary);
}

/* --- Sort Bar --- */
.app-sortbar {
  display: flex;
  border-bottom: 1px solid var(--app-border);
  background: #fff;
}

.app-sort-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 13px;
  color: var(--app-text-regular);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  gap: 2px;
}

.app-sort-item.is-active {
  color: var(--app-primary);
  font-weight: 600;
}

.app-sort-item.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--app-primary);
  border-radius: 1px;
}

.app-sort-arrows {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  font-size: 7px;
  gap: 0;
}

.app-sort-arrow {
  line-height: 1;
  color: var(--app-text-placeholder);
}

.app-sort-arrow.active {
  color: var(--app-primary);
}

.app-sort-arrow.up {
  margin-bottom: -1px;
}

/* --- Category Page (左右分栏) --- */
.app-category-layout {
  display: flex;
  height: calc(100vh - var(--app-tabbar-height) - var(--app-header-height));
  background: #fff;
}

.app-category-side {
  width: 90px;
  flex-shrink: 0;
  background: var(--app-bg);
  overflow-y: auto;
}

.app-category-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 13px;
  color: var(--app-text-regular);
  cursor: pointer;
  border-left: 3px solid transparent;
}

.app-category-item.is-active {
  background: #fff;
  color: var(--app-primary);
  border-left-color: var(--app-primary);
  font-weight: 600;
}

.app-category-main {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px;
}

/* --- Cart Page --- */
.app-cart-page {
  min-height: calc(100vh - var(--app-tabbar-height));
}

.app-cart-items {
  padding: 8px 0;
}

.app-cart-item {
  display: flex;
  position: relative;
  overflow: hidden;
  border-radius: var(--app-radius);
  margin: 8px 0;
}

.app-cart-item-wrap {
  width: 100%;
  transition: transform 0.2s ease;
  background: #fff;
  border-radius: var(--app-radius);
  position: relative;
  z-index: 1;
}

.app-cart-item-inner {
  display: flex;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--app-border);
}

.app-cart-item-del {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fa436a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 var(--app-radius) var(--app-radius) 0;
}

.app-cart-item-image {
  width: 115px;
  height: 115px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.app-cart-item-image > a {
  display: block;
  width: 100%;
  height: 100%;
}

.app-cart-item-image > a img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-cart-checkbox {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 8;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-cart-checkbox svg {
  width: 18px;
  height: 18px;
}

.app-cart-checkbox .app-cb-checked {
  display: none;
  color: var(--app-primary);
}

.app-cart-checkbox .app-cb-unchecked {
  display: block;
  color: #c0c4cc;
}

.app-cart-checkbox.is-checked .app-cb-checked {
  display: block;
}

.app-cart-checkbox.is-checked .app-cb-unchecked {
  display: none;
}

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

.app-cart-item-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-cart-item-detail {
  font-size: 12px;
  color: var(--app-text-secondary);
  margin-top: 2px;
}

.app-cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.app-cart-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--app-primary);
}

.app-cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--app-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #fff;
  cursor: pointer;
  color: var(--app-text);
}

.app-cart-qty-num {
  width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

/* --- Cart Bottom Bar --- */
.app-cart-bottom {
  position: sticky;
  bottom: var(--app-tabbar-height);
  background: rgba(255,255,255,0.9);
  border-top: 1px solid var(--app-border);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.app-cart-bottom-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-cart-bottom-check {
  width: 24px;
  height: 24px;
}

.app-cart-total-label {
  font-size: 13px;
  color: var(--app-text-secondary);
}

.app-cart-total-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--app-primary);
  margin-right: 12px;
}

.app-cart-checkout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 1px 2px 5px rgba(217, 60, 93, 0.72);
}

.app-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.app-btn-primary:hover {
  opacity: 0.9;
}

.app-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.app-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #fff;
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

/* --- Empty State --- */
.app-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
}

.app-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.app-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--app-text);
}

.app-empty-desc {
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 4px;
}

.app-empty-action {
  margin-top: 16px;
}

/* --- Product Detail --- */
.app-detail {
  background: #fff;
  padding-bottom: 76px;
}

.app-detail-carousel {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.app-detail-carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.app-detail-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.app-detail-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.app-detail-carousel-dot.is-active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}

.app-detail-body {
  padding: 16px;
}

.app-detail-kicker {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--app-text-secondary);
  margin-bottom: 8px;
}

.app-detail-kicker span {
  background: var(--app-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.app-detail-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.app-detail-spec {
  font-size: 13px;
  color: var(--app-text-regular);
  margin-top: 8px;
}

.app-detail-price-box {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--app-border);
}

.app-detail-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--app-primary);
}

.app-detail-price-label {
  font-size: 12px;
  color: var(--app-text-secondary);
}

.app-detail-points {
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 4px;
  text-align: right;
}

.app-detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--app-border);
  margin-top: 8px;
}

.app-detail-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-detail-spec-label {
  font-size: 12px;
  color: var(--app-text-secondary);
}

.app-detail-spec-value {
  font-size: 14px;
  font-weight: 500;
}

/* --- Detail Bottom Bar --- */
/* --- Product Detail Bottom Bar --- */
.app-detail-bottom {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  height: 50px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.12);
  z-index: 250;
}

.app-detail-bottom-left {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.app-detail-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  height: 100%;
  font-size: 9px;
  color: var(--app-text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.app-detail-icon-btn svg {
  width: 20px;
  height: 20px;
}

.app-detail-icon-btn span {
  line-height: 1;
}

.app-detail-icon-btn.is-active {
  color: var(--app-primary);
}

.app-detail-action-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}

.app-detail-buy-btn {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: #ff6b35;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.app-detail-cart-btn {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.app-detail-bto-btn {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: #303133;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* --- Detail Info Sections --- */
.app-detail-section {
  margin: 8px 16px;
  padding: 16px;
  background: #fff;
  border-radius: var(--app-radius);
}

.app-detail-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.app-detail-section-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-detail-section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.app-detail-section-row-label {
  font-size: 13px;
  color: var(--app-text-secondary);
}

.app-detail-section-row-value {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

/* --- Checkout Page --- */
.app-checkout {
  padding: 8px 16px;
}

.app-checkout-card {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 12px;
  margin-bottom: 6px;
}

.app-checkout-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-checkout-card-title-icon {
  width: 20px;
  height: 20px;
}

.app-checkout-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.app-checkout-item-name {
  font-size: 14px;
  color: var(--app-text);
}

.app-checkout-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--app-text);
}

.app-checkout-form label {
  display: block;
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 12px;
}

.app-checkout-form input,
.app-checkout-form select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--app-text);
  margin-top: 4px;
  outline: none;
  box-sizing: border-box;
}

.app-checkout-form input:focus,
.app-checkout-form select:focus {
  border-color: var(--app-primary);
}

/* Payment Method Card */
.app-payment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  margin-top: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.app-payment-card.is-selected {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 1px rgba(250, 67, 106, 0.08);
}

.app-payment-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--app-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.app-payment-card-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.app-payment-card-icon svg {
  width: 28px;
  height: 28px;
}

.app-payment-card-info {
  flex: 1;
}

.app-payment-card-info strong {
  font-size: 15px;
  display: block;
  color: var(--app-text);
}

.app-payment-card-info small {
  font-size: 12px;
  color: var(--app-text-secondary);
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

/* Checkout Summary */
.app-checkout-summary {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 12px;
  margin-bottom: 6px;
}

.app-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13px;
}

.app-summary-row.is-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--app-primary);
  border-top: 1px solid var(--app-border);
  padding-top: 6px;
  margin-top: 8px;
}

/* Checkout Bottom */
.app-checkout-bottom {
  position: sticky;
  bottom: 0;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--app-border);
}

.app-place-order-btn {
  width: 100%;
  padding: 14px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Order Complete --- */
.app-order-complete {
  padding: 32px 16px;
  text-align: center;
}

.app-order-complete-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.app-order-complete-title {
  font-size: 16px;
  font-weight: 600;
}

.app-order-complete-desc {
  font-size: 14px;
  color: var(--app-text-secondary);
  margin-top: 8px;
}

.app-order-complete-number {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--app-bg);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.app-order-complete-detail {
  margin-top: 24px;
  text-align: left;
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
}

/* --- Order Detail Status Section --- */


.app-order-checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* --- Favorites / My Page --- */
.app-mypage-header {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.app-mypage-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.app-mypage-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1px);
  opacity: 0.7;
}

.app-mypage-user {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 50px 16px 0;
}

.app-mypage-avatar {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.app-mypage-name {
  font-size: 19px;
  font-weight: 600;
  color: var(--app-text);
}

.app-mypage-email {
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 2px;
}

/* My Page Stats */
.app-mypage-stats {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-radius: 10px;
  margin: -40px 16px 8px;
  padding: 16px 0;
  position: relative;
  z-index: 2;
}

.app-mypage-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.app-mypage-stat-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--app-text);
}

.app-mypage-stat-label {
  font-size: 12px;
  color: var(--app-text-secondary);
}

/* My Page Orders */
.app-mypage-orders {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-radius: 10px;
  margin: 0 16px 8px;
  padding: 20px 0;
}

.app-mypage-order-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--app-text-regular);
  cursor: pointer;
  text-decoration: none;
}

.app-mypage-menu {
  padding: 8px 16px;
}

.app-mypage-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: #fff;
  border-radius: var(--app-radius);
  margin-bottom: 2px;
  cursor: pointer;
}

.app-mypage-menu-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.app-mypage-menu-label {
  flex: 1;
  font-size: 14px;
}

.app-mypage-menu-arrow {
  font-size: 14px;
  color: var(--app-text-placeholder);
}

/* --- Login Page --- */
.app-login {
  padding: 32px 16px;
  min-height: calc(100vh - var(--app-tabbar-height));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-login-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--app-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin-bottom: 16px;
}

.app-login-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.app-login-sub {
  font-size: 14px;
  color: var(--app-text-secondary);
  margin-bottom: 32px;
}

.app-login-form {
  width: 100%;
  max-width: 360px;
}

.app-login-form label {
  display: block;
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 16px;
}

.app-login-form input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
  outline: none;
  box-sizing: border-box;
}

.app-login-form input:focus {
  border-color: var(--app-primary);
}

.app-login-btn {
  width: 100%;
  padding: 14px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
}

.app-login-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--app-text-secondary);
  text-align: center;
}

.app-login-footer a {
  color: var(--app-primary);
}

/* --- Info Page (guide, faq, privacy, etc) --- */
.app-info-hero {
  background: #fff;
  padding: 24px 16px;
}

.app-info-hero-title {
  font-size: 20px;
  font-weight: 700;
}

.app-info-hero-desc {
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 8px;
}

.app-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 16px;
}

.app-info-card {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
  text-align: center;
}

.app-info-card-title {
  font-size: 14px;
  font-weight: 600;
}

.app-info-card-desc {
  font-size: 12px;
  color: var(--app-text-secondary);
  margin-top: 4px;
}

.app-info-section {
  padding: 16px;
}

.app-info-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.app-info-section-body {
  font-size: 14px;
  color: var(--app-text-regular);
  line-height: 1.7;
}

.app-info-section ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.app-info-section li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--app-text-regular);
}

.app-info-section li::before {
  content: '・';
  color: var(--app-primary);
}

/* --- BTO Page --- */
.app-bto {
  padding: 16px;
}

.app-bto-base {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.app-bto-base-label {
  font-size: 12px;
  color: var(--app-text-secondary);
}

.app-bto-base-name {
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

.app-bto-base-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--app-primary);
  margin-top: 4px;
}

.app-bto-group {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
  margin-bottom: 8px;
}

.app-bto-group-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-bto-group-step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--app-primary);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-bto-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--app-border);
  cursor: pointer;
}

.app-bto-option:first-child {
  border-top: none;
}

.app-bto-option input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--app-border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.app-bto-option input[type="radio"]:checked {
  border-color: var(--app-primary);
}

.app-bto-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--app-primary);
  border-radius: 50%;
}

.app-bto-option-info {
  flex: 1;
}

.app-bto-option-name {
  font-size: 14px;
  font-weight: 500;
}

.app-bto-option-meta {
  font-size: 12px;
  color: var(--app-text-secondary);
  margin-top: 2px;
}

/* --- Contact Page --- */
.app-contact {
  padding: 16px;
}

.app-contact-card {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
  margin-bottom: 8px;
}

.app-contact-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.app-contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-contact-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.app-contact-info-label {
  color: var(--app-text-secondary);
}

.app-contact-info-value {
  font-weight: 500;
}

.app-contact-form label {
  display: block;
  font-size: 13px;
  color: var(--app-text-secondary);
  margin-top: 12px;
}

.app-contact-form input,
.app-contact-form select,
.app-contact-form textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  font-size: 14px;
  margin-top: 4px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.app-contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.app-contact-form input:focus,
.app-contact-form select:focus,
.app-contact-form textarea:focus {
  border-color: var(--app-primary);
}

.app-contact-submit {
  width: 100%;
  padding: 14px;
  background: var(--app-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

/* --- Corporate Page --- */
.app-corporate-hero {
  background: linear-gradient(135deg, #303133 0%, #606266 100%);
  padding: 32px 16px;
  color: #fff;
}

.app-corporate-hero-title {
  font-size: 22px;
  font-weight: 700;
}

.app-corporate-hero-desc {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 8px;
  line-height: 1.6;
}

.app-corporate-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.app-corporate-btn {
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.app-corporate-btn-primary {
  background: var(--app-primary);
  color: #fff;
}

.app-corporate-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.app-corporate-section {
  padding: 16px;
}

.app-corporate-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.app-corporate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.app-corporate-card {
  background: #fff;
  border-radius: var(--app-radius);
  padding: 16px;
  text-align: center;
}

.app-corporate-card-title {
  font-size: 15px;
  font-weight: 600;
}

.app-corporate-card-desc {
  font-size: 12px;
  color: var(--app-text-secondary);
  margin-top: 4px;
}

/* --- Loading Overlay --- */
.app-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

.app-loading-overlay.is-visible {
  display: flex;
}

.app-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: app-spin 0.6s linear infinite;
}

@keyframes app-spin {
  to { transform: rotate(360deg); }
}

/* --- Global image containment --- */
.app-body img {
  max-width: 100%;
  height: auto;
}

.app-body a img {
  max-width: 100%;
  height: auto;
}

/* --- Utility --- */
.app-mt-8 { margin-top: 8px; }
.app-mt-12 { margin-top: 12px; }
.app-mt-16 { margin-top: 16px; }
.app-mb-8 { margin-bottom: 8px; }
.app-p-16 { padding: 16px; }

.app-text-center { text-align: center; }
.app-flex { display: flex; }
.app-flex-center { align-items: center; }
.app-gap-8 { gap: 8px; }
.app-gap-12 { gap: 12px; }

/* --- Responsive Desktop --- */
@media (min-width: 768px) {
  .app-shell {
    border-left: 1px solid var(--app-border);
    border-right: 1px solid var(--app-border);
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    min-height: 100vh;
  }

  .app-tabbar {
    display: flex;
    justify-content: center;
  }
}

/* --- Toast --- */
.app-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 24px;
  white-space: nowrap;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.app-toast.is-visible {
  opacity: 1;
}

/* --- Hide desktop header/footer in app mode --- */
.app-body .dp-header,
.app-body .dp-footer,
.app-body .dp-category-nav,
.app-body .dp-back-to-top {
  display: none !important;
}
