/*
Theme Name: Bottega (Storefront child)
Template: storefront
Description: Дочерняя тема магазина ebook bottegadeilibri.it (сайт 3): стиль "лавки" - кремовый фон, тёмно-зелёный и латунь, полки с обложками.
Version: 1.0.0
Text Domain: bottega
*/
:root {
  --ink: #1e2a25;
  --muted: #5f6b64;
  --paper: #f6f0e4;
  --card: #fffdf8;
  --line: #e2d8c4;
  --green: #23453a;
  --green-deep: #173028;
  --brass: #b0844a;
  --brass-light: #e3cfa6;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { background: var(--paper); color: var(--ink); font-family: var(--sans); }
h1, h2, h3, .site-title, .product_title, .woocommerce-loop-product__title { font-family: var(--serif); color: var(--ink); letter-spacing: 0; }
a { color: var(--green); }
a:hover { color: var(--brass); }

/* Полоса преимуществ (только правдивые) */
.bottega-bar { background: var(--green-deep); color: var(--brass-light); font-size: .8rem; }
.bottega-bar ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; list-style: none; margin: 0; padding: 7px 1em; }
.bottega-bar li::before { content: "\2713"; color: var(--brass); margin-right: 6px; font-weight: 700; }

/* Header */
.site-header { background: var(--green); border-bottom: 0; padding-top: 1.1em; color: #e9e2d2; }
.site-header a { color: #fff; }
.site-branding .site-title a { color: #fff; font-size: 1.75rem; font-weight: 700; }
.site-branding .site-title a::before { content: ""; display: inline-block; width: 1.1em; height: 1.1em; margin-right: .35em; vertical-align: -0.15em;
  background: url(favicon.svg) center / contain no-repeat; }
.site-branding .site-description { color: var(--brass-light); font-size: .85rem; font-style: italic; font-family: var(--serif); }
.site-search .widget_product_search input[type=search] { border-radius: 999px; background: #fffdf8; border: 0; }
.storefront-primary-navigation { background: var(--green-deep); }
.main-navigation ul.menu > li > a, .main-navigation ul.nav-menu > li > a { color: #f2ead9; font-weight: 600; padding: .85em .8em; font-size: .93rem; }
.main-navigation ul.menu > li > a:hover { color: var(--brass-light); }
.main-navigation ul.menu > li:first-child > a { padding-left: 0; }
.site-header-cart .cart-contents, .site-header-cart .cart-contents .amount { color: #fff; }
.site-header-cart .widget_shopping_cart { background: var(--card); }
.site-header-cart .widget_shopping_cart a { color: var(--green); }
.menu-toggle { color: #fff; border-color: rgba(255,255,255,.4); }
@media (min-width: 768px) { .storefront-primary-navigation .main-navigation { width: 78%; } .storefront-primary-navigation .site-header-cart { width: 20%; } }

/* Buttons */
button, input[type=button], input[type=submit], .button, .added_to_cart, .wc-block-components-button {
  background: var(--green); border-color: var(--green); color: #fff; border-radius: 4px; font-weight: 600;
}
button:hover, .button:hover, input[type=submit]:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
button.alt, .button.alt { background: var(--brass); border-color: var(--brass); }
button.alt:hover, .button.alt:hover { background: #95703d; border-color: #95703d; }
button[disabled], .button[disabled] { background: #b8b1a2 !important; border-color: #b8b1a2 !important; cursor: not-allowed; }

/* Сетка книг: обложки на "полке" */
.col-full { max-width: 1240px; }
ul.products, .site-main ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 26px 20px; margin: 0 0 1.5em; padding: 0; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product, .site-main ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; clear: none !important;
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 12px 14px; text-align: left; }
ul.products li.product a.woocommerce-LoopProduct-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); }
ul.products li.product img { aspect-ratio: 2 / 3; width: 100%; height: auto; object-fit: cover; background: #ece3d1; border-radius: 2px 5px 5px 2px;
  box-shadow: -3px 0 0 rgba(0,0,0,.08) inset, 0 6px 12px -6px rgba(0,0,0,.35); margin: 0 0 10px; padding: 0; transition: transform .15s ease; }
ul.products li.product:hover img { transform: rotate(-1.2deg) translateY(-2px); }
ul.products li.product .woocommerce-loop-product__title { font-size: .95rem; line-height: 1.3; font-weight: 700; padding: 0; margin: 0 0 3px;
  min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.libri-loop-author { display: block; color: var(--muted); font-size: .8rem; font-style: italic; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.products li.product .price { color: var(--green); font-weight: 700; font-size: 1rem; margin: auto 0 8px; display: block; }
ul.products li.product .button { width: 100%; text-align: center; margin: 0; padding: .45em .6em; font-size: .82rem; }
ul.products li.product .added_to_cart { display: block; text-align: center; font-size: .8rem; background: none; color: var(--green); padding: 4px 0 0; }

/* Single product */
.single-product div.product .woocommerce-product-gallery img { border-radius: 3px 8px 8px 3px; box-shadow: -5px 0 0 rgba(0,0,0,.07) inset, 0 14px 28px -10px rgba(0,0,0,.45); }
.single-product div.product .product_title { font-size: 2rem; line-height: 1.2; margin-bottom: .2em; }
.libri-author { font-size: 1.05rem; color: var(--muted); font-style: italic; margin-bottom: .8em; }
.single-product div.product p.price { color: var(--green); font-size: 1.7rem; font-weight: 700; }
.bottega-iva { color: var(--muted); font-size: .85rem; margin: -.8em 0 1em; }
.libri-fmt-badges { margin: .6em 0 1.2em; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.libri-fmt-badges span { border: 1px solid var(--brass); color: var(--green); background: var(--card); padding: 2px 10px; border-radius: 3px; font-size: .8rem; font-weight: 700; }
.libri-fmt-badges em { color: var(--muted); font-size: .85rem; font-style: normal; margin-left: 4px; }
.bottega-trust { list-style: none; margin: 1.2em 0; padding: 12px 14px; background: var(--card); border: 1px dashed var(--brass); border-radius: 6px; font-size: .88rem; }
.bottega-trust li { margin: 3px 0; }
.bottega-trust li::before { content: "\2713"; color: var(--brass); margin-right: 8px; font-weight: 700; }
.libri-details th { width: 38%; color: var(--muted); font-weight: 500; }
.libri-fmt-list { margin-left: 1.2em; }
.libri-faq details { border-bottom: 1px solid var(--line); padding: .6em 0; }
.libri-faq summary { cursor: pointer; font-weight: 600; }
.libri-faq p { margin: .5em 0 0; color: var(--muted); }

/* Checkout: оплата недоступна */
.libri-pay-off { background: #fbf3e2; border: 1px solid var(--brass-light); border-left: 4px solid var(--brass); padding: 14px 16px; border-radius: 6px; margin-bottom: 12px; line-height: 1.5; }
.libri-cart-note { color: var(--muted); font-size: .9rem; }

/* Homepage */
.bottega-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 32px 30px; margin: 0 0 2em; }
.bottega-hero h1 { font-size: 2.15rem; margin: 0 0 .35em; }
.bottega-hero p { color: var(--muted); margin: 0 0 1em; }
.bottega-hero form { display: flex; gap: 8px; }
.bottega-hero input[type=search] { flex: 1; border-radius: 4px; border: 1px solid var(--line); background: #fff; padding: .6em .9em; }
.bottega-hero-covers { display: flex; justify-content: center; align-items: flex-end; gap: 10px; border-bottom: 8px solid var(--brass); padding: 0 6px; }
.bottega-hero-covers img { width: 30%; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px 4px 4px 2px; box-shadow: 0 8px 16px -6px rgba(0,0,0,.45); }
.bottega-hero-covers img:nth-child(2) { width: 34%; }
.libri-section { margin: 2.4em 0; }
.libri-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; border-bottom: 1px solid var(--line); margin-bottom: 1em; position: relative; }
.libri-section-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 70px; height: 3px; background: var(--brass); }
.libri-section-head h2 { font-size: 1.5rem; margin: 0 0 .35em; }
.libri-section-head a { font-weight: 600; white-space: nowrap; }
.libri-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; padding: 0; list-style: none; margin: 0 0 2em; }
.libri-cats a { display: block; padding: 9px 12px; color: var(--ink); font-size: .92rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 4px; }
.libri-cats a:hover { border-left-color: var(--brass); color: var(--green); }
.libri-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; }
.libri-how > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.libri-how h3 { font-size: 1.1rem; margin: 0 0 .4em; color: var(--green); }
.libri-how p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { background: var(--green-deep); color: #c9d3cc; }
.site-footer a { color: #fff; }
.site-footer h2, .site-footer .widget-title { color: #fff; }
.bottega-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 1.5em; }
.bottega-footer-cols h3 { color: var(--brass-light); font-size: 1rem; margin: 0 0 .5em; }
.bottega-footer-cols ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.bottega-footer-cols li { margin: 4px 0; }
.libri-footer-links { list-style: none; margin: 0; padding: 0; }

@media (max-width: 767px) {
  .bottega-hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .bottega-hero-covers { display: none; }
  .bottega-hero h1 { font-size: 1.6rem; }
  ul.products, .site-main ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  ul.products li.product, .site-main ul.products li.product { padding: 8px 8px 10px; }
  .single-product div.product .product_title { font-size: 1.5rem; }
  .bottega-bar ul { gap: 2px 14px; font-size: .75rem; }
}
