/*
Theme Name: Chestii Handmade
Theme URI: https://example.com/chestii-handmade
Author: AV Pixel
Author URI: https://example.com
Description: Temă WooCommerce minimalistă, inspirată din Bucovina, creată pentru produse handmade, colecții sezoniere și produse realizate la comandă.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: chestii-handmade
Tags: e-commerce, woocommerce, handmade, custom-logo, custom-menu, featured-images, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --ch-green: #234a3a;
  --ch-green-2: #16382c;
  --ch-red: #a83232;
  --ch-red-2: #8d2929;
  --ch-cream: #f8f4ea;
  --ch-beige: #e9dfc9;
  --ch-soft-green: #e8efe8;
  --ch-text: #262522;
  --ch-muted: #6d6a63;
  --ch-white: #fffdfa;
  --ch-border: rgba(35, 74, 58, .14);
  --ch-radius: 18px;
  --ch-shadow: 0 14px 36px rgba(27, 48, 38, .08);
  --ch-heading: Georgia, 'Times New Roman', serif;
  --ch-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ch-text);
  background: var(--ch-cream);
  font-family: var(--ch-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ch-red); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(248, 244, 234, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(35, 74, 58, .08);
}
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 36px; aspect-ratio: 1; display: grid; place-items: center; transform: rotate(45deg); border: 3px solid var(--ch-red); box-shadow: inset 0 0 0 5px var(--ch-cream); background: var(--ch-green); flex: 0 0 auto; }
.brand-mark::before { content: ''; width: 10px; height: 10px; background: var(--ch-cream); border: 2px solid var(--ch-red); }
.custom-logo-link img { max-height: 52px; width: auto; }
.brand-copy { display: grid; line-height: 1.08; }
.brand-title { font-family: var(--ch-heading); font-size: 1.5rem; color: var(--ch-green-2); font-weight: 700; }
.brand-tagline { font-size: .72rem; color: var(--ch-muted); margin-top: 4px; }
.primary-nav ul { display: flex; align-items: center; justify-content: center; list-style: none; padding: 0; margin: 0; gap: 28px; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; font-weight: 700; color: var(--ch-green-2); position: relative; }
.primary-nav a::after { content: ''; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 2px; background: var(--ch-red); transition: .2s ease; }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { left: 0; right: 0; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ch-green-2); border: 1px solid transparent; background: transparent; cursor: pointer; position: relative; }
.icon-button:hover { background: var(--ch-white); border-color: var(--ch-border); color: var(--ch-red); }
.cart-count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; border-radius: 99px; background: var(--ch-red); color: #fff; display: grid; place-items: center; font-size: .68rem; font-weight: 800; padding: 0 4px; }
.mobile-menu-toggle { display: none; }
.search-panel { display: none; border-top: 1px solid var(--ch-border); padding: 14px 0; background: var(--ch-white); }
.search-panel.is-open { display: block; }
.search-panel form { display: flex; gap: 8px; }
.search-panel input[type='search'] { flex: 1; border: 1px solid var(--ch-border); background: #fff; border-radius: 999px; padding: 12px 16px; }

/* Buttons */
.ch-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px !important;
  padding: 0 22px !important;
  border: 1px solid var(--ch-red) !important;
  background: var(--ch-red) !important;
  color: #fff !important;
  font-weight: 800 !important;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.ch-button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: var(--ch-red-2) !important; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(168, 50, 50, .18); }
.ch-button--ghost { background: transparent !important; color: var(--ch-green-2) !important; border-color: rgba(35, 74, 58, .35) !important; }
.ch-button--ghost:hover { background: var(--ch-white) !important; color: var(--ch-green-2) !important; }
.ch-button--green { background: var(--ch-green) !important; border-color: var(--ch-green) !important; }
.ch-button--green:hover { background: var(--ch-green-2) !important; }

