
/* ===== Mobile: unlock the fixed AI wrapper so the page can flow ===== */
@media (max-width: 768px) {
  .ai-home-wrap {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    z-index: 1;
    display: block !important;
  }
  /* Tighten the space above the chat: kill "Home" title + theme paddings */
  .ta-mobile-title-hidden, .entry-header { display: none !important; }
  h1.entry-title { display: none !important; }
  .site-content .col-full, .site-content .content-area,
  #content .col-full, .site-main,
  .entry-content, article.page, .page .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .site-content { padding-top: 4px !important; }
  .ai-home-wrap .content { padding: 2px 16px 4px !important; }
  .ai-home-wrap .content h1 {
    margin: 0 0 4px !important;
    font-size: clamp(20px, 5.4vw, 30px) !important;
  }
  .ai-home-wrap .content p.lead { margin: 0 0 10px !important; font-size: 13px !important; }
  .ai-home-wrap .mwai-chatbot-container { margin-top: 0 !important; }

  /* ===== Mobile carousel ===== */
  .ta-hp { padding: 26px 0 34px; }
  .ta-hp-head {
    display: flex; align-items: baseline; gap: 8px; padding: 0 20px 14px;
  }
  .ta-hp-head h3 { margin: 0; font-size: 19px; font-weight: 800; color: #1c1c1c; letter-spacing: -.2px; }
  .ta-hp-head span { font-size: 12px; color: #999; font-weight: 600; }
  .ta-hp-scroll {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 20px 10px;
  }
  .ta-hp-scroll::-webkit-scrollbar { display: none; }
  .ta-hp-card {
    flex: 0 0 150px; scroll-snap-align: start; background: #fff;
    border: 1px solid rgba(0,0,0,.06); border-radius: 16px; overflow: hidden;
    text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.05);
    transition: transform .2s, box-shadow .2s;
  }
  .ta-hp-card:active { transform: scale(.97); }
  .ta-hp-card img { display: block; width: 100%; height: 105px; object-fit: cover; background: #f5f5f5; }
  .ta-hp-info { padding: 10px 12px 12px; }
  .ta-hp-name {
    font-size: 13px; font-weight: 600; color: #1c1c1c; line-height: 1.35; height: 35px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0 0 6px;
  }
  .ta-hp-price { font-size: 14px; font-weight: 700; color: #00aa6c; }
  .ta-hp-price del { font-size: 11px; color: #aaa; font-weight: 500; margin-right: 4px; }

  /* desktop section hidden on mobile */
  .ta-dp { display: none !important; }
}

/* ===== Desktop: unlock the fixed wrapper so content flows below the chat ===== */
@media (min-width: 769px) {
  .ai-home-wrap {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }
  .ai-home-wrap img.bg,
  .ai-home-wrap .overlay { display: none !important; }
  .ai-home-wrap .content {
    padding: 48px 20px 28px !important;
    min-height: auto !important;
  }
  .ai-home-wrap .content h1 { color: #1c1c1c !important; text-shadow: none !important; }
  .ai-home-wrap .content p.lead { color: #555 !important; text-shadow: none !important; }
  /* clean desktop page: no "Home" title, no fallback menu dump */
  h1.entry-title, .entry-header { display: none !important; }
  .main-navigation div.menu { display: none !important; }

  /* ===== Desktop: 3 recommendation sections under the AI chat ===== */
  .ta-dp {
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 24px 56px;
  }
  .ta-dp-sec { margin-bottom: 34px; }
  .ta-dp-head {
    display: flex; align-items: baseline; justify-content: space-between;
    padding-bottom: 14px; border-bottom: 2px solid #f0f0f0; margin-bottom: 18px;
  }
  .ta-dp-head h3 {
    margin: 0; font-size: 22px; font-weight: 800; color: #1c1c1c; letter-spacing: -.3px;
    display: flex; align-items: center; gap: 10px;
  }
  .ta-dp-head h3 i {
    display: inline-block; width: 5px; height: 22px; border-radius: 3px;
    background: linear-gradient(180deg, #e8451c, #b93210);
  }
  .ta-dp-head a.ta-dp-more {
    font-size: 13px; font-weight: 600; color: #00aa6c; text-decoration: none;
  }
  .ta-dp-head a.ta-dp-more:hover { text-decoration: underline; }
  .ta-dp-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  }
  .ta-dp-card {
    background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 16px;
    overflow: hidden; text-decoration: none; display: block;
    box-shadow: 0 4px 18px rgba(0,0,0,.05);
    transition: transform .22s, box-shadow .22s;
  }
  .ta-dp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,.12);
  }
  .ta-dp-card img {
    display: block; width: 100%; height: 172px; object-fit: cover; background: #f5f5f5;
    transition: transform .35s;
  }
  .ta-dp-card:hover img { transform: scale(1.04); }
  .ta-dp-info { padding: 14px 16px 16px; }
  .ta-dp-name {
    font-size: 15px; font-weight: 600; color: #1c1c1c; line-height: 1.4; height: 42px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    margin: 0 0 8px;
  }
  .ta-dp-price { font-size: 17px; font-weight: 700; color: #00aa6c; }
  .ta-dp-price del { font-size: 13px; color: #aaa; font-weight: 500; margin-right: 4px; }
  .ta-dp-price ins { text-decoration: none; }

  /* mobile carousel hidden on desktop */
  .ta-hp { display: none !important; }
}
    