/* 生活のエッセンス 共通（モック style.css） */

:root {
  --cream: #faf6ee;
  --paper: #fffdf8;
  --beige: #f1e9dc;
  --sand: #e4d8c5;
  --ink: #4a4038;
  --ink-soft: #7d7268;
  --clover: #6f9a68;
  --clover-deep: #557d50;
  --sage: #dfe8d6;
  --blush: #f3dcd4;
  --rose: #c98d7e;
  --warn: #d9826b;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(92, 72, 50, .08);
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --en: "Cormorant Garamond", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.8;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.en { font-family: var(--en); font-style: italic; letter-spacing: .08em; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95em 1.8em; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: .95rem; transition: .25s;
}
.btn--primary { background: var(--clover); color: #fff; box-shadow: 0 8px 20px rgba(111, 154, 104, .3); }
.btn--primary:hover { background: var(--clover-deep); transform: translateY(-1px); }
.btn--ghost { border-color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--white { background: #fff; color: var(--ink); border-color: var(--sand); }
.btn--sm { padding: .6em 1.2em; font-size: .85rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- header ---------- */
.notice { background: var(--sage); text-align: center; font-size: .8rem; padding: .5em 1em; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 246, 238, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(228, 216, 197, .6);
}
.header__in { display: flex; align-items: center; gap: 28px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.logo img { width: 46px; height: 46px; border-radius: 50%; }
.logo small { display: block; font-family: var(--en); font-style: italic; font-weight: 500; color: var(--ink-soft); font-size: .75rem; line-height: 1; }
.gnav { display: flex; gap: 26px; font-size: .9rem; margin-left: 12px; }
.gnav a { position: relative; padding: 4px 0; }
.gnav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px; background: var(--clover); transition: .25s; }
.gnav a:hover::after { width: 100%; }
.header__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: transparent; transition: .2s;
}
.icon-btn:hover { background: var(--beige); }
.icon-btn svg, .btn-cart svg, .bnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--rose); color: #fff; font-size: .68rem; line-height: 18px; text-align: center; font-weight: 700;
}
.header__search {
  display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--sand);
  border-radius: 999px; padding: 0 16px; height: 42px; width: 240px;
}
.header__search input { border: 0; background: transparent; outline: none; font: inherit; font-size: .85rem; width: 100%; color: var(--ink); }
.header__search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; }