/* Hero */
.ch-hero { position: relative; overflow: hidden; min-height: 560px; display: grid; align-items: center; background: linear-gradient(90deg, rgba(248,244,234,.98) 0%, rgba(248,244,234,.88) 48%, rgba(248,244,234,.2) 72%), var(--ch-hero-image, url('assets/images/hero-default.svg')) center/cover no-repeat; }
.ch-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 9px; background: url('assets/images/pattern-strip.svg') repeat-x center/auto 9px; opacity: .9; }
.ch-hero__content { position: relative; z-index: 2; width: min(690px, 70%); padding: 86px 0 92px; }
.eyebrow { display: inline-flex; gap: 10px; align-items: center; color: var(--ch-green); text-transform: uppercase; letter-spacing: .24em; font-size: .72rem; font-weight: 800; }
.eyebrow::before { content: ''; width: 38px; height: 1px; background: var(--ch-red); }
.ch-hero h1 { margin: 20px 0 18px; font-family: var(--ch-heading); color: var(--ch-green-2); font-size: clamp(3rem, 7vw, 5.8rem); line-height: .95; letter-spacing: -.045em; max-width: 720px; }
.ch-hero h1 em { color: var(--ch-red); font-style: normal; }
.ch-hero p { max-width: 610px; font-size: clamp(1rem, 1.5vw, 1.2rem); color: #4c4a45; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Trust strip */
.trust-strip { background: var(--ch-white); border-bottom: 1px solid var(--ch-border); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 14px; padding: 28px 34px; position: relative; }
.trust-item + .trust-item::before { content: ''; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--ch-border); }
.trust-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ch-cream); color: var(--ch-red); font-size: 1.45rem; }
.trust-item strong { display: block; color: var(--ch-green-2); font-family: var(--ch-heading); font-size: 1.08rem; }
.trust-item span { color: var(--ch-muted); font-size: .86rem; }

/* Sections */
.ch-section { padding: 84px 0; }
.ch-section--white { background: var(--ch-white); }
.section-heading { text-align: center; margin-bottom: 38px; }
.section-heading h2 { font-family: var(--ch-heading); font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1; margin: 12px 0 10px; color: var(--ch-green-2); letter-spacing: -.03em; }
.section-heading p { margin: 0 auto; color: var(--ch-muted); max-width: 640px; }
.section-heading__top { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-heading__top .section-heading { text-align: left; margin: 0; }
.text-link { color: var(--ch-red); font-weight: 800; white-space: nowrap; }

/* Woo product cards */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; margin: 0 !important; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display:none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--ch-white); border: 1px solid rgba(35,74,58,.10); border-radius: var(--ch-radius); overflow: hidden; box-shadow: 0 10px 26px rgba(35,74,58,.05); padding-bottom: 16px; transition: transform .2s ease, box-shadow .2s ease; position: relative; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--ch-shadow); }
.woocommerce ul.products li.product a img { margin: 0 !important; width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; transition: transform .35s ease; }
.woocommerce ul.products li.product:hover a img { transform: scale(1.025); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 15px 16px 4px !important; color: var(--ch-green-2); font-size: 1rem !important; line-height: 1.3; }
.woocommerce ul.products li.product .price { padding: 0 16px; color: var(--ch-red) !important; font-weight: 900 !important; font-size: 1.02rem !important; }
.woocommerce ul.products li.product .button { margin: 12px 16px 0 !important; min-height: 40px; font-size: .85rem; padding: 0 16px !important; }
.woocommerce span.onsale { min-width: auto !important; min-height: 0 !important; line-height: 1 !important; padding: 8px 11px !important; top: 12px !important; left: 12px !important; right: auto !important; border-radius: 999px !important; background: var(--ch-red) !important; font-size: .68rem !important; text-transform: uppercase; letter-spacing: .08em; }
.ch-product-badge { position: absolute; left: 12px; top: 12px; z-index: 4; padding: 7px 10px; border-radius: 999px; background: var(--ch-green); color: #fff; font-size: .64rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.ch-product-badge--order { background: var(--ch-red); }

/* Order section */
.order-panel { display: grid; grid-template-columns: 1.02fr .98fr; min-height: 500px; background: var(--ch-white); border-radius: 30px; overflow: hidden; border: 1px solid var(--ch-border); box-shadow: var(--ch-shadow); }
.order-panel__image { background: url('assets/images/order-default.svg') center/cover no-repeat; min-height: 420px; }
.order-panel__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 6vw, 76px); position: relative; overflow: hidden; }
.order-panel__content::after { content: ''; position: absolute; width: 280px; height: 230px; right: -50px; bottom: -60px; opacity: .08; background: url('assets/images/mountains.svg') center/contain no-repeat; }
.order-panel h2 { font-family: var(--ch-heading); font-size: clamp(2.4rem, 4.5vw, 4rem); line-height: .98; color: var(--ch-green-2); margin: 12px 0 14px; }
.order-panel p { color: var(--ch-muted); max-width: 520px; }
.order-features { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 18px; list-style: none; padding: 0; margin: 24px 0 30px; }
.order-features li { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ch-green-2); }
.order-features li::before { content: '✦'; color: var(--ch-red); }

