/* =========================================
   BHUIYAN ENTERPRISE JAPAN — Main Stylesheet
   ========================================= */
:root {
  --blue: #0d3b8c;
  --blue-dark: #082a66;
  --blue-light: #e8eefa;
  --red: #d7263d;
  --ink: #111418;
  --text: #3a4150;
  --muted: #6b7385;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(13, 30, 70, .08);
  --shadow-lg: 0 20px 50px rgba(13, 30, 70, .16);
  --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13,59,140,.3); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--blue-light); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #c9cfdb; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 54px; width: auto; }
.logo-text { font-weight: 800; font-size: 1.15rem; color: var(--ink); line-height: 1.1; letter-spacing: .3px; }
.logo-text span { color: var(--blue); }
.logo-text small { display: block; font-size: .62rem; font-weight: 500; color: var(--muted); letter-spacing: 2px; }
.logo.has-img .logo-text { display: none; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-weight: 500; color: var(--ink); position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--blue); transition: .25s; }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero Slider ---------- */
.slider { position: relative; height: 620px; overflow: hidden; background: var(--ink); }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .9s ease, visibility .9s;
  display: flex; align-items: center;
}
.slide.active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.08); transition: transform 6s ease; }
.slide.active .slide-bg { transform: scale(1); }
.slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,20,48,.92) 0%, rgba(8,20,48,.65) 45%, rgba(8,20,48,.1) 100%); }
.slide-art { position: absolute; right: 4%; bottom: 8%; width: 46%; max-width: 620px; opacity: .95; pointer-events: none; }
.slide-content { position: relative; z-index: 2; color: #fff; max-width: 600px; }
.slide-tag { display: inline-block; background: var(--red); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.slide h1, .slide h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.12; font-weight: 800; margin-bottom: 18px; }
.slide h1 span, .slide h2 span { color: #7fa8ff; }
.slide p { font-size: 1.08rem; color: #d3dbea; margin-bottom: 30px; max-width: 520px; }
.slide-content > * { opacity: 0; transform: translateY(24px); transition: .7s ease; }
.slide.active .slide-content > * { opacity: 1; transform: none; }
.slide.active .slide-content > *:nth-child(2) { transition-delay: .15s; }
.slide.active .slide-content > *:nth-child(3) { transition-delay: .3s; }
.slide.active .slide-content > *:nth-child(4) { transition-delay: .45s; }
.slide-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08); color: #fff; font-size: 1.3rem; cursor: pointer; transition: .25s;
}
.slider-arrow:hover { background: #fff; color: var(--ink); }
.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }
.slider-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 5; }
.slider-dots button { width: 12px; height: 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: .3s; }
.slider-dots button.active { width: 34px; background: #fff; }

/* ---------- Feature strip ---------- */
.features { margin-top: -50px; position: relative; z-index: 6; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.feature { display: flex; gap: 14px; align-items: center; padding: 26px 22px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature-icon { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; }
.feature h4 { color: var(--ink); font-size: .98rem; }
.feature p { font-size: .82rem; color: var(--muted); }

/* ---------- Section ---------- */
.section { padding: 90px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow { color: var(--blue); font-weight: 600; font-size: .82rem; letter-spacing: 2px; text-transform: uppercase; display: block; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); color: var(--ink); line-height: 1.2; margin-bottom: 14px; }
.section-head p { color: var(--muted); }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Owner message ---------- */
.owner-grid { display: grid; grid-template-columns: 420px 1fr; gap: 70px; align-items: center; }
.owner-photo { position: relative; }
.owner-photo .frame {
  position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/5;
  background: linear-gradient(145deg, var(--blue) 0%, var(--blue-dark) 100%);
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.owner-photo .frame img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.owner-placeholder { color: rgba(255,255,255,.8); text-align: center; font-size: .9rem; }
.owner-placeholder svg { margin: 0 auto 10px; opacity: .7; }
.owner-photo::before { content: ""; position: absolute; top: -18px; left: -18px; width: 120px; height: 120px; border: 3px solid var(--blue); border-radius: 20px; z-index: -1; }
.owner-badge { position: absolute; right: -24px; bottom: 30px; background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-lg); }
.owner-badge strong { display: block; font-size: 1.8rem; color: var(--blue); line-height: 1; }
.owner-badge span { font-size: .8rem; color: var(--muted); }
.owner-text blockquote { font-size: 1.12rem; color: var(--text); border-left: 4px solid var(--blue); padding-left: 22px; margin: 24px 0; font-style: italic; }
.owner-text p { margin-bottom: 16px; }
.owner-sign { margin-top: 28px; display: flex; align-items: center; gap: 16px; }
.owner-sign .name { font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.owner-sign .role { color: var(--muted); font-size: .88rem; }
.signature { font-family: "Brush Script MT", cursive; font-size: 2.2rem; color: var(--blue); margin-left: auto; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #fff;
  border: 1px solid var(--line); padding: 30px 24px; transition: .3s; display: block;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-card .cat-icon { width: 70px; height: 70px; border-radius: 18px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; margin-bottom: 20px; transition: .3s; }
.cat-card:hover .cat-icon { background: var(--blue); color: #fff; }
.cat-card h3 { color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }
.cat-card p { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.cat-card .cat-link { color: var(--blue); font-weight: 600; font-size: .88rem; }

/* ---------- Product grid & cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: .3s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); border-color: transparent; }
.product-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(145deg, #eef2f9, #dfe6f3); overflow: hidden; }
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-media .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa8c4; }
.badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: .72rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .6px; }
.badge-new { background: var(--blue); color: #fff; }
.badge-recon { background: #f59f00; color: #fff; }
.badge-used { background: #495057; color: #fff; }
.product-cat { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.92); color: var(--ink); font-size: .72rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.product-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1rem; color: var(--ink); margin-bottom: 6px; line-height: 1.35; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.product-meta span::before { content: "•"; color: var(--blue); margin-right: 5px; }
.product-price { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-label { font-size: .78rem; color: var(--muted); line-height: 1.2; }
.price-label strong { display: block; color: var(--blue); font-size: .95rem; }
.btn-quote { padding: 9px 16px; font-size: .84rem; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { background: #fff; border-radius: var(--radius); padding: 30px 24px; position: relative; border: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 18px; right: 22px; font-size: 2.6rem; font-weight: 800; color: var(--blue-light); line-height: 1; }
.step-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--blue); color: #fff; display: grid; place-items: center; margin-bottom: 18px; }
.step h4 { color: var(--ink); margin-bottom: 8px; }
.step p { font-size: .88rem; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff;
  border-radius: 22px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.07); }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 8px; }
.cta p { color: #cfdbf5; }
.cta .btns { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Page banner (shop) ---------- */
.page-banner { background: linear-gradient(120deg, #081430, var(--blue)); color: #fff; padding: 70px 0 60px; }
.page-banner h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 8px; }
.breadcrumb { color: #b7c6e6; font-size: .9rem; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Shop layout ---------- */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 36px; align-items: start; }
.sidebar { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.filter-group { margin-bottom: 26px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 { color: var(--ink); font-size: .95rem; margin-bottom: 12px; }
.filter-list { list-style: none; display: grid; gap: 4px; }
.filter-list a {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  color: var(--text); display: flex; justify-content: space-between; gap: 8px; transition: .2s;
}
.filter-list a:hover { background: var(--bg-soft); }
.filter-list a.active { background: var(--blue); color: #fff; }
.filter-list .count { font-size: .8rem; opacity: .7; }
.search-box { position: relative; }
.search-box input { width: 100%; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 10px; outline: none; transition: .2s; }
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.sidebar-help { background: var(--blue-light); border-radius: 12px; padding: 18px; font-size: .88rem; }
.sidebar-help strong { color: var(--ink); display: block; margin-bottom: 4px; }

.shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.result-count { color: var(--muted); font-size: .92rem; }
.result-count strong { color: var(--ink); }
.toolbar-right { display: flex; gap: 10px; align-items: center; }
.select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; outline: none; }
.filter-toggle { display: none; }
.shop-layout .product-grid { grid-template-columns: repeat(3, 1fr); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(8,14,30,.65); backdrop-filter: blur(3px); animation: fade .25s; }
.modal-box {
  position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 620px;
  max-height: 92vh; overflow-y: auto; animation: pop .3s ease;
}
.modal-head { padding: 24px 28px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.modal-head h3 { color: var(--ink); font-size: 1.3rem; }
.modal-head p { color: var(--muted); font-size: .88rem; }
.modal-close { background: var(--bg-soft); border: 0; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; flex-shrink: 0; }
.modal-close:hover { background: var(--line); }
.modal-product { display: flex; gap: 14px; align-items: center; background: var(--bg-soft); margin: 20px 28px 0; padding: 12px; border-radius: 12px; }
.modal-product .thumb { width: 64px; height: 64px; border-radius: 10px; background: #dfe6f3; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; color: #9aa8c4; }
.modal-product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-product strong { color: var(--ink); display: block; font-size: .95rem; }
.modal-product span { font-size: .8rem; color: var(--muted); }
.modal-body { padding: 22px 28px 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.form-group label .req { color: var(--red); }
.form-group input, .form-group select, .form-group textarea {
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; transition: .2s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-note { font-size: .8rem; color: var(--muted); margin: 14px 0; }
.form-success { text-align: center; padding: 40px 28px; display: none; }
.form-success .check { width: 72px; height: 72px; border-radius: 50%; background: #e6f7ed; color: #1f9d55; display: grid; place-items: center; margin: 0 auto 18px; }
.form-success h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- Footer ---------- */
.footer { background: #0a0f1c; color: #9aa3b8; padding: 70px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 50px; }
.footer h4 { color: #fff; margin-bottom: 18px; font-size: 1rem; }
.footer .logo-text { color: #fff; margin-bottom: 14px; }
.footer p { font-size: .9rem; }
.footer ul { list-style: none; display: grid; gap: 10px; font-size: .9rem; }
.footer a:hover { color: #fff; }
.contact-item { display: flex; gap: 10px; align-items: start; font-size: .9rem; margin-bottom: 12px; }
.contact-item svg { flex-shrink: 0; margin-top: 3px; color: #7fa8ff; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.07); display: grid; place-items: center; transition: .25s; }
.socials a:hover { background: var(--blue); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; font-size: .84rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Floating WhatsApp ---------- */
.float-wa { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(37,211,102,.45); transition: .25s; }
.float-wa:hover { transform: scale(1.08); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-layout .product-grid { grid-template-columns: repeat(2, 1fr); }
  .owner-grid { grid-template-columns: 360px 1fr; gap: 50px; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch;
    gap: 0; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .25s; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .header-actions .btn { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cat-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .owner-grid { grid-template-columns: 1fr; }
  .owner-photo { max-width: 400px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .slider { height: 560px; }
  .slide-art { width: 70%; opacity: .25; right: -10%; }

  .shop-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; max-width: 85vw; z-index: 200;
    border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: .35s;
  }
  .filters-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .filters-open .sidebar-backdrop { display: block; }
  .filter-toggle { display: inline-flex; }
  .sidebar-close { display: block; margin: 0 0 12px auto; }
  .lang-switch.mobile-only { display: flex; padding: 16px 0 4px; }
  .pd-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  .topbar-links span:not(:first-child) { display: none; }
  .product-grid, .shop-layout .product-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-body { padding: 14px; }
  .product-body h3 { font-size: .9rem; }
  .product-price { flex-direction: column; align-items: stretch; }
  .btn-quote { width: 100%; }
  .section { padding: 64px 0; }
  .slider { height: 520px; }
  .slider-arrow { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .cat-grid, .steps { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cat-card { padding: 22px 16px; }
  .cta { padding: 36px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .owner-badge { right: 10px; }
  .logo img { height: 44px; }
}

@media (max-width: 400px) {
  .product-grid, .shop-layout .product-grid { grid-template-columns: 1fr; }
}

/* ---------- Home product tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--text); transition: .2s; }
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }


/* =========================================
   v2 — PHP version additions
   ========================================= */
body.lang-ja { font-family: "Noto Sans JP", "Poppins", system-ui, sans-serif; }
body.lang-ja .slide h1, body.lang-ja .slide h2 { line-height: 1.3; }

/* Language switch */
.lang-switch { display: flex; align-items: center; gap: 4px; }
.lang-switch a { padding: 2px 9px; border-radius: 999px; font-weight: 500; }
.lang-switch a.active { background: var(--blue); color: #fff; }
.topbar .lang-switch svg { margin-right: 4px; opacity: .7; }
.lang-switch.mobile-only { display: none; }
.lang-switch.mobile-only a { border: 1px solid var(--line); padding: 6px 14px; border-bottom: 1px solid var(--line) !important; }

/* Misc */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-error { color: var(--red); font-size: .88rem; margin-bottom: 12px; min-height: 0; }
.form-error:empty { display: none; }
.cat-card .cat-image { width: 100%; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; margin-bottom: 18px; background: var(--blue-light); }
.cat-card .cat-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card:hover .cat-image img { transform: scale(1.06); }
.product-media { display: block; }
.product-body h3 a:hover { color: var(--blue); }
.shop-title { color: var(--ink); font-size: 1.5rem; }
.sidebar-close { display: none; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,14,30,.5); z-index: 150; }
.footer.flush { margin-top: 0; }

/* Tabs */
.tabs, .pd-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--text); transition: .2s; }
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a { min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; font-weight: 500; transition: .2s; }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Product detail */
.crumb-bar { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 14px 0; }
.breadcrumb.dark { color: var(--muted); }
.breadcrumb.dark a:hover { color: var(--blue); }
.breadcrumb.dark span { color: var(--ink); }
.product-detail { padding-top: 50px; }
.pd-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.pd-main { position: relative; aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; background: linear-gradient(145deg, #eef2f9, #dfe6f3); border: 1px solid var(--line); }
.pd-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pd-main .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa8c4; }
.pd-main .badge { top: 16px; left: 16px; }
.pd-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: var(--shadow); font-size: 1.4rem; cursor: pointer; z-index: 2; }
.pd-nav:hover { background: var(--blue); color: #fff; }
.pd-nav.prev { left: 12px; } .pd-nav.next { right: 12px; }
.pd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; margin-top: 12px; }
.pd-thumbs button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #eef2f9; opacity: .7; transition: .2s; }
.pd-thumbs button.active, .pd-thumbs button:hover { border-color: var(--blue); opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--ink); line-height: 1.25; margin-bottom: 12px; }
.pd-short { color: var(--muted); font-size: 1.05rem; margin-bottom: 24px; }
.pd-attrs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.pd-attrs > div { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pd-attrs > div:nth-child(odd) { border-right: 1px solid var(--line); }
.pd-attrs dt { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pd-attrs dd { color: var(--ink); font-weight: 600; }
.stock-in_stock { color: #1f9d55 !important; } .stock-on_order { color: #e08a00 !important; } .stock-sold { color: var(--red) !important; }
.pd-quote { background: var(--blue-light); border-radius: 16px; padding: 22px; }
.pd-quote .price-label strong { font-size: 1.25rem; margin-top: 2px; }
.pd-quote p { font-size: .9rem; margin: 10px 0 18px; }
.pd-quote-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; transform: translateY(-2px); }
.pd-tabs-wrap { margin-top: 60px; }
.pd-panel { border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-top: 16px; }
.pd-panel p { margin-bottom: 14px; }
.pd-panel p:last-child { margin-bottom: 0; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 35%; color: var(--ink); background: var(--bg-soft); font-weight: 600; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  .pd-attrs { grid-template-columns: 1fr; }
  .pd-attrs > div:nth-child(odd) { border-right: 0; }
  .pd-panel { padding: 18px; }
  .pd-quote-btns .btn { flex: 1; }
}

/* =========================================
   v3 — Mobile fixes
   ========================================= */
.owner-photo { width: 100%; }
.owner-photo .frame { width: 100%; }

@media (max-width: 900px) {
  .owner-photo { max-width: 380px; margin: 10px auto 30px; }
  .owner-photo::before { top: -12px; left: -12px; width: 90px; height: 90px; }
  .owner-badge { right: -10px; bottom: 24px; padding: 12px 16px; }
  .owner-badge strong { font-size: 1.5rem; }
  .owner-badge span { display: block; max-width: 120px; line-height: 1.35; }
}

@media (max-width: 640px) {
  .slider { height: 580px; }
  .slide { align-items: flex-start; padding-top: 70px; }
  .slide p { font-size: .98rem; margin-bottom: 22px; }
  .slider-dots { bottom: 64px; }
  .features { margin-top: -40px; }
  .feature { padding: 18px; }
  .owner-photo { max-width: 300px; }
  .owner-sign { flex-wrap: wrap; }
  .signature { margin-left: 0; font-size: 1.9rem; }
  .owner-text blockquote { font-size: 1.02rem; padding-left: 16px; }
  .section-head-row { margin-bottom: 24px; }
  .tabs .tab { padding: 7px 14px; font-size: .88rem; }
  .product-cat { display: none; }
  .badge { top: 8px; left: 8px; font-size: .64rem; padding: 4px 8px; }
  .product-meta { font-size: .74rem; gap: 2px 10px; margin-bottom: 10px; }
  .price-label strong { font-size: .86rem; }
  .btn-quote { padding: 9px 10px; font-size: .82rem; }
  .page-banner { padding: 46px 0 40px; }
  .shop-toolbar { align-items: flex-start; }
  .toolbar-right { width: 100%; }
  .toolbar-right form { flex: 1; }
  .toolbar-right .select { width: 100%; }
  .pd-main { border-radius: 14px; }
  .pd-thumbs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .pd-tabs-wrap { margin-top: 36px; }
  .spec-table th { width: 42%; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
  .modal-product { margin-left: 18px; margin-right: 18px; }
  .float-wa { width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .cta .btns { width: 100%; }
  .cta .btns .btn { flex: 1; }
}

/* 2 column products even on small phones */
@media (max-width: 400px) {
  .product-grid, .shop-layout .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-body { padding: 10px; }
  .product-body h3 { font-size: .84rem; }
  .container { padding: 0 14px; }
}
@media (max-width: 330px) {
  .product-grid, .shop-layout .product-grid { grid-template-columns: 1fr; }
}
/* iOS: prevent zoom on input focus */
@media (max-width: 640px) {
  .form-group input, .form-group select, .form-group textarea, .search-box input, .select { font-size: 16px; }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .feature:nth-child(2n) { border-right: 0 !important; }
  .feature:nth-child(n+3) { border-bottom: 0; }
  .feature-icon { flex: 0 0 auto; width: 40px; height: 40px; }
  .feature h4 { font-size: .88rem; line-height: 1.3; }
  .feature p { font-size: .76rem; }
}
/* product page: stack gallery + info on tablet/mobile (must come after .pd-grid base rule) */
.pd-gallery, .pd-info { min-width: 0; width: 100%; }
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; gap: 28px; }
  .lang-switch.mobile-only { display: none; }
}

/* hidden attribute always wins (home tabs, product tabs) */
[hidden] { display: none !important; }
