/*
Theme Name: Yarn Magic
Theme URI: https://yarnmagic.net/
Author: Yarn Magic
Description: Tema WooCommerce leggero per Yarn Magic.
Version: 0.1.1
Text Domain: yarnmagic
*/

:root {
  --ym-cream: #fff8ed;
  --ym-paper: #fffdf8;
  --ym-ink: #35251f;
  --ym-red: #9f1725;
  --ym-red-dark: #76111b;
  --ym-ochre: #c98439;
  --ym-blue: #23586f;
  --ym-muted: #735f55;
  --ym-line: #eadbca;
  --ym-radius: 18px;
  --ym-shadow: 0 16px 42px rgba(67, 39, 25, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ym-ink);
  background: var(--ym-paper);
  font-family: ui-rounded, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--ym-red); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.ym-wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(234, 219, 202, .8);
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(14px);
}
.site-header__inner { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.ym-language-switcher { display: flex; gap: 5px; margin-left: auto; }
.ym-language-switcher a { border: 1px solid rgba(47, 88, 86, .22); border-radius: 999px; color: #2f5856; font-size: 12px; font-weight: 700; padding: 5px 8px; text-decoration: none; }
.ym-language-switcher a[aria-current="true"] { background: #2f5856; color: #fff; }
.ym-demo-notice { background: #fff4d8; border-left: 4px solid #c8892f; border-radius: 4px; padding: 10px 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ym-ink); text-decoration: none; }
.brand__mark { width: 42px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--ym-cream); }
.brand__name { font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ym-ink); font-weight: 650; text-decoration: none; }
.site-nav a:hover { color: var(--ym-red); }
.ym-cart { padding: 9px 14px; border-radius: 999px; background: var(--ym-red); color: white !important; }

.ym-hero { overflow: hidden; background: linear-gradient(135deg, #fff8ed 0%, #f7e3c7 100%); }
.ym-hero__grid { min-height: 590px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 68px; padding-block: 70px; }
.ym-kicker { color: var(--ym-red); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ym-hero h1 { max-width: 720px; margin: 10px 0 20px; font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.055em; }
.ym-hero p { max-width: 610px; color: var(--ym-muted); font-size: 1.18rem; }
.ym-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ym-button, .button, button, input[type="submit"] {
  display: inline-flex;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 21px;
  background: var(--ym-red);
  color: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.ym-button:hover, .button:hover { background: var(--ym-red-dark); color: #fff; }
.ym-button--quiet { border: 1px solid var(--ym-line); background: var(--ym-paper); color: var(--ym-ink); }
.ym-hero__image { width: min(100%, 500px); aspect-ratio: 1; justify-self: end; border-radius: 38% 62% 54% 46% / 44% 42% 58% 56%; object-fit: cover; box-shadow: var(--ym-shadow); }

.ym-section { padding-block: 86px; }
.ym-section--tint { background: var(--ym-cream); }
.ym-section__head { max-width: 720px; margin-bottom: 35px; }
.ym-section h2 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; letter-spacing: -.035em; }
.ym-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ym-card { padding: 28px; border: 1px solid var(--ym-line); border-radius: var(--ym-radius); background: var(--ym-paper); box-shadow: var(--ym-shadow); }
.ym-card h3 { margin-top: 0; }
.ym-card__dot { display: block; width: 15px; height: 15px; margin-bottom: 18px; border-radius: 50%; background: var(--ym-red); box-shadow: 22px 0 var(--ym-ochre), 44px 0 var(--ym-blue); }

.site-main { min-height: 65vh; }
.entry, .woocommerce { width: min(1180px, calc(100% - 40px)); margin: 56px auto 90px; }
.products { gap: 20px; }
.woocommerce ul.products li.product { padding: 16px; border: 1px solid var(--ym-line); border-radius: var(--ym-radius); background: white; }
.woocommerce ul.products li.product img { border-radius: 12px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ym-red); }

.site-footer { padding-block: 38px; border-top: 1px solid var(--ym-line); background: var(--ym-ink); color: #f9ecdc; }
.site-footer a { color: white; }

@media (max-width: 820px) {
  .ym-hero__grid { min-height: auto; grid-template-columns: 1fr; gap: 36px; padding-block: 54px; }
  .ym-hero__image { justify-self: start; width: min(100%, 420px); }
  .ym-benefits { grid-template-columns: 1fr; }
  .site-nav li:not(.ym-nav-shop):not(.ym-nav-cart) { display: none; }
  .brand__name { font-size: 1.08rem; }
}
