/*
Theme Name: Torrefazione Coffee
Theme URI: https://monterossocoffee.com
Author: Monterosso Coffee Roasters
Description: A professional, conversion-focused block theme for coffee roasters and online coffee shops. It uses your existing menu and pages, works with WooCommerce, and everything (colors, fonts, header, footer, text and images) is editable from Appearance > Editor. No page builders and no custom JavaScript.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: torrefazione
Tags: block-theme, e-commerce, full-site-editing, custom-colors, wide-blocks, one-column
*/

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
img { height: auto; max-width: 100%; }
.wp-site-blocks > * + * { margin-block-start: 0; }
:where(.wp-site-blocks) > main { min-height: 40vh; }
:focus-visible { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 2px; }

/* ---- Header ---- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 100; background: var(--wp--preset--color--base); box-shadow: 0 1px 0 var(--wp--preset--color--border); }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
.tf-announce { font-size: .8125rem; letter-spacing: .03em; }
.tf-announce p { margin: 0; }
.tf-announce a { color: var(--wp--preset--color--gold); text-decoration: underline; }
.tf-header__row { gap: 1rem 2rem; max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; padding-inline: var(--wp--preset--spacing--50); }
.tf-header .wp-block-navigation a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.tf-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }

/* ---- Text helpers ---- */
.tf-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--wp--preset--color--accent-dark); margin-bottom: .4rem; }
.has-dark-background-color .tf-eyebrow { color: var(--wp--preset--color--gold); }
.has-accent-background-color .tf-eyebrow { color: #fff; }
.tf-center, .tf-section--center .tf-eyebrow { text-align: center; }
.tf-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }
.tf-muted { color: var(--wp--preset--color--muted); }
.tf-small { font-size: .875rem; opacity: .85; }
.has-dark-background-color .tf-muted { color: #CDBFB1; }

/* ---- Hero ---- */
.tf-hero { overflow: hidden; }
.tf-hero__cols { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; gap: 2rem; }
.tf-hero__title { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); }
.tf-hero__img img { width: 100%; border-radius: 22px 22px 22px 120px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%); mask-image: linear-gradient(90deg, transparent 0, #000 22%); }
@media (max-width: 781px) { .tf-hero__img img { -webkit-mask-image: none; mask-image: none; border-radius: 18px; } }

/* ---- Trust ---- */
.tf-trust .wp-block-columns { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; gap: 1rem 2rem; }
.tf-trust__item { margin: 0; font-size: .9rem; color: var(--wp--preset--color--muted); line-height: 1.45; }
.tf-trust__item strong { color: var(--wp--preset--color--contrast); font-size: .95rem; }

/* ---- Sections ---- */
.tf-section > .wp-block-columns, .tf-section > .wp-block-details, .tf-section > .wp-block-heading, .tf-section > ul.products, .tf-section > .woocommerce { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; }
.tf-section { padding-inline: var(--wp--preset--spacing--50); }
.tf-section--center .wp-block-buttons { justify-content: center; }
.tf-origins { gap: 1.5rem; margin-top: 2.5rem; }
.tf-origin__img img { border-radius: 16px; width: 100%; }
.tf-origins h3 { margin-top: .5rem; }
.tf-btn-sm .wp-block-button__link { padding: .6rem 1.2rem; font-size: .75rem; }

/* Outline buttons */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--wp--preset--color--accent); border: 2px solid var(--wp--preset--color--accent); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }
.has-dark-background-color .is-style-outline .wp-block-button__link, .has-accent-background-color .is-style-outline .wp-block-button__link { color: inherit; border-color: currentColor; }
.has-dark-background-color .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--dark); border-color: var(--wp--preset--color--base); }
.has-accent-background-color .is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--on-accent); color: var(--wp--preset--color--accent-dark); }
.tf-btn-light .wp-block-button__link { background: var(--wp--preset--color--base); color: var(--wp--preset--color--dark); }
.tf-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--on-accent); color: var(--wp--preset--color--accent-dark); }

/* ---- Private label ---- */
.tf-pl > .wp-block-columns { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; gap: 3rem; }
.tf-illus img { width: 100%; height: auto; display: block; }
.tf-round img { border-radius: 50%; width: 100%; max-width: 460px; margin-inline: auto; display: block; box-shadow: 0 0 0 8px rgba(217,179,106,.25); }
.tf-checks { list-style: none; padding: 0; margin: 1.25rem 0; }
.tf-checks li { padding-left: 1.9rem; position: relative; margin-bottom: .45rem; font-weight: 600; }
.tf-checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 1.05rem; height: .55rem; border-left: 3px solid var(--wp--preset--color--gold); border-bottom: 3px solid var(--wp--preset--color--gold); transform: rotate(-45deg) translateY(-30%); }
.tf-steps { gap: 1.5rem; margin-top: 3.5rem; }
.tf-step { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 1.75rem; height: 100%; }
.tf-step__n { font-family: var(--wp--preset--font-family--heading); font-size: 2.6rem; line-height: 1; color: var(--wp--preset--color--gold); margin: 0 0 .5rem; }
.tf-step__d { margin: 0; color: #E4D8CB; }

/* ---- Story / subscriptions / page heads ---- */
.tf-story__cols, .tf-sub__cols, .tf-contact__cols { gap: 3rem; }
.tf-story__img img { border-radius: 200px 200px 16px 16px; width: 100%; }
.tf-pagehead { padding-inline: var(--wp--preset--spacing--50); }
.tf-pagehead > * { max-width: var(--wp--style--global--wide-size, 1200px); }
.tf-card { border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding-inline: 32px; }

/* ---- FAQ ---- */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--border); padding: 1rem 0; }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-size: 1.25rem; font-weight: 600; }
.wp-block-details[open] summary { color: var(--wp--preset--color--accent); }
.wp-block-details p { margin-top: .6rem; color: var(--wp--preset--color--muted); }

