

/* =========================================================
   WAAZAI ORCHARD｜全站手機版基礎修復
   目標：先止血，避免手機爆版、橫向捲動、雙欄硬塞、按鈕太小
   ========================================================= */

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

input,
select,
textarea,
button {
  font: inherit;
}

@media (max-width: 1080px) {
  .container,
  .section-shell,
  .proof-section,
  .buy-section,
  .story-panel,
  .quick-panel,
  .basket-layout,
  .checkout-layout,
  .shop-grid,
  .products-grid,
  .diary-grid,
  .about-grid {
    width: min(100% - 40px, 1180px) !important;
  }

  .hero,
  .shop-hero,
  .basket-hero,
  .checkout-hero,
  .diary-hero,
  .about-hero,
  .buy-section,
  .story-panel,
  .basket-layout,
  .checkout-layout,
  .shop-grid,
  .products-grid,
  .diary-grid,
  .about-grid,
  .proof-section {
    grid-template-columns: 1fr !important;
  }

  .section-copy,
  .summary-card,
  .checkout-summary,
  .basket-summary,
  .sticky-card,
  .side-card {
    position: relative !important;
    top: auto !important;
  }
}

@media (max-width: 820px) {
  .top-bar {
    width: min(100% - 24px, 1180px) !important;
    top: 10px !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 26px !important;
  }

  .brand-mark {
    width: 100% !important;
    justify-content: center !important;
    min-height: 40px !important;
    font-size: 15px !important;
    letter-spacing: 0.10em !important;
  }

  .brand-mark::before {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 auto !important;
  }

  .top-bar nav {
    width: 100% !important;
    min-width: 0 !important;
  }

  .nav-list {
    justify-self: stretch !important;
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 8px !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x proximity !important;
  }

  .nav-list::-webkit-scrollbar {
    height: 0 !important;
  }

  .nav-list li {
    flex: 0 0 auto !important;
    scroll-snap-align: start !important;
  }

  .nav-list a {
    min-height: 40px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
  }

  .nav-action,
  .btn-primary,
  .btn-secondary,
  .advisor-button,
  .add-btn,
  .sales-link,
  .planning-link,
  .upload-button,
  .btn.btn-primary {
    width: 100% !important;
    min-height: 48px !important;
  }

  .hero-shell,
  .shop-hero,
  .basket-hero,
  .checkout-hero,
  .diary-hero,
  .about-hero {
    width: min(100% - 20px, 1280px) !important;
    min-height: auto !important;
    border-radius: 30px !important;
    padding: 30px 20px !important;
  }

  .hero {
    min-height: auto !important;
    padding: 30px 20px !important;
    grid-template-columns: 1fr !important;
  }

  .hero-title,
  .shop-title,
  .basket-title,
  .checkout-title,
  .diary-title,
  .about-title {
    font-size: clamp(32px, 9vw, 54px) !important;
    line-height: 1.18 !important;
  }

  .title-line,
  .hero-title .title-line,
  .shop-title .title-line,
  .basket-title .title-line,
  .checkout-title .title-line,
  .diary-title .title-line,
  .about-title .title-line,
  .section-copy h2 .title-line,
  .story-card h2 .title-line {
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
  }

  .hero-lead,
  .shop-lead,
  .basket-lead,
  .checkout-lead,
  .diary-lead,
  .about-lead {
    font-size: 15px !important;
    line-height: 1.9 !important;
  }

  .hero-actions,
  .filter-list,
  .hero-pills {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .trust-row,
  .proof-section,
  .sales-grid,
  .flow-steps,
  .summary-grid,
  .form-grid,
  .field-grid,
  .contact-grid,
  .gift-grid,
  .cart-grid,
  .basket-items,
  .checkout-form-grid {
    grid-template-columns: 1fr !important;
  }

  .sales-card,
  .cart-item,
  .basket-item,
  .checkout-item,
  .product-card,
  .diary-card,
  .about-card {
    grid-template-columns: 1fr !important;
  }

  .sales-card img,
  .product-card img,
  .diary-card img,
  .about-card img {
    width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
    object-fit: cover !important;
  }
}

@media (max-width: 640px) {
  .container,
  .section-shell,
  .proof-section,
  .buy-section,
  .story-panel,
  .quick-panel,
  .basket-layout,
  .checkout-layout,
  .shop-grid,
  .products-grid,
  .diary-grid,
  .about-grid {
    width: min(100% - 28px, 1180px) !important;
  }

  .top-bar {
    width: min(100% - 16px, 1180px) !important;
    margin-top: 8px !important;
    padding: 10px !important;
    border-radius: 24px !important;
  }

  .brand-mark {
    justify-content: flex-start !important;
    padding-inline: 4px !important;
  }

  .nav-action {
    min-height: 46px !important;
    font-size: 13px !important;
  }

  .hero-shell,
  .shop-hero,
  .basket-hero,
  .checkout-hero,
  .diary-hero,
  .about-hero {
    width: min(100% - 14px, 1280px) !important;
    margin-top: 12px !important;
    padding: 26px 16px !important;
    border-radius: 26px !important;
  }

  .hero {
    padding: 26px 16px !important;
    gap: 24px !important;
  }

  .hero-shell::after,
  .shop-hero::before,
  .basket-hero::before,
  .checkout-hero::before,
  .diary-hero::before,
  .about-hero::before,
  .section-copy::after,
  .flow-card::after,
  .hero-card::after {
    opacity: 0.55 !important;
    transform: scale(0.76) !important;
    transform-origin: right bottom !important;
  }

  .eyebrow,
  .summary-label,
  .planning-card small {
    width: 100% !important;
    white-space: normal !important;
    line-height: 1.5 !important;
    letter-spacing: 0.14em !important;
  }

  .eyebrow::before {
    width: 28px !important;
    flex: 0 0 auto !important;
  }

  .hero-title,
  .shop-title,
  .basket-title,
  .checkout-title,
  .diary-title,
  .about-title {
    font-size: clamp(30px, 10vw, 44px) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
  }

  .hero-card,
  .flow-card,
  .origin-card,
  .planning-card,
  .summary-card,
  .proof-card,
  .section-copy,
  .story-card,
  .sales-card,
  .product-card,
  .diary-card,
  .about-card,
  .basket-item,
  .checkout-item {
    border-radius: 26px 26px 8px 26px !important;
    transform: none !important;
  }

  .proof-card,
  .section-copy,
  .story-card,
  .sales-card,
  .product-card,
  .diary-card,
  .about-card,
  .planning-card,
  .summary-card {
    padding: 22px !important;
  }

  .hero-card img {
    height: min(74vw, 320px) !important;
  }

  .hero-card-info {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hero-card-info b,
  .sales-card h3,
  .floating-note b,
  .trust-chip b {
    white-space: normal !important;
  }

  .floating-note {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    margin-top: 14px !important;
    transform: none !important;
  }

  .marquee-track span {
    padding: 13px 20px !important;
    font-size: 11px !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important;
  }

  textarea {
    min-height: 120px !important;
  }

  label,
  .field-label {
    line-height: 1.55 !important;
  }

  .footer {
    padding: 24px 0 30px !important;
    text-align: center !important;
    line-height: 1.7 !important;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    font-size: 14px !important;
  }

  .nav-list a {
    min-height: 38px !important;
    padding-inline: 12px !important;
    font-size: 12px !important;
  }

  .hero-title,
  .shop-title,
  .basket-title,
  .checkout-title,
  .diary-title,
  .about-title {
    font-size: clamp(28px, 10.5vw, 40px) !important;
  }

  .proof-card,
  .section-copy,
  .story-card,
  .sales-card,
  .product-card,
  .diary-card,
  .about-card,
  .planning-card,
  .summary-card {
    padding: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
