@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 200 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 200 800; font-style: italic; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-wght-italic.woff2) format('woff2'); }
/* Stile "Morbido": bianco, grigi freddi, rosso Doparà #E22120, Plus Jakarta Sans, angoli arrotondati */
:root {
  --text: #3f3f46;
  --ink: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #a1a1aa;
  --bg: #ffffff;
  --bg-soft: #f4f4f5;
  --accent: #e22120;
  --accent-dark: #c41b1a;
  --footer-bg: #18181b;
  --heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-img: 16px;
  --radius-box: 12px;
  --radius-pill: 999px;
  --page-width: 1200px;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-width { max-width: var(--page-width); margin: 0 auto; padding: 0 5rem; }
.section { padding-top: 36px; padding-bottom: 36px; }
.page-narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.caption { font-size: 12.5px; line-height: 1.6; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: 8px 14px; z-index: 100; border-radius: var(--radius-pill); }
.hp { position: absolute; left: -9999px; }
.title { font-size: 40px; margin: 0 0 12px; }
.link-underline { color: var(--ink); text-underline-offset: 3px; font-size: 15px; }

/* Bottoni */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: #fff; font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background-color .15s, box-shadow .15s, transform .15s; }
.button:hover { background: var(--accent-dark); }
.button:active { transform: translateY(1px); }
.button--secondary { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button--secondary:hover { background: var(--ink); color: #fff; }
.button--full-width { width: 100%; }
.button:disabled, .button:disabled:hover { cursor: not-allowed; opacity: .45; background: var(--bg-soft); color: var(--muted); box-shadow: none; }
.button--banner { background: #fff; color: var(--ink); box-shadow: none; }
.button--banner:hover { background: var(--bg-soft); color: var(--ink); }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* Header */
.announcement-bar { background: var(--ink); color: #fafafa; text-align: center; font-size: 13px; font-weight: 500; padding: 8px 16px; }
.header-wrapper { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header { display: flex; align-items: center; gap: 40px; padding-top: 16px; padding-bottom: 16px; }
.header__heading-link { flex: none; }
.header__heading-logo { width: 120px; height: auto; display: block; }
.header__search-bar { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; background: var(--bg-soft); border-radius: var(--radius-pill); padding: 0 22px; height: 50px; color: var(--muted); border: 1px solid transparent; transition: border-color .15s, background-color .15s; }
.header__search-bar:focus-within { background: #fff; border-color: var(--line-strong); }
.header__search-bar svg { width: 18px; height: 18px; flex: none; }
.header__search-bar input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 15px var(--body); color: var(--ink); outline: none; }
.header__icons { flex: none; display: flex; align-items: center; gap: 6px; margin-right: -10px; }
.header__catbar { border-top: 1px solid var(--line); }
.header__catbar-inner { display: flex; justify-content: flex-start; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.header__catbar-inner::-webkit-scrollbar { display: none; }
.header__catbar-inner > :first-child { margin-left: auto; }
.header__catbar-inner > :last-child { margin-right: auto; }
.header__cat { white-space: nowrap; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 12px 14px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.header__cat:hover { color: var(--ink); border-color: var(--line); }
.header__cat--lead { color: var(--ink); font-weight: 600; }
.header__cat.is-active { color: var(--ink); font-weight: 700; border-color: var(--accent); }
.header__cat--sale { color: var(--accent); font-weight: 700; }
.header__cat--sale:hover { color: var(--accent); border-color: var(--accent); }
.header__catbar-sep { flex: none; width: 1px; background: var(--line); margin: 12px 8px; }
.header__icons summary, .header__icon { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); position: relative; border-radius: 50%; transition: background-color .15s; }
.header__icons summary:hover, .header__icon:hover { background: var(--bg-soft); }
.header__icons summary::-webkit-details-marker, .menu-drawer summary::-webkit-details-marker { display: none; }
.cart-count-bubble { position: absolute; top: 2px; right: 0; background: var(--accent); color: #fff; border-radius: var(--radius-pill); min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.menu-drawer { display: none; }

/* Banner */
.banner { position: relative; min-height: 520px; display: flex; align-items: flex-end; overflow: hidden; background: #2a2a2a; }
.banner__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); }
.banner--plain { min-height: 320px; background: var(--ink); }
.banner--plain::after { display: none; }
.banner__content { position: relative; z-index: 1; width: 100%; padding-bottom: 48px; }
.banner__heading { color: #fff; font-size: 48px; margin: 0 0 20px; max-width: 14ch; }
.banner--center { min-height: 420px; align-items: center; text-align: center; }
.banner--center .banner__content { padding-bottom: 0; }
.banner--center .banner__heading { max-width: none; margin-bottom: 12px; }
.banner__text { color: #fff; margin: 0 0 24px; font-size: 17px; }

/* Testo */
.rich-text h1 { font-size: 40px; margin: 0 0 16px; }
.rte { line-height: 1.7; }
.rte p { margin: 0 0 14px; }
.rte strong { color: var(--ink); }
.rte h2 { font-size: 24px; margin: 28px 0 12px; }
.rte h3 { font-size: 18px; margin: 24px 0 8px; }
.rte ul { padding-left: 20px; margin: 0 0 16px; }
.rte li { margin-bottom: 4px; }
.rte a { color: var(--ink); }
.section-header { margin-bottom: 24px; }
.section-header p { margin: 0; }

/* Griglia prodotti */
.product-grid { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
.card-wrapper { display: flex; flex-direction: column; height: 100%; }
.card__media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--bg-soft); overflow: hidden; border-radius: var(--radius-img); transition: transform .25s ease, box-shadow .25s ease; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-wrapper:hover .card__media { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(24, 24, 27, .1); }
.card-wrapper:hover .card__media img { transform: scale(1.03); }
.card__placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 16px; text-align: center; font-family: var(--heading); font-weight: 700; color: var(--muted); background: var(--bg-soft); border-radius: inherit; }
.card__placeholder--large { aspect-ratio: 4 / 5; font-size: 24px; border-radius: var(--radius-img); }
.card__badge { position: absolute; left: 12px; top: 12px; }
.card__content { padding: 14px 2px 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.card__heading { font-size: 15px; font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.35; }
.card__heading a { text-decoration: none; }
.card__heading a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__vendor { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.card__form { margin: 0; }
.card__add { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 10px; border-radius: var(--radius-pill); border: 0; background: var(--ink); color: #fff; font: 600 14px/1 var(--body); cursor: pointer; transition: background-color .15s; }
.card__add svg { width: 16px; height: 16px; }
.card__add:hover { background: var(--accent); }
.card__add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card__add:disabled { padding: 0 12px; background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }
@media (max-width: 380px) { .card__add { height: 34px; padding: 0 10px 0 8px; font-size: 13px; } }

/* Prezzo e badge */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--ink); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price--large { font-size: 22px; margin: 16px 0 6px; align-items: center; }
.price-item--regular { color: var(--muted); font-size: .82em; font-weight: 400; }
.price--on-sale .price-item:not(.price-item--regular) { color: var(--accent); }
.badge { display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge--sale { background: var(--accent); color: #fff; }
.badge--sold { background: var(--ink); color: #fff; }

/* Collezioni */
.collection-hero__title { font-size: 40px; margin: 0 0 8px; }
.collection-hero__description { margin: 0 0 24px; }
.facets { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 16px; margin-bottom: 28px; background: var(--bg-soft); border-radius: var(--radius-box); font-size: 14px; }
.facets .button { min-height: 38px; padding: 0 18px; font-size: 14px; }
.facets label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.facets select { font: inherit; padding: 8px 42px 8px 18px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2371717a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center / 12px 8px; border-radius: var(--radius-pill); color: var(--ink); -webkit-appearance: none; appearance: none; cursor: pointer; }
.facets select:hover { border-color: var(--line-strong); }
.product-count { margin-left: auto; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); border-radius: var(--radius-pill); padding: 0 6px; }
.pagination a:hover { background: var(--bg-soft); }
.pagination .current { background: var(--ink); color: #fff; font-weight: 600; }
.empty { padding: 48px 0; }
.collection-list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.collection-tile { display: flex; align-items: flex-end; min-height: 120px; padding: 20px; background: var(--footer-bg); color: #fff; text-decoration: none; font-family: var(--heading); font-weight: 700; font-size: 18px; border-radius: var(--radius-img); transition: transform .2s, box-shadow .2s; }
.collection-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(24, 24, 27, .12); }
.collection-tile small { font-family: var(--body); font-weight: 400; opacity: .6; font-size: 13px; margin-left: 4px; }
.collection-tile--light { background: var(--bg-soft); color: var(--ink); }
.collection-tile:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq { max-width: 900px; }
.faq { display: grid; gap: 10px; }
.accordion { background: var(--bg-soft); border-radius: var(--radius-box); padding: 0 20px; }
.accordion summary { cursor: pointer; padding: 16px 0; font-family: var(--heading); font-weight: 600; color: var(--ink); font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-weight: 400; font-size: 20px; line-height: 1; }
.accordion[open] summary::after { content: '–'; }
.accordion .rte { padding-bottom: 12px; }

/* Newsletter */
.newsletter-section { background: var(--bg-soft); padding: 56px 0; margin: 36px auto; max-width: calc(var(--page-width) - 6rem); border-radius: 24px; }
.newsletter-form { max-width: 440px; margin: 16px auto 0; text-align: left; }
.newsletter-form .field { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-pill); padding: 4px; }
.newsletter-form input[type=email] { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; font: inherit; background: transparent; color: inherit; outline: none; }
.newsletter-form button { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; color: #fff; display: grid; place-items: center; }
.newsletter-form button:hover { background: var(--accent-dark); }
.newsletter-form__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin-top: 8px; line-height: 1.5; }
.newsletter-form__consent a { color: inherit; }
.newsletter-form--dark { margin: 12px 0 0; }
.newsletter-form--dark .field { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, 0.2); }

/* Prodotto */
.product { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 0 5rem; padding-top: 36px; padding-bottom: 48px; align-items: start; }
.product__media-list { display: grid; gap: 8px; }
.product__media-list { gap: 12px; }
.product__media-list img { width: 100%; background: var(--bg-soft); border-radius: var(--radius-img); }
.product__info { position: sticky; top: 100px; }
.product__text { text-transform: uppercase; color: var(--muted); margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.product__title { font-size: 40px; margin: 4px 0 12px; }
.product__vendor { margin: 0; }
.product__tax { margin: 0 0 24px; }
.product__tax a { color: inherit; }
.product-form { display: grid; gap: 10px; margin-bottom: 28px; max-width: 440px; }
.product-form form { margin: 0; }
.product__description { font-size: 15px; }
.product__shipping { font-size: 14px; color: var(--ink); background: var(--bg-soft); border-radius: var(--radius-box); padding: 14px 16px; }

/* Carrello */
.cart__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cart-items { width: 100%; border-collapse: collapse; }
.cart-items th { text-align: left; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-items td { padding: 24px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.cart-items .right { text-align: right; }
.cart-item__media { width: 120px; padding-right: 24px !important; }
.cart-item__media img, .cart-item__media .card__placeholder { width: 100px; aspect-ratio: 4 / 5; object-fit: cover; font-size: 11px; border-radius: var(--radius-box); }
.cart-item__name { text-decoration: none; font-family: var(--heading); font-weight: 700; font-size: 16px; }
.cart__footer { max-width: 380px; margin: 32px 0 0 auto; text-align: right; }
.cart__footer .totals { display: flex; justify-content: flex-end; gap: 16px; color: var(--ink); font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.cart__footer .caption { margin: 0 0 4px; }
.cart__footer form { margin-top: 18px; }
.cart--empty { text-align: center; padding: 48px 0; }
.cart--empty p { font-family: var(--heading); font-weight: 700; color: var(--ink); font-size: 28px; }

/* Messaggi */
.flash { padding: 12px 16px; margin: 0 0 20px; border: 1px solid; border-radius: var(--radius-box); font-size: 15px; }
.flash-ok { background: #f2f8f3; border-color: #b9d8bf; color: #2c5e36; }
.flash-error { background: #fdf1f1; border-color: #f0c2c1; color: #9e1716; }
.flash-info { background: var(--bg-soft); border-color: var(--line); }

/* Footer */
.footer { background: var(--footer-bg); color: rgba(255, 255, 255, 0.72); margin-top: 64px; font-size: 14px; border-radius: 28px 28px 0 0; }
.footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 40px; }
.footer-block__heading { color: #fff; font-size: 18px; margin: 0 0 16px; }
.footer-block__links { list-style: none; padding: 0; margin: 0; line-height: 2.2; }
.footer-block p { margin: 0 0 12px; }
.footer__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 24px; padding-bottom: 32px; }
.footer-block--newsletter { flex: 0 1 360px; }
.footer__social { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; }
.footer__social a { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.footer__social a:hover { background: rgba(255, 255, 255, .14); }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 20px 0; font-size: 11px; text-align: center; }
.footer__bottom p { margin: 0; }

@media (max-width: 989px) {
  .page-width { padding-left: 1.5rem; padding-right: 1.5rem; }
  .section { padding-top: 24px; padding-bottom: 32px; }
  .header { display: grid; grid-template-columns: 1fr auto 1fr; padding-top: 10px; padding-bottom: 12px; gap: 8px 8px; }
  .header__heading-link { justify-self: center; }
  .header__heading-logo { width: 100px; }
  .header__icons { justify-self: end; }
  .header__search-bar { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; height: 44px; padding: 0 16px; }
  .header__search-bar input { font-size: 16px; }
  .header__catbar { border-top: 0; }
  .header__catbar-inner { gap: 8px; padding-bottom: 12px; }
  .header__catbar-inner > :first-child { margin-left: 0; }
  .header__cat, .header__cat--lead { font-size: 13px; font-weight: 500; padding: 7px 13px; border: 0; border-radius: var(--radius-pill); background: var(--bg-soft); color: var(--text); }
  .header__cat.is-active { background: var(--ink); color: #fff; font-weight: 600; }
  .header__cat--sale, .header__cat--sale:hover { background: #fdecec; color: var(--accent); font-weight: 700; }
  .header__catbar-sep { display: none; }
  .menu-drawer { display: block; }
  .menu-drawer summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; color: var(--ink); }
  .menu-drawer nav { position: absolute; left: 8px; right: 8px; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 40px rgba(24, 24, 27, .14); display: flex; flex-direction: column; padding: 10px; max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .menu-drawer nav a { padding: 12px 14px; font-size: 17px; font-weight: 500; text-decoration: none; color: var(--ink); border-radius: var(--radius-box); }
  .menu-drawer nav a:hover { background: var(--bg-soft); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .card__heading { font-size: 14px; }
  .newsletter-section { margin-left: 1rem; margin-right: 1rem; padding: 40px 0; }
  .footer { border-radius: 20px 20px 0 0; }
  .collection-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product { grid-template-columns: 1fr; gap: 24px; padding-top: 0; }
  .product .product__media-list { margin: 0; }
  .product__info { position: static; }
  .title, .collection-hero__title, .rich-text h1, .product__title, .banner__heading { font-size: 30px; }
  .facets { padding: 12px 14px; }
  .banner { min-height: 400px; }
  .banner--center { min-height: 340px; }
  .footer__blocks { grid-template-columns: 1fr; }
  .footer__row { flex-direction: column; align-items: flex-start; }
  .product-count { margin-left: 0; width: 100%; }
  .cart-item__media { width: 90px; }
  .cart-item__media img, .cart-item__media .card__placeholder { width: 74px; }
  .cart__footer { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card-wrapper:hover .card__media, .card-wrapper:hover .card__media img, .collection-tile:hover { transform: none; }
}

/* Modulo contatti / vendi i tuoi libri */
.contact-form { margin-top: 40px; padding: 28px; background: var(--bg-soft); border-radius: 24px; }
.contact-form h2 { font-size: 24px; margin: 0 0 16px; }
.contact-form form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=tel], .contact-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 16px; font: inherit; font-weight: 400; color: inherit; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form__consent { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 13px !important; line-height: 1.5; }
.contact-form__consent a { color: inherit; }
.contact-form__hint { font-size: 13px; margin: 0; color: var(--muted, #71717a); }
.contact-form .button { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 749px) { .contact-form { padding: 20px; margin-left: -4px; margin-right: -4px; } .contact-form__row { grid-template-columns: 1fr; } }

/* Mobile: foto del libro in un carosello orizzontale, così titolo e prezzo restano subito visibili */
@media (max-width: 749px) {
  .product .product__media-list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -1.5rem; padding: 12px 1.5rem 0; scrollbar-width: none; }
  .product .product__media-list::-webkit-scrollbar { display: none; }
  .product .product__media-list img { flex: 0 0 82%; width: 82%; scroll-snap-align: center; aspect-ratio: 3 / 4; object-fit: cover; }
  .product .product__media-list img:only-child { flex-basis: 100%; width: 100%; }
}

/* Testo descrittivo della collezione, sotto i libri */
.collection-text { max-width: 780px; margin: 48px auto 0; padding-top: 32px; border-top: 1px solid var(--line); }

/* Blog */
.blog-grid { list-style: none; padding: 0; margin: 24px 0 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.blog-card { display: block; color: inherit; text-decoration: none; }
.blog-card img, .blog-card__placeholder { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-img); background: var(--bg-soft); margin-bottom: 14px; transition: transform .2s; }
.blog-card:hover img { transform: translateY(-2px); }
.blog-card__date { display: block; margin-bottom: 6px; }
.blog-card__title { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.blog-card:hover .blog-card__title { text-decoration: underline; text-underline-offset: 3px; }
.blog-card__excerpt { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.article__image { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-img); margin: 8px 0 28px; }
.article .rte img { max-width: 100%; height: auto; border-radius: var(--radius-img); margin: 12px 0; }
.article__back { margin-top: 40px; }
@media (max-width: 989px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .blog-grid { grid-template-columns: 1fr; } }

/* Icone nei riquadri delle categorie */
.collection-tile--icon { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 140px; }
.tile-icon { width: 48px; height: 48px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-icon .a { stroke: var(--accent); }
.tile-icon .af { fill: var(--accent); stroke: none; }
.tile-icon text { fill: #fff; stroke: none; font: 800 7px var(--heading); }
.collection-tile--light:hover { background: #ececee; }

/* Illustrazione in cima alla collezione */
.collection-hero--art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: center; margin-bottom: 24px; }
.collection-hero--art .collection-hero__description { margin-bottom: 0; }
.collection-hero__art { width: 100%; height: auto; border-radius: var(--radius-img); background: #f3efe6; }
@media (max-width: 749px) {
  .collection-hero--art { grid-template-columns: 1fr; gap: 16px; }
  .collection-hero__art { order: -1; max-height: 260px; object-fit: cover; }
}

/* Codice sconto nel carrello */
.inline-form, .cart__footer .inline-form { display: inline; margin: 0; }
.cart__footer .totals--discount { font-size: 15px; font-weight: 400; align-items: baseline; }
.cart__footer .totals--discount strong { font-weight: 700; }
.discount-error { color: var(--accent-dark); font-size: 14px; margin: 0 0 8px; text-align: right; }
.discount-form, .cart__footer .discount-form { display: flex; gap: 8px; justify-content: flex-end; margin: 12px 0 16px; }
.discount-form input { flex: 0 1 220px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 10px 16px; font: inherit; font-size: 15px; text-transform: uppercase; }
.discount-form .button { padding-inline: 20px; }

/* Altri libri dello stesso autore */
.related { border-top: 1px solid var(--line); }
.related .title { margin-bottom: 24px; }
.related__more { text-align: center; margin: 0; }
@media (max-width: 749px) { .related .product-grid li:nth-child(n+5) { display: none; } }

/* Avvisami quando arriva */
.alert-form { margin-top: 16px; padding: 16px; background: var(--bg-soft); border-radius: var(--radius-box); }
.page-width > .alert-form { max-width: 560px; margin: 0 auto 32px; }
.alert-form__title { margin: 0 0 10px; font-weight: 600; color: var(--ink); font-size: 15px; }
.alert-form__row { display: flex; gap: 8px; }
.alert-form__row input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; font-size: 16px; background: #fff; }
.alert-form__row .button { flex: none; min-height: 44px; padding: 0 20px; }
.alert-form__consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12px; color: var(--muted); }
.alert-form__consent input { margin-top: 2px; }

/* Buono regalo */
.gift-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.6; max-width: 360px; margin: 0 auto 28px; padding: 22px 24px; border-radius: 18px; background: var(--ink); color: #fff; box-shadow: 0 18px 40px rgba(24, 24, 27, .18); overflow: hidden; }
.gift-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: var(--accent); opacity: .9; }
.gift-card__label { position: relative; z-index: 1; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #a1a1aa; }
.gift-card__logo { font: 800 40px/1 var(--heading); letter-spacing: -.02em; }
.gift-card__amount { font-size: 14px; color: #d4d4d8; }
.gift-form { margin-top: 24px; display: grid; gap: 14px; }
.gift-form label { display: grid; gap: 6px; }
.gift-amounts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gift-amounts legend { margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.gift-amount { display: inline-flex !important; align-items: center; gap: 6px; cursor: pointer; }
.gift-amount input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.gift-amount span { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; font-weight: 600; color: var(--ink); }
.gift-amount input[type=radio]:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.gift-amount input[type=radio]:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gift-amount--other input[type=number] { width: 84px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; font-size: 16px; }
.gift-hint { font-weight: 400; color: var(--muted); }
.gift-form textarea { min-height: 90px; }
.gift-form .button { justify-self: stretch; }
/* Mobile: footer, filtri e schermi stretti (iPhone SE) */
@media (max-width: 989px) {
  .footer { margin-top: 40px; }
  .footer__blocks { gap: 28px; padding-top: 32px; }
  .footer-block--newsletter { flex: none; width: 100%; }
  .footer__row { gap: 20px; padding-top: 28px; padding-bottom: 24px; }
  .newsletter-section { margin-left: 1.5rem; margin-right: 1.5rem; }
  .facets { gap: 10px 16px; }
  .facets .facet-sort { width: 100%; }
  .facets .facet-sort select { flex: 1; min-width: 0; padding-left: 14px; padding-right: 36px; background-position: right 14px center; }
}
@media (max-width: 400px) {
  .page-width { padding-left: 1rem; padding-right: 1rem; }
  .newsletter-section { margin-left: 1rem; margin-right: 1rem; }
  .product-grid { gap: 24px 12px; }
  .product .product__media-list { margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 359px) {
  .card__footer { flex-wrap: wrap; }
  .card__add { width: 100%; justify-content: center; }
}

/* Landing "Vendi i tuoi libri usati" */
.sell-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 16px; }
.sell-hero .caption { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--accent); font-weight: 600; }
.sell-hero .title { margin: 0 0 16px; }
.sell-hero__lead { font-size: 18px; line-height: 1.55; margin: 0 0 24px; }
.sell-hero__img { width: 100%; height: auto; aspect-ratio: 1100 / 498; object-fit: cover; border-radius: var(--radius-img); background: var(--bg-soft); }
.sell-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.sell-steps li { background: var(--bg-soft); border-radius: var(--radius-box); padding: 22px; }
.sell-steps__n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 12px; }
.sell-steps h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.sell-steps p { margin: 0; }
.sell-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.sell-card { border: 1px solid var(--line); border-radius: var(--radius-box); padding: 24px; }
.sell-card h2 { margin: 0 0 12px; font-size: 22px; color: var(--ink); }
.sell-card--no { background: var(--bg-soft); border-color: transparent; }
.sell-card__label { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sell-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sell-chips li { padding: 6px 14px; border-radius: var(--radius-pill); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.sell-list { margin: 0; padding-left: 20px; line-height: 1.9; }
.sell-pay { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sell-pay li { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-box); padding: 18px 20px; }
.sell-pay strong { color: var(--ink); font-size: 16px; }
.sell-pay span { color: var(--muted); font-size: 14px; }
.sell .contact-form { margin-top: 0; }
.sell-mail { text-align: center; color: var(--muted); font-size: 14px; margin: 16px 0 0; }
@media (max-width: 989px) {
  .sell-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .sell-hero__img { order: -1; aspect-ratio: 16 / 9; }
  .sell-hero__lead { font-size: 16px; }
  .sell-hero .button { width: 100%; }
  .sell-steps, .sell-cols, .sell-pay { grid-template-columns: 1fr; gap: 12px; }
  .sell-steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 18px; }
  .sell-steps__n { grid-row: span 2; margin: 0; }
}

/* Avviso "Aggiunto al carrello" */
.cart-toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--radius-pill); font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: opacity .2s, transform .2s; white-space: nowrap; }
.cart-toast.is-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.cart-toast a { color: #fff; text-decoration: underline; margin-left: 6px; font-weight: 600; }