/* ---- CTA & footer ---- */
.tf-cta { padding-inline: var(--wp--preset--spacing--50); }
.tf-cta h2 { color: inherit; }
.tf-footer { padding-inline: var(--wp--preset--spacing--50); }
.tf-footer__cols { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; gap: 2rem; }
.tf-footer a { color: #E8C98E; text-decoration: none; }
.tf-footer a:hover { color: #fff; text-decoration: underline; }
.tf-footer h3 { font-size: 1.15rem; color: var(--wp--preset--color--gold); }
.tf-footer .wp-block-navigation a { color: #E8C98E; }
.tf-footer p { margin-block: .35rem; }
.tf-mobile-bar { display: none; }
@media (max-width: 700px) {
  .tf-mobile-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; box-shadow: 0 -4px 16px rgba(0,0,0,.25); }
  .tf-mobile-bar .wp-block-buttons { margin: 0; gap: .5rem; flex-wrap: nowrap; }
  .tf-mobile-bar .wp-block-button__link { padding: .6rem 1.2rem; font-size: .75rem; }
  .tf-footer { padding-bottom: 5rem; }
}

/* ---- Pages with a wider layout (cart, checkout, account, shop) ---- */
.woocommerce-cart .wp-block-post-content > *, .woocommerce-checkout .wp-block-post-content > *, .woocommerce-account .wp-block-post-content > * { max-width: var(--wp--style--global--wide-size, 1200px); }

/* ---- WooCommerce: cards, prices, buttons, forms ---- */
.woocommerce ul.products, .woocommerce-page ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; margin: 2rem 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: auto; float: none; margin: 0; background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding: 1rem; text-align: center; transition: box-shadow .2s ease, transform .2s ease; }
.woocommerce ul.products li.product:hover { box-shadow: 0 14px 34px rgba(42,24,16,.12); transform: translateY(-3px); }
.woocommerce ul.products li.product a img { border-radius: 10px; background: #fff; margin-bottom: .75rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; font-weight: 600; padding: .25rem 0; color: var(--wp--preset--color--contrast); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--wp--preset--color--accent); font-weight: 700; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt,
.wc-block-components-button:not(.is-link), .wp-block-woocommerce-cart .wc-block-cart__submit-button { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; padding: .85rem 1.6rem; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--accent-dark); color: var(--wp--preset--color--on-accent); }
.woocommerce span.onsale { background: var(--wp--preset--color--teal); color: #fff; border-radius: 999px; min-height: 0; min-width: 0; line-height: 1; padding: .5rem .8rem; }
.woocommerce-message, .woocommerce-info { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast); border-top-color: var(--wp--preset--color--accent); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--wp--preset--color--accent); }
.woocommerce div.product .product_title { font-size: var(--wp--preset--font-size--x-large); }
.woocommerce div.product form.cart .variations select { min-width: 200px; }
.woocommerce-tabs ul.tabs li { background: var(--wp--preset--color--surface); border-color: var(--wp--preset--color--border); }
.woocommerce-tabs ul.tabs li.active { background: var(--wp--preset--color--base); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select, textarea { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border: 1px solid var(--wp--preset--color--border); border-radius: 8px; padding: .65rem .8rem; }
.wc-block-components-text-input input { border-radius: 8px; }

/* ---- Illustrations ---- */
.tf-branch { width: 110px; margin-inline: auto; margin-bottom: .5rem; }
.tf-branch img { width: 100%; }
.tf-sub__img img { max-width: 280px; margin-left: auto; display: block; }
@media (max-width: 781px) { .tf-sub__img img { margin-inline: auto; max-width: 220px; } }
.tf-hero, .tf-pl, .tf-pagehead { background-image: url("assets/images/pattern-beans.svg"); background-size: 200px 200px; }
.tf-section.tf-faq > .wp-block-details, .tf-section.tf-faq > .wp-block-heading { max-width: 820px; }
.tf-faq .tf-eyebrow { text-align: center; }

/* Side padding for full-width sections (keeps text off the screen edges on phones) */
.tf-hero, .tf-pl, .tf-trust, .tf-sub, .tf-faq { padding-inline: var(--wp--preset--spacing--50); }
.tf-footer > .wp-block-separator, .tf-footer > .tf-small { max-width: var(--wp--style--global--wide-size, 1200px); }
.tf-announce { padding-inline: var(--wp--preset--spacing--40); }

/* ---- Italian touches ---- */
/* Striped cafe awning under the announcement bar */
.tf-awning { height: 18px; margin: 0; background: repeating-linear-gradient(90deg, #B5482A 0 32px, #EBD9B4 32px 64px);
  -webkit-mask-image: linear-gradient(#000, #000), radial-gradient(circle at 16px 2px, #000 15px, transparent 16px);
  -webkit-mask-size: 100% 4px, 32px 18px; -webkit-mask-repeat: no-repeat, repeat-x; -webkit-mask-position: 0 0, 0 0;
  mask-image: linear-gradient(#000, #000), radial-gradient(circle at 16px 2px, #000 15px, transparent 16px);
  mask-size: 100% 4px, 32px 18px; mask-repeat: no-repeat, repeat-x; mask-position: 0 0, 0 0; }
/* Majolica tile band */
.tf-tiles { height: 48px; margin: 0; background: url("assets/images/tile-majolica.svg") repeat-x center / 48px 48px; box-shadow: inset 0 3px 0 var(--wp--preset--color--teal), inset 0 -3px 0 var(--wp--preset--color--teal); }
/* Italic accent words in headings */
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--wp--preset--color--accent); }
.has-dark-background-color h1 em, .has-dark-background-color h2 em { color: var(--wp--preset--color--gold); }
/* Double-line frames, like old Italian posters */
.tf-story__img img, .tf-phil__img img { box-shadow: 0 0 0 6px var(--wp--preset--color--base), 0 0 0 8px var(--wp--preset--color--accent); margin: 10px; width: calc(100% - 20px); border-radius: 16px; }
.tf-card, .tf-step { outline: 1px solid rgba(217,179,106,.45); outline-offset: -8px; }
.tf-card { outline-color: rgba(181,72,42,.25); }
/* Philosophy section */
.tf-phil > .wp-block-columns { max-width: var(--wp--style--global--wide-size, 1200px); margin-inline: auto; gap: 3rem; }
.tf-phil__close { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--wp--preset--color--border); padding-top: clamp(32px, 5vw, 56px); }
.tf-phil__close > * { margin-inline: auto; }
.tf-olive { width: 90px; margin-inline: auto; margin-bottom: .25rem; }
.tf-olive img { width: 100%; }
.tf-seal { width: 150px; margin-inline: auto; }
.tf-seal img { width: 100%; }
.tf-tagline { max-width: 640px; color: var(--wp--preset--color--muted); }
.tf-tagline strong { color: var(--wp--preset--color--contrast); font-family: var(--wp--preset--font-family--heading); font-size: 1.2rem; }
.tf-phil { padding-top: 0 !important; }
.tf-tiles + .tf-phil, .tf-phil { padding-inline: var(--wp--preset--spacing--50); }
