/* Tutto per Scarpe — palette taken from the current site: bordeaux header, gold bar, cream page. */
:root {
  --bordeaux: #6b1a2b;
  --bordeaux-dark: #531422;
  --gold: #d4a017;
  --gold-dark: #b4860c;
  --cream: #eef0ea;
  --tan: #e2e4dc;
  --ink: #1b1b1b;
  --muted: #5d5d57;
  --line: #cfd2c8;
  --radius: 10px;
  --wrap: 1280px;
  --pad: clamp(16px, 5vw, 64px);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: 12px; top: -60px; background: #fff; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 18px; z-index: 50; color: var(--bordeaux); }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* header */
.site-header { background: var(--bordeaux); color: #fff; }
.header-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); min-height: 88px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; opacity: .8; padding: 10px 0; }
.nav a:hover, .nav a[aria-current] { opacity: 1; }
.logo img { height: 52px; width: auto; }
.header-tools { display: flex; justify-content: flex-end; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* announcement bar */
.announce { background: var(--gold); color: #1b1b1b; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 52px; font-size: .9rem; }
.announce-msgs { text-align: center; display: grid; }
.announce-msgs p { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .2s; }
.announce-msgs p.is-on { opacity: 1; visibility: visible; }
.announce-btn { background: none; border: 0; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; color: inherit; }
.announce a { text-decoration: none; }
.announce a:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 10px; border: 1.5px solid transparent; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-gold { background: var(--gold); color: #1b1b1b; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #333; }
.btn-ghost { background: transparent; border-color: #111; color: #111; }
.btn-ghost:hover { background: #111; color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--bordeaux); }

/* hero */
.hero { background: #2a1d14 center/cover no-repeat; color: #fff; min-height: clamp(460px, 62vw, 780px); display: flex; align-items: flex-end; }
.hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad) clamp(32px, 6vw, 72px); width: 100%; }
.hero h1 { max-width: 16ch; }
.hero p { max-width: 62ch; font-size: 1.05rem; }

/* home tiles */
.tiles-section { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 10px; }
.tile { text-decoration: none; display: block; }
.tile img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--tan); }
.tile h3 { font-size: 1.6rem; margin: 14px 0 6px; text-align: center; }
.tile p { color: #333; text-align: center; margin: 0 8px 8px; }
.tile-meta { display: block; text-align: center; font-size: .85rem; color: var(--bordeaux); font-weight: 600; }
.tile-ask { color: var(--muted); font-weight: 500; }
.tile:hover h3 { color: var(--bordeaux); }
.tile:hover img { filter: brightness(.95); }

/* page head */
.page-head { background: var(--bordeaux); color: #fff; padding: clamp(36px, 6vw, 72px) 0; }
.page-head h1 { margin: 0; }

/* catalog toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: end; padding: 28px 0 20px; }
.f { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.f input, .f select { font: 1rem var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; padding: 0 12px; }
.f-search { flex: 1 1 260px; }
.f-search input { width: 100%; }
.count { margin: 0 0 0 auto; color: var(--muted); align-self: center; padding-top: 18px; }

/* product grid */
.grid { list-style: none; margin: 0; padding: 0 0 56px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 20px; }
.card[hidden] { display: none; }
.card a { text-decoration: none; display: block; }
.card-media { aspect-ratio: 1; background: var(--tan); overflow: hidden; display: grid; }
.card-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.is-ph { padding: 16px 18px; align-content: start; }
.ph { font-size: clamp(1.05rem, 1.7vw, 1.5rem); line-height: 1.2; color: #222; }
.card-title { font-size: .95rem; font-weight: 400; margin: 10px 0 2px; letter-spacing: 0; }
.card a:hover .card-title { text-decoration: underline; }
.card-brand, .card-opts { margin: 0; font-size: .8rem; color: var(--muted); }
.price { font-weight: 600; font-size: .9rem; margin: 2px 0 0; }
.empty { padding: 40px 0 80px; text-align: center; color: var(--muted); }

/* product page */
.product { padding-top: 24px; padding-bottom: 64px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.main-img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.main-img.is-ph { background: var(--tan); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { border: 1px solid var(--line); background: #fff; padding: 0; width: 80px; height: 80px; cursor: pointer; border-radius: 6px; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--bordeaux); font-weight: 700; margin-bottom: 6px; }
.info h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.info .price { font-size: 1.1rem; margin-bottom: 1em; }
.desc { margin: 1em 0 1.5em; color: #333; }
.desc p:last-child { margin-bottom: 0; }
.opt { border: 0; padding: 0; margin: 0 0 1.2em; }
.opt legend { padding: 0; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.opt ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.opt li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: .92rem; }
.buy { border-top: 1px solid var(--line); padding-top: 1.4em; margin-top: 1.6em; }
.buy-note { color: var(--muted); }
.buy-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.related { margin-top: 48px; }
.related .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 0; }

/* contact / prose */
.contact, .prose { padding-top: 40px; padding-bottom: 72px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.todo { background: #fff6dd; border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 6px; }

/* footer */
.site-footer { background: var(--cream); border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); padding: 28px 0 40px; }
.footer-inner p { margin: 0 0 6px; }
.footer-inner a { text-decoration: none; } .footer-inner a:hover { text-decoration: underline; }

/* responsive: 375 → 1280 */
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid, .related .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { grid-template-columns: 1fr auto; grid-template-areas: "logo tools" "nav nav"; min-height: 0; padding-top: 10px; padding-bottom: 6px; }
  .logo { grid-area: logo; } .header-tools { grid-area: tools; } .nav { grid-area: nav; gap: 18px; }
  .logo img { height: 40px; }
  .tiles { grid-template-columns: 1fr; }
  .grid, .related .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .toolbar > .f:not(.f-search) { flex: 1 1 calc(50% - 10px); }
  .toolbar select { width: 100%; }
  .count { margin: 0; padding: 0; flex-basis: 100%; }
  .announce { font-size: .8rem; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .announce, .toolbar, .site-footer { display: none; } }
.opt li::first-letter { text-transform: uppercase; }
.ph, .card-title, .tile h3 { overflow-wrap: anywhere; hyphens: auto; }
.card, .tile { min-width: 0; }

/* ---------- languages ---------- */
.lang-bar { background: var(--bordeaux-dark); color: #fff; font-size: .85rem; }
.lang-bar ul { list-style: none; margin: 0 auto; padding: 0 var(--pad); max-width: var(--wrap); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 2px; }
.lang-bar a { display: block; padding: 11px 10px; text-decoration: none; opacity: .78; border-bottom: 2px solid transparent; }
.lang-bar a:hover { opacity: 1; }
.lang-bar a[aria-current] { opacity: 1; font-weight: 600; border-bottom-color: var(--gold); }
.lang-bar a:focus-visible { outline-offset: -3px; }
.l-short { display: none; }
html[lang="zh-Hans"] { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif; }
html[lang="ja"] { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", sans-serif; }
html[lang="ko"] { --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif; }
html[lang="ko"] body { word-break: keep-all; }
html[lang="zh-Hans"] body, html[lang="ja"] body { line-break: strict; }
.lang-bar a[lang="zh-Hans"] { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
.lang-bar a[lang="ja"] { font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif; }
.lang-bar a[lang="ko"] { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }

/* ---------- category pages ---------- */
.cat-page { padding-top: 24px; padding-bottom: 64px; }
.cat-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: 8px 0 40px; }
.cat-intro img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--tan); }
.cat-lead { font-size: 1.1rem; max-width: 62ch; }
.cat-sub { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.points { margin: 0 0 1em; padding-left: 1.2em; }
.points li { margin-bottom: .3em; }
.cat-count { color: var(--bordeaux); font-weight: 600; font-size: .9rem; margin: 0; }
.cat-list h2 { margin-bottom: 20px; }
.cat-more { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.cat-more h2 { margin-bottom: .2em; font-size: 1.2rem; }
.cat-more p { margin: 0; color: var(--muted); }
.cat-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-list .grid { padding-bottom: 40px; }

/* ---------- request form ---------- */
.req { padding-top: 8px; }
.contact .req { padding-top: 48px; }
.req-p { max-width: 62ch; color: #333; }
.req-form { display: grid; gap: 18px; max-width: 660px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); position: relative; }
.fld { display: grid; gap: 6px; }
.req-form label { font-size: .9rem; font-weight: 600; }
.req-form input[type=text], .req-form input[type=email], .req-form input[type=tel], .req-form select, .req-form textarea { font: 1rem var(--font); color: var(--ink); background: #fff; border: 1px solid #9a9d92; border-radius: 8px; min-height: 44px; padding: 10px 12px; width: 100%; }
.req-form textarea { min-height: 140px; resize: vertical; }
.req-form [aria-invalid="true"] { border-color: #b3261e; }
.opt-tag { font-weight: 400; color: var(--muted); }
.err { color: #b3261e; font-size: .85rem; margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.consent input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--bordeaux); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--muted); font-size: .85rem; margin: 0; }
.form-status { margin: 0; padding: 12px 16px; border-radius: 8px; }
.form-status[hidden] { display: none; }
.form-status.is-ok { background: #e8f3e8; border-left: 4px solid #2e7d32; }
.form-status.is-err { background: #fdecea; border-left: 4px solid #b3261e; }
.req-form .btn { justify-self: start; }

/* footer categories / 404 */
.foot-cats { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-cats a { display: inline-block; padding: 4px 0; }
.nf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

@media (max-width: 900px) { .cat-intro { grid-template-columns: 1fr; } .cat-intro img { order: -1; } }
@media (max-width: 640px) {
  .lang-bar ul { justify-content: center; padding: 0 8px; }
  .lang-bar a { padding: 12px 10px; min-width: 44px; text-align: center; }
  .l-full { display: none; }
  .l-short { display: inline; }
  .req-form .btn { justify-self: stretch; }
}

/* category illustration used while a product has no photo */
.is-art { position: relative; background: var(--tan); }
.card-media.is-art img { background: var(--tan); }
.main-img.is-art { display: block; }
.main-img.is-art img { width: 100%; height: 100%; object-fit: contain; }
.ph-note { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: .75rem; color: var(--muted); }
.main-img.is-art .ph-note { font-size: .9rem; bottom: 16px; }

.info .code { color: var(--muted); font-size: .85rem; margin: -.4em 0 1em; }
