/* Happoya Netshop — "モダン (2025)" template.
   Clean, airy, Apple/Shopify-modern aesthetic. Same HTML as the default theme;
   colours come from the --accent / --accent-dark / --price variables (still
   customisable from AMS), the rest of the look is defined here. */
:root {
    --accent: #0071e3;        /* customisable */
    --accent-dark: #0058b0;   /* customisable */
    --price: #1d1d1f;         /* customisable */
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --line: #e8e8ed;
    --bg: #ffffff;
    --soft: #f5f5f7;
    --radius: 18px;
    --shadow: 0 2px 12px rgba(0,0,0,.05);
    --shadow-lg: 0 18px 44px rgba(0,0,0,.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro JP", "SF Pro Text",
                 "Hiragino Kaku Gothic ProN", "Hiragino Sans",
                 "Inter", "Noto Sans JP", Meiryo, "Yu Gothic", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header — translucent, blurred, sticky (Apple-like) */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { font-weight: 700; font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
.logo span { display: block; font-size: .6rem; color: var(--muted); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.logo-img { height: 34px; width: auto; display: block; }
.search { flex: 1; display: flex; min-width: 0; position: relative; align-items: center; }
.search input { flex: 1; min-width: 0; border: 1px solid transparent; background: var(--soft); border-radius: 999px; padding: 11px 48px 11px 18px; font-size: .92rem; transition: border-color .15s, background .15s; }
.search input:focus { outline: none; background: #fff; border-color: var(--accent); }
.search button { position: absolute; right: 5px; border: none; background: var(--accent); color: #fff; width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .9rem; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.header-actions a:hover { color: var(--accent); }
.header-actions .cart { font-size: 1.3rem; }
.cart { position: relative; }
.cart-badge { position: absolute; top: -7px; right: -10px; background: var(--accent); color: #fff; font-size: .64rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; padding: 0 5px; font-weight: 700; }

/* Category nav — pill chips */
.cat-nav { background: #fff; overflow-x: auto; }
.cat-nav-inner { display: flex; gap: 8px; padding: 12px 20px; white-space: nowrap; max-width: 1180px; margin: 0 auto; }
.cat-nav a { padding: 7px 16px; font-size: .82rem; font-weight: 500; color: var(--ink); border-radius: 999px; background: var(--soft); transition: background .15s, color .15s; }
.cat-nav a:hover { background: var(--accent); color: #fff; }

/* Hero — big, soft, editorial */
.hero { margin: 24px 0; padding: clamp(36px, 7vw, 72px) clamp(24px, 5vw, 56px); border-radius: 28px; background: var(--soft); color: var(--ink); }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.hero p { color: var(--muted); font-size: 1.02rem; margin-top: 10px; }
.search-head { margin: 20px 0 4px; }

/* Notices */
.notice { padding: 22px; border-radius: var(--radius); background: var(--soft); margin: 18px 0; text-align: center; color: var(--muted); }
.notice.error { background: #fff1f0; color: #c0362c; }
.notice.ok { background: #edf9f0; color: #1c7c43; }
.notice.pending { padding: 48px 22px; }

/* Product grid — borderless cards, hover zoom */
.product-grid { display: grid; gap: 18px; margin: 22px 0; grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 1/1; background: var(--soft); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .45s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.noimg { color: #c7c7cc; font-size: .8rem; letter-spacing: .12em; }
.card-body { padding: 14px 6px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: .9rem; color: var(--ink); line-height: 1.5; height: 3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-price { color: var(--price); font-weight: 600; font-size: 1.1rem; margin-top: auto; letter-spacing: -.01em; }
.card-price .tax { color: var(--muted); font-weight: 400; font-size: .68rem; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 32px 0 48px; }
.pagination a { padding: 10px 22px; background: var(--soft); color: var(--ink); border-radius: 999px; font-size: .9rem; font-weight: 500; transition: background .15s; }
.pagination a:hover { background: var(--accent); color: #fff; }
.page-info { color: var(--muted); font-size: .85rem; }

/* Footer */
.site-footer { background: var(--soft); margin-top: 56px; padding: 36px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: center; font-size: .82rem; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.copyright { text-align: center; color: var(--muted); font-size: .76rem; margin-top: 16px; }

/* Shared bits */
.breadcrumb { font-size: .8rem; color: var(--muted); margin: 18px 0 10px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 16px 0 20px; }
.btn-link { display: inline-block; margin-top: 12px; color: var(--accent); font-size: .9rem; font-weight: 500; }

/* CMS pages */
.cms-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 14px 0 48px; }
.cms-body { font-size: .92rem; color: var(--ink); line-height: 1.95; }
.cms-body h3 { font-size: 1.05rem; margin: 22px 0 10px; font-weight: 700; }
.cms-body p { margin: 10px 0; }
.cms-body table { width: 100%; border-collapse: collapse; margin: 12px 0; border-radius: 12px; overflow: hidden; }
.cms-body th, .cms-body td { border-bottom: 1px solid var(--line); padding: 13px 14px; text-align: left; vertical-align: top; font-size: .9rem; }
.cms-body th { background: var(--soft); white-space: nowrap; width: 34%; font-weight: 600; }

/* Product detail */
.pdp { display: grid; gap: 28px; margin: 8px 0 36px; }
.pdp-main { background: var(--soft); border-radius: 24px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdp-main img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.noimg.big { font-size: 1rem; }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pdp-thumbs .thumb { width: 64px; height: 64px; border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: var(--soft); }
.pdp-thumbs .thumb.active { border-color: var(--accent); }
.pdp-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.pdp-part { color: var(--muted); font-size: .82rem; margin: 10px 0; }
.pdp-price { color: var(--price); font-weight: 600; font-size: 2rem; letter-spacing: -.02em; margin: 16px 0; }
.pdp-price .tax { font-size: .8rem; color: var(--muted); font-weight: 400; }
.pdp-price .excl { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.pdp-stock { font-size: .9rem; margin: 12px 0 20px; font-weight: 600; }
.pdp-stock.in { color: #1c7c43; }
.pdp-stock.out { color: #c0362c; }
.pdp-stock .low { color: #b76e00; font-weight: 500; }
.pdp-buy { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.pdp-buy label { font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.pdp-buy input { width: 88px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; }
.btn-cart { flex: 1; min-width: 200px; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 16px 28px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform .15s ease, background .15s; }
.btn-cart:hover { background: var(--accent-dark); transform: scale(1.015); }
.pdp-restock { background: var(--soft); border-radius: var(--radius); padding: 20px; }
.pdp-restock p { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.pdp-restock input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: #fff; }
.btn-restock { width: 100%; background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 14px; font-size: .95rem; font-weight: 600; cursor: pointer; }
.pdp-desc { margin-top: 32px; }
.pdp-desc h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.desc-body { font-size: .92rem; color: var(--ink); line-height: 1.85; word-break: break-word; }
.desc-body img { height: auto; margin: 10px 0; border-radius: 10px; }
.desc-body a { color: var(--accent); text-decoration: underline; }
.desc-body table { width: 100% !important; border-collapse: collapse; margin: 12px 0; font-size: .9rem; border-radius: 12px; overflow: hidden; }
.desc-body td, .desc-body th { border-bottom: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; }
.desc-body th { background: var(--soft); }
.desc-body h2, .desc-body h3, .desc-body h4 { margin: 18px 0 10px; font-size: 1.05rem; font-weight: 700; }

/* Favourite button */
.pdp-fav { margin: 6px 0 16px; }
.pdp-fav .fav { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 10px 18px; font-size: .85rem; font-weight: 500; cursor: pointer; transition: border-color .15s; }
.pdp-fav .fav.on { border-color: var(--accent); color: var(--accent); background: #f0f7ff; }

/* Reviews */
.reviews { margin: 12px 0 48px; }
.reviews-h { font-size: 1.25rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.reviews-avg { font-size: .9rem; color: var(--muted); font-weight: 400; }
.reviews-avg strong { color: var(--ink); font-size: 1.1rem; }
.stars { color: #ff9f0a; letter-spacing: 1px; }
.reviews-note { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.reviews-note a { color: var(--accent); }
.review-form { background: var(--soft); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; max-width: 580px; }
.review-form .rf-row { display: flex; align-items: center; gap: 12px; }
.review-form select, .review-form input, .review-form textarea { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; font-family: inherit; background: #fff; }
.review-form textarea { resize: vertical; }
.review-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.review-author { color: var(--ink); font-weight: 600; }
.review-vp { background: #edf9f0; color: #1c7c43; border-radius: 999px; padding: 2px 10px; font-size: .7rem; }
.review-title { font-weight: 700; font-size: .95rem; margin: 4px 0; }
.review-body { font-size: .92rem; line-height: 1.75; }
.review-reply { margin-top: 12px; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: .86rem; color: var(--ink); }
.review-reply strong { color: var(--accent); }

/* Cart */
.cart-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: none; }
.cart-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-name { font-size: .95rem; color: var(--ink); font-weight: 500; }
.cart-part { font-size: .74rem; color: var(--muted); }
.cart-unit { font-size: .8rem; color: var(--muted); }
.cart-qty input { width: 60px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.cart-line { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cart-del button { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.cart-summary { margin: 24px 0 48px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.cart-total { font-size: 1.1rem; }
.cart-total strong { color: var(--ink); font-size: 1.5rem; letter-spacing: -.02em; }
.btn-checkout { display: inline-block; background: var(--accent); color: #fff; padding: 16px 44px; border-radius: 999px; font-weight: 600; transition: transform .15s, background .15s; }
.btn-checkout:hover { background: var(--accent-dark); transform: scale(1.015); }

/* Checkout */
.co-grid { display: grid; gap: 24px; margin: 8px 0 48px; }
.co-h { font-size: 1.1rem; font-weight: 700; margin: 22px 0 14px; }
.co-h:first-child { margin-top: 0; }
.co-fields label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.co-fields input, .co-fields textarea { padding: 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; font-family: inherit; }
.co-fields .req { color: var(--accent); font-size: .68rem; }
.co-radio { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: .95rem !important; color: var(--ink) !important; background: var(--soft); padding: 14px 16px; border-radius: 12px; }
.co-note { font-size: .8rem; color: var(--muted); background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.co-summary { background: var(--soft); border-radius: var(--radius); padding: 22px; align-self: start; }
.co-items { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.co-items li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: .85rem; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.co-it-q { color: var(--muted); }
.co-it-p { color: var(--ink); font-weight: 600; white-space: nowrap; }
.co-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin-bottom: 18px; font-size: .9rem; }
.co-totals dt { color: var(--muted); }
.co-totals dd { text-align: right; }
.co-totals .co-grand { font-weight: 700; font-size: 1.2rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; letter-spacing: -.02em; }
.co-submit { width: 100%; text-align: center; border: none; cursor: pointer; margin-bottom: 12px; }
.co-done { padding: 48px 24px; }
.co-done h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.co-done-no { font-size: 1.05rem; margin: 12px 0; }

/* Auth forms */
.auth-form { max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 16px; margin: 8px 0; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--muted); }
.auth-form input { padding: 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; }
.auth-form .req { color: var(--accent); font-size: .68rem; }
.btn-primary { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 15px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 6px; transition: background .15s, transform .15s; }
.btn-primary:hover { background: var(--accent-dark); transform: scale(1.01); }
.auth-alt { font-size: .85rem; color: var(--muted); margin: 16px 0 48px; }
.auth-alt a { color: var(--accent); }

/* Account */
.account-greeting { margin: 6px 0 18px; font-size: 1.05rem; }
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 28px; }
.account-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 500; transition: transform .2s, box-shadow .2s; }
.account-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.account-tile .ico { font-size: 1.5rem; }
.account-tile small { color: var(--muted); font-size: .72rem; font-weight: 400; }
.account-tile.disabled { color: #c7c7cc; }
.account-info { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 40px; }
.account-info h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.account-info dl { display: grid; grid-template-columns: 96px 1fr; gap: 10px 14px; font-size: .9rem; }
.account-info dt { color: var(--muted); }
.acct-empty { color: var(--muted); font-size: .9rem; }
.order-history { width: 100%; border-collapse: collapse; font-size: .88rem; }
.order-history th, .order-history td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.order-history th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.ostat { border-radius: 999px; padding: 3px 12px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.ostat.st-pend { background: #fff4e0; color: #b76e00; }
.ostat.st-paid { background: #e8f1ff; color: #0058b0; }
.ostat.st-done { background: #edf9f0; color: #1c7c43; }
.ostat.st-cancel { background: #fdecea; color: #c0362c; }

/* Tablet / desktop */
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(3, 1fr); } .account-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .pdp { grid-template-columns: 1fr 1fr; align-items: start; } .co-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