/* Story */
.story-panel { display: grid; grid-template-columns: .75fr 1.25fr; gap: 38px; align-items: center; }
.story-panel h2 { font-family: var(--ch-heading); font-size: clamp(2.6rem, 4.5vw, 4.2rem); line-height: 1.02; color: var(--ch-green-2); margin: 12px 0 0; }
.story-card { min-height: 340px; border-radius: 28px; background: linear-gradient(90deg, rgba(248,244,234,.94), rgba(248,244,234,.46)), url('assets/images/story-default.svg') right center/cover no-repeat; border: 1px solid var(--ch-border); padding: clamp(34px, 5vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.story-card p { max-width: 650px; color: #4f4c47; }

/* Newsletter integration slot */
.newsletter-band { background: var(--ch-green-2); color: #fff; padding: 34px 0; position: relative; overflow: hidden; }
.newsletter-band::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: url('assets/images/pattern-strip.svg') repeat-x center/auto 8px; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; }
.newsletter-copy h3 { margin: 0 0 4px; font-family: var(--ch-heading); font-size: 1.6rem; }
.newsletter-copy p { margin: 0; color: rgba(255,255,255,.72); }
.newsletter-slot { justify-self: stretch; }
.newsletter-slot form { display: flex; gap: 8px; }
.newsletter-slot input[type='email'], .newsletter-slot input[type='text'] { min-height: 50px; flex: 1; border: 0; border-radius: 999px; padding: 0 18px; }

/* Footer */
.site-footer { background: var(--ch-white); }
.footer-pattern { height: 12px; background: url('assets/images/pattern-strip.svg') repeat-x center/auto 10px; }
.footer-main { padding: 54px 0 30px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 42px; }
.footer-main h4 { margin: 0 0 14px; color: var(--ch-green-2); font-family: var(--ch-heading); font-size: 1.1rem; }
.footer-main ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ch-muted); }
.footer-brand p { color: var(--ch-muted); max-width: 330px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid var(--ch-border); padding: 18px 0 24px; color: var(--ch-muted); display: flex; justify-content: space-between; gap: 20px; font-size: .82rem; }

/* Content / pages */
.site-main { min-height: 55vh; }
.content-wrap { padding: 60px 0 90px; }
.entry-header h1, .woocommerce-products-header__title.page-title { font-family: var(--ch-heading); color: var(--ch-green-2); font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; margin: 0 0 24px; }
.entry-content { max-width: 820px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content a { color: var(--ch-red); text-decoration: underline; text-underline-offset: 3px; }

/* Shop */
.woocommerce .woocommerce-breadcrumb { color: var(--ch-muted); font-size: .82rem; margin: 0 0 20px; }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { margin-bottom: 28px; }
.woocommerce .woocommerce-ordering select { border: 1px solid var(--ch-border); border-radius: 999px; background: var(--ch-white); padding: 10px 38px 10px 14px; }
.woocommerce div.product { display: flow-root; }
.woocommerce div.product div.images img { border-radius: 20px; }
.woocommerce div.product .product_title { font-family: var(--ch-heading); color: var(--ch-green-2); font-size: clamp(2.3rem, 4.5vw, 4.2rem); line-height: 1; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ch-red) !important; font-size: 1.35rem !important; font-weight: 900; }
.woocommerce div.product form.cart .variations select, .woocommerce .quantity .qty, .woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select { border: 1px solid var(--ch-border); border-radius: 12px; background: var(--ch-white); min-height: 46px; padding: 10px 12px; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--ch-green) !important; background: var(--ch-white); border-radius: 14px; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--ch-green) !important; }
.ch-order-notice { background: var(--ch-soft-green); border: 1px solid rgba(35,74,58,.14); border-radius: 18px; padding: 20px; margin: 18px 0 24px; }
.ch-order-notice strong { display: block; color: var(--ch-green-2); margin-bottom: 4px; }