/* ---------- product card ---------- */
.p-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .3s; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.p-card__img { position: relative; aspect-ratio: 1; background: #fff; padding: 14px; }
.p-card__img img { width: 100%; height: 100%; object-fit: contain; }
.p-card__badge { position: absolute; left: 12px; top: 12px; background: var(--blush); color: #9b5e50; font-size: .72rem; font-weight: 700; padding: .2em .9em; border-radius: 999px; }
.p-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.p-card__brand { margin: 0; font-size: .72rem; color: var(--ink-soft); }
.p-card__name { margin: 2px 0 10px; font-size: .88rem; font-weight: 500; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.p-card__price { font-weight: 700; font-size: 1.05rem; }
.p-card__price small { font-size: .65rem; font-weight: 400; margin-left: 3px; color: var(--ink-soft); }
.btn-cart { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sage); color: var(--clover-deep); display: grid; place-items: center; transition: .2s; }
.btn-cart:hover { background: var(--clover); color: #fff; }

/* ---------- drawer (cart) ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer__bg { position: absolute; inset: 0; background: rgba(74, 64, 56, .3); opacity: 0; transition: .3s; }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(400px, 92vw); background: var(--paper);
  transform: translateX(100%); transition: .35s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column;
  border-radius: 24px 0 0 24px;
}
.cart-open .drawer { pointer-events: auto; }
.cart-open .drawer__bg { opacity: 1; }
.cart-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--beige); font-weight: 700; }
.drawer__body { flex: 1; overflow: auto; padding: 12px 24px; }
.drawer__empty { text-align: center; color: var(--ink-soft); margin-top: 60px; font-size: .9rem; }
.drawer__foot { padding: 20px 24px 28px; border-top: 1px solid var(--beige); }
.drawer__total { display: flex; justify-content: space-between; margin-bottom: 14px; font-weight: 700; }
.drawer__foot .btn { width: 100%; }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--beige); }
.cart-row img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 12px; }
.cart-row__name { margin: 0; font-size: .82rem; line-height: 1.5; }
.cart-row__meta { margin: 2px 0 0; font-size: .8rem; color: var(--ink-soft); }
.cart-row__rm { border: 0; background: none; font-size: 1.2rem; color: var(--ink-soft); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .8em 1.4em; border-radius: 999px; font-size: .85rem; transition: .3s;
  max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding-right: .6em; }
.toast button { border: 0; background: rgba(255,255,255,.18); color: #fff; font-weight: 700; font-size: .8rem; padding: .45em 1em; border-radius: 999px; flex: none; }

/* ---------- bot ---------- */
.bot { position: fixed; right: 22px; bottom: 22px; z-index: 80; }
.bot__fab {
  display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px;
  background: var(--paper); box-shadow: 0 10px 30px rgba(92, 72, 50, .18); font-size: .78rem; font-weight: 700; line-height: 1.35; text-align: left;
  transition: .25s;
}
.bot__fab:hover { transform: translateY(-2px); }
.bot__fab img { width: 48px; height: 48px; border-radius: 50%; background: var(--sage); padding: 4px; }
.bot.is-open .bot__fab { opacity: 0; pointer-events: none; }
.bot__panel {
  position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px));
  background: var(--cream); border-radius: 26px; box-shadow: 0 20px 50px rgba(92, 72, 50, .25); display: flex; flex-direction: column; overflow: hidden;
  animation: pop .3s cubic-bezier(.2,.7,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.bot__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--clover); color: #fff; }
.bot__head img { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 3px; }
.bot__title { margin: 0; font-weight: 700; }
.bot__sub { margin: 0; font-size: .72rem; opacity: .9; }
.bot__close { margin-left: auto; border: 0; background: rgba(255,255,255,.2); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; }
.bot__log { flex: 1; overflow-y: auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.bot__msg { max-width: 86%; padding: .75em 1.05em; border-radius: 18px; font-size: .86rem; line-height: 1.7; animation: pop .25s; }
.bot__msg--bot { background: var(--paper); border-top-left-radius: 6px; align-self: flex-start; }
.bot__msg--user { background: var(--clover); color: #fff; border-top-right-radius: 6px; align-self: flex-end; }
.bot__msg--card { align-self: stretch; max-width: 100%; padding: 0; }
.bot__dots { display: inline-flex; gap: 4px; }
.bot__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sand); animation: dot 1s infinite; }
.bot__dots i:nth-child(2) { animation-delay: .15s; } .bot__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); background: var(--clover); } }
.bot__choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bot__choices button { border: 1.5px solid var(--clover); background: #fff; color: var(--clover-deep); border-radius: 999px; padding: .5em 1.05em; font-size: .82rem; font-weight: 700; transition: .2s; }
.bot__choices button:hover { background: var(--clover); color: #fff; }
.bot__products { display: grid; gap: 8px; }
.bot__p { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; background: var(--paper); border-radius: 16px; padding: 8px 10px; }
.bot__p img { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 10px; }
.bot__p p { margin: 0; font-size: .76rem; line-height: 1.45; }
.bot__p b { font-size: .85rem; }
.bot__p button { border: 0; background: var(--sage); color: var(--clover-deep); font-weight: 700; font-size: .74rem; padding: .5em .8em; border-radius: 999px; white-space: nowrap; }
.bot__article { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; background: var(--paper); border-radius: 16px; padding: 8px; font-size: .8rem; line-height: 1.5; }
.bot__article img { width: 84px; height: 60px; object-fit: cover; border-radius: 10px; }
.bot__article small { display: block; color: var(--rose); font-weight: 700; font-size: .68rem; }

/* ---------- SP bottom nav ---------- */
.bnav { display: none; }
@media (max-width: 860px) {
  .gnav, .header__search { display: none; }
  .header__in { height: 62px; }
  .logo img { width: 40px; height: 40px; }
  .bnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 253, 248, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--beige);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bnav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .62rem; padding: 4px 0; color: var(--ink-soft); }
  .bnav a.is-active { color: var(--clover-deep); }
  .bnav .badge { top: 0; right: calc(50% - 22px); }
  body { padding-bottom: 72px; }
  .bot { bottom: 84px; right: 14px; }
  .bot__fab span { display: none; }
  .bot__fab { padding: 6px; }
  .toast { bottom: 150px; }
}
