/* ===== 名刺カード印刷.com — 印刷通販テーマ（和テイスト・テラコッタ） ===== */
:root {
    --brand: #b8472d;          /* テラコッタ（赤茶） */
    --brand-dark: #95371f;
    --brand-soft: #f7ece7;
    --cta: #e0822f;            /* 注文ボタン（暖色オレンジ） */
    --cta-dark: #c66c1d;
    --action: #2f6f8f;
    --ink: #2a2622;
    --ink-soft: #574f48;
    --muted: #9a9088;
    --paper: #ffffff;
    --subtle: #f7f3ec;         /* 温かいオフホワイト */
    --selected: #fbf2ee;
    --line: #e7e0d5;
    --line-soft: #f0ebe2;
    --warn: #d08700;
    --link: #1f6f8f;
    --radius: 7px;
    --maxw: 1180px;
    --shadow-sm: 0 1px 2px rgba(40,30,20,.07);
    --shadow-md: 0 6px 20px rgba(40,30,20,.10);
    --shadow-lg: 0 18px 50px rgba(40,30,20,.18);
    --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    --font-ui: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; color: var(--ink); background: var(--paper);
    font-family: var(--font-ui); line-height: 1.8; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.4; margin: 0; }
.num { font-feature-settings: "tnum"; }
.mono { font-family: var(--font-mono); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--brand); }
.h2-rule { font-size: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--brand); margin-bottom: 24px; }
.marker { background: linear-gradient(transparent 62%, var(--brand-soft) 62%); font-weight: 700; }
.link { color: var(--link); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: var(--radius);
    font-family: var(--font-ui); font-weight: 700; font-size: 14px; padding: 10px 18px; cursor: pointer; transition: all .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-dark); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-sub { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-sub:hover { border-color: var(--brand); color: var(--brand); }
.btn-action { background: var(--action); color: #fff; padding: 8px 16px; font-size: 13px; }
.btn-action:hover { filter: brightness(.94); color: #fff; }

.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--subtle); border: 1px solid var(--line);
    border-radius: 5px; padding: 4px 10px; font-size: 12.5px; color: var(--ink); }
.badge-brand { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 700;
    font-size: 12px; padding: 4px 11px; border-radius: 999px; }
.badge-rec { background: var(--cta); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }

/* ===== header ===== */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .topbar { height: 3px; background: var(--brand); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo .mark { width: 40px; height: 40px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.logo .name { font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--brand); line-height: 1.1; }
.logo .tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--muted); }
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a { color: var(--ink-soft); font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 6px; }
.site-nav a:hover { color: var(--brand); text-decoration: none; background: var(--subtle); }
.cart-link { position: relative; }
.cart-badge { position: absolute; top: -3px; right: 2px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 17px; height: 17px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* ===== hero ===== */
.hero { background: linear-gradient(180deg, var(--brand-soft), #fff); border-bottom: 1px solid var(--line); }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 56px 24px; }
.hero h1 { font-size: 44px; line-height: 1.3; }
.hero .lead { margin-top: 18px; font-size: 16px; color: var(--ink-soft); max-width: 460px; }
.hero .stats { display: flex; gap: 30px; margin-top: 32px; }
.hero .stats .v { font-weight: 900; font-size: 23px; }
.hero .stats .k { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.hero .cards { position: relative; height: 360px; display: grid; place-items: center; }

/* ===== card mock ===== */
.cardmock { width: 280px; height: 168px; border-radius: 7px; position: relative; overflow: hidden;
    box-shadow: var(--shadow-md); color: var(--ink); background: #fff; }
.cardmock.flat { box-shadow: inset 0 0 0 1px var(--line); }
.cardmock .nm { font-weight: 700; font-size: 17px; line-height: 1.15; }
.cardmock .nm small { display: block; font-family: var(--font-mono); font-size: 8px; color: var(--muted); letter-spacing: .08em; font-weight: 400; }
.cardmock .meta { font-family: var(--font-mono); font-size: 7.2px; color: var(--ink-soft); line-height: 1.7; }
.cm-pad { position: absolute; inset: 22px; display: flex; flex-direction: column; justify-content: space-between; }
/* fluid thumbnail scaler (fixed 280x168 → fits cell) */
.cardthumb { width: 100%; max-width: 280px; margin: 0 auto; aspect-ratio: 280 / 168; container-type: inline-size; position: relative; }
.cardthumb > .cardmock { position: absolute; top: 0; left: 0; transform-origin: top left; transform: scale(calc(100cqw / 280)); }

/* card grid (catalog/showcase) */
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tpl-card { display: block; background: none; border: none; padding: 0; text-align: left; cursor: pointer; }
.tpl-card .thumb { display: grid; place-items: center; background: var(--subtle); border: 1px solid var(--line);
    border-radius: 8px; padding: 22px 18px; transition: all .18s; }
.tpl-card:hover .thumb { box-shadow: var(--shadow-md); border-color: var(--brand); }
.tpl-card .nm { font-size: 14px; font-weight: 700; margin-top: 10px; }
.tpl-card .st { font-size: 12px; color: var(--muted); }
.tpl-card .pr { font-weight: 700; color: var(--brand); }

/* category cards */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cat-card { display: flex; gap: 22px; align-items: center; background: #fff; border: 1px solid var(--line);
    border-radius: 8px; padding: 24px; transition: all .18s; }
.cat-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); text-decoration: none; }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.feat { background: #fff; padding: 26px 22px; min-height: 188px; }
.feat .mono { font-size: 11px; color: var(--brand); }
.feat .k { font-weight: 900; font-size: 30px; color: var(--line); line-height: 1; margin: 6px 0; }
.feat h3 { font-size: 16px; }
.feat p { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }

/* paper strip */
.paper-strip { display: flex; gap: 14px; }
.paper-strip .p { flex: 1; }
.paper-strip .sw { height: 130px; border-radius: 6px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.paper-strip .nm { font-size: 12.5px; font-weight: 700; margin-top: 8px; }
.paper-strip .sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ===== catalog/detail layout ===== */
.shop-layout { display: flex; gap: 28px; align-items: flex-start; padding: 20px 0 64px; }
.sidebar { width: 230px; flex-shrink: 0; }
.sidebar .promo { display: block; background: var(--brand); color: #fff; border-radius: 8px; padding: 16px; margin-bottom: 18px; }
.sidebar .promo .big { font-weight: 900; font-size: 30px; }
.side-grp { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.side-grp .head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; font-weight: 700; font-size: 14px; background: var(--subtle); }
.side-grp a { display: flex; gap: 6px; border-top: 1px solid var(--line-soft); padding: 9px 13px; font-size: 12.5px; color: var(--ink-soft); }
.side-grp a:hover { background: var(--subtle); text-decoration: none; color: var(--brand); }
.side-grp a.cur { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.shop-main { flex: 1; min-width: 0; }

.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 7px; flex-wrap: wrap; }

/* setting rows */
.set-row { display: flex; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.set-row .lbl { width: 168px; flex-shrink: 0; font-weight: 700; font-size: 14px; padding: 16px 18px; background: var(--subtle); border-right: 1px solid var(--line); display: flex; align-items: center; }
.set-row .body { flex: 1; padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 6px; padding: 9px 15px; font-size: 13.5px; cursor: pointer; }
.pill.on { border-color: var(--brand); background: var(--selected); font-weight: 700; }
.pill .dot { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--muted); display: inline-grid; place-items: center; }
.pill.on .dot { border-color: var(--brand); }
.pill.on .dot::after { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--brand); }

/* price matrix */
.matrix-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
table.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
table.matrix th, table.matrix td { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
table.matrix thead th { background: var(--subtle); border-bottom: 2px solid var(--brand); font-size: 12.5px; }
table.matrix th.rowhead, table.matrix th.corner { text-align: left; white-space: nowrap; padding: 10px 14px; }
table.matrix tbody tr:nth-child(even) { background: var(--subtle); }
table.matrix td.cell { color: var(--link); cursor: pointer; }
table.matrix td.cell:hover { background: var(--brand-soft); }
table.matrix td.cell.sel { background: var(--brand); color: #fff; font-weight: 700; }
table.matrix th.rowhead.sel, table.matrix thead th.sel { background: var(--brand-soft); color: var(--brand); }

/* quote box */
.quote-box { margin-top: 28px; border: 2px solid var(--brand); border-radius: 10px; overflow: hidden; }
.quote-box .qh { background: var(--brand-soft); padding: 12px 20px; font-weight: 700; color: var(--brand); }
.quote-box .qb { padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.quote-box .price { font-weight: 900; font-size: 32px; color: var(--brand); }
.quote-box .qfoot { padding: 0 20px 20px; display: flex; gap: 12px; }

.size-diagram { height: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; position: relative; }

/* ===== footer ===== */
.site-footer { background: #221f1c; color: rgba(255,255,255,.78); margin-top: 56px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 48px 24px 32px; }
.site-footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; opacity: .55; margin: 0 0 12px; color: #fff; }
.site-footer a { display: block; color: rgba(255,255,255,.82); font-size: 13px; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.14); }
.site-footer .bottom .wrap { display: flex; justify-content: space-between; padding: 16px 24px; font-size: 12px; opacity: .6; }

/* article content (templates desc etc) */
.content > * + * { margin-top: 1em; }

/* responsive */
@media (max-width: 920px) {
    .hero .grid, .cat-grid, .feat-grid, .tpl-grid { grid-template-columns: 1fr 1fr; }
    .hero .cards { display: none; }
    .shop-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .tpl-grid, .cat-grid, .feat-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .site-header .bar { flex-direction: column; gap: 10px; }
}