/* Cart & checkout */
.woocommerce table.shop_table { border: 1px solid var(--ch-border) !important; border-radius: 18px !important; overflow: hidden; background: var(--ch-white); }
.woocommerce table.shop_table th { color: var(--ch-green-2); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout-review-order { background: var(--ch-white); border: 1px solid var(--ch-border); border-radius: 18px; padding: 20px; }

/* 404 */
.not-found { text-align: center; padding: 100px 0; }
.not-found h1 { font-family: var(--ch-heading); color: var(--ch-green-2); font-size: 5rem; margin: 0; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; grid-column: 1 / -1; padding-bottom: 14px; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { padding: 8px 0; }
  .mobile-menu-toggle { display: grid; }
  .header-actions .desktop-only { display:none; }
  .ch-hero { min-height: 500px; background: linear-gradient(90deg, rgba(248,244,234,.97) 0%, rgba(248,244,234,.82) 70%, rgba(248,244,234,.35) 100%), var(--ch-hero-image, url('assets/images/hero-default.svg')) center/cover no-repeat; }
  .ch-hero__content { width: 82%; }
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .order-panel { grid-template-columns: 1fr; }
  .order-panel__image { min-height: 360px; }
  .story-panel { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-main > :last-child { grid-column: 2 / 4; }
}

@media (max-width: 700px) {
  .admin-bar .site-header { top: 46px; }
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand-title { font-size: 1.24rem; }
  .brand-tagline { display: none; }
  .header-actions { gap: 2px; }
  .icon-button { width: 38px; height: 38px; }
  .ch-hero { min-height: 550px; align-items: end; background-position: 62% center; }
  .ch-hero::before { content:''; position:absolute; inset:0; background: linear-gradient(0deg, rgba(248,244,234,.98) 0%, rgba(248,244,234,.88) 48%, rgba(248,244,234,.18) 100%); }
  .ch-hero__content { width: 100%; padding: 190px 0 74px; }
  .ch-hero h1 { font-size: clamp(3.1rem, 15vw, 4.5rem); }
  .hero-actions { display: grid; }
  .ch-button { width: 100%; }
  .trust-grid { grid-template-columns: 1fr; padding: 8px 0; }
  .trust-item { padding: 18px 0; }
  .trust-item + .trust-item::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }
  .ch-section { padding: 62px 0; }
  .section-heading__top { align-items: start; flex-direction: column; }
  .woocommerce ul.products { gap: 12px; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: .9rem !important; padding-inline: 12px !important; }
  .woocommerce ul.products li.product .price { padding-inline: 12px; font-size: .92rem !important; }
  .woocommerce ul.products li.product .button { width: calc(100% - 24px); margin-inline: 12px !important; }
  .order-panel { border-radius: 22px; }
  .order-panel__content { padding: 34px 24px 42px; }
  .order-features { grid-template-columns: 1fr; }
  .story-card { min-height: 390px; background: linear-gradient(0deg, rgba(248,244,234,.96), rgba(248,244,234,.64)), url('assets/images/story-default.svg') center/cover no-repeat; }
  .newsletter-inner { grid-template-columns: 1fr; }
  .newsletter-slot form { flex-direction: column; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-main > :last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}
