/*
Theme Name: CleanMarket Shop
Theme URI: https://sitepro.net.ua/
Author: SitePRO
Author URI: https://sitepro.net.ua/
Description: Сучасна адаптивна WooCommerce-тема для інтернет-магазину побутової хімії, товарів для прибирання та догляду за домом.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: cleanmarket-shop
Tags: e-commerce, woocommerce, shop, custom-logo, custom-menu, featured-images, responsive-layout
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --cm-bg: #f4fbf8;
    --cm-surface: #ffffff;
    --cm-surface-soft: #ecf8f3;
    --cm-text: #183b35;
    --cm-muted: #68837e;
    --cm-primary: #1f9d7a;
    --cm-primary-dark: #14765c;
    --cm-accent: #2db7b0;
    --cm-border: #dcebe6;
    --cm-warning: #ffbf47;
    --cm-danger: #ef6f6c;
    --cm-shadow: 0 18px 45px rgba(29, 82, 69, .10);
    --cm-radius: 24px;
    --cm-radius-sm: 16px;
    --cm-container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--cm-text);
    background: var(--cm-bg);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--cm-primary-dark); text-decoration: none; transition: .2s ease; }
a:hover { color: var(--cm-primary); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(calc(100% - 32px), var(--cm-container)); margin-inline: auto; }

.cm-topbar {
    background: #123f37;
    color: rgba(255,255,255,.92);
    font-size: 13px;
}
.cm-topbar__inner { min-height: 38px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.cm-topbar a { color:#fff; }
.cm-topbar__items { display:flex; align-items:center; gap:20px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(220,235,230,.9);
}
.cm-header__inner { min-height: 78px; display:grid; grid-template-columns: auto 1fr auto; align-items:center; gap:34px; }
.site-branding { display:flex; align-items:center; gap:12px; min-width:190px; }
.custom-logo { max-height: 48px; width:auto; }
.cm-brand-mark {
    width:44px; height:44px; border-radius:14px;
    display:grid; place-items:center;
    background: linear-gradient(135deg, var(--cm-primary), var(--cm-accent));
    color:#fff; font-weight:900; font-size:20px;
    box-shadow: 0 9px 22px rgba(31,157,122,.24);
}
.site-title { color:var(--cm-text); font-size:21px; font-weight:900; letter-spacing:-.03em; }
.site-description { margin:0; color:var(--cm-muted); font-size:12px; line-height:1.2; }

.main-navigation { justify-self:center; }
.main-navigation ul { list-style:none; margin:0; padding:0; display:flex; gap:8px; align-items:center; }
.main-navigation a { display:block; padding:10px 13px; border-radius:12px; font-size:14px; font-weight:750; color:#365b53; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { background:var(--cm-surface-soft); color:var(--cm-primary-dark); }
.cm-header-actions { display:flex; gap:9px; align-items:center; }
.cm-icon-btn {
    min-width:44px; height:44px; padding:0 13px; border:1px solid var(--cm-border); border-radius:14px;
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    background:#fff; color:var(--cm-text); box-shadow:0 5px 20px rgba(29,82,69,.05);
}
.cm-icon-btn:hover { border-color:#b8dcd0; transform:translateY(-1px); }
.cm-cart-count { min-width:21px; height:21px; padding:0 6px; display:grid; place-items:center; border-radius:999px; background:var(--cm-primary); color:#fff; font-size:11px; font-weight:800; }
.cm-menu-toggle { display:none; border:0; background:none; font-size:24px; color:var(--cm-text); cursor:pointer; }

.cm-hero { padding: 54px 0 30px; overflow:hidden; position:relative; }
.cm-hero:before, .cm-hero:after { content:""; position:absolute; border-radius:50%; filter:blur(4px); pointer-events:none; }
.cm-hero:before { width:420px; height:420px; background:rgba(45,183,176,.12); right:-140px; top:-120px; }
.cm-hero:after { width:280px; height:280px; background:rgba(31,157,122,.10); left:-120px; bottom:-80px; }
.cm-hero__grid { display:grid; grid-template-columns:1.02fr .98fr; gap:54px; align-items:center; position:relative; z-index:1; }
.cm-kicker { display:inline-flex; gap:8px; align-items:center; padding:8px 12px; border-radius:999px; background:#e5f7f0; color:var(--cm-primary-dark); font-size:13px; font-weight:800; }
.cm-hero h1 { max-width:720px; margin:18px 0 18px; font-size:clamp(42px,5.5vw,72px); line-height:1.02; letter-spacing:-.055em; }
.cm-hero h1 span { color:var(--cm-primary); }
.cm-hero__text { max-width:650px; margin:0 0 28px; color:var(--cm-muted); font-size:18px; }
.cm-actions { display:flex; flex-wrap:wrap; gap:12px; }
.cm-btn { min-height:50px; padding:0 20px; border-radius:15px; display:inline-flex; align-items:center; justify-content:center; gap:9px; border:1px solid transparent; font-weight:850; cursor:pointer; }
.cm-btn--primary { color:#fff; background:linear-gradient(135deg,var(--cm-primary),var(--cm-accent)); box-shadow:0 12px 30px rgba(31,157,122,.25); }
.cm-btn--primary:hover { color:#fff; transform:translateY(-2px); box-shadow:0 16px 34px rgba(31,157,122,.31); }
.cm-btn--light { background:#fff; border-color:var(--cm-border); color:var(--cm-text); }
.cm-btn--light:hover { background:#f8fffc; color:var(--cm-primary-dark); }
.cm-hero__meta { margin-top:30px; display:flex; flex-wrap:wrap; gap:18px; color:#55756e; font-size:13px; font-weight:700; }
.cm-hero__meta span { display:flex; gap:8px; align-items:center; }
.cm-hero__meta i { width:25px; height:25px; border-radius:9px; display:grid; place-items:center; background:#fff; border:1px solid var(--cm-border); font-style:normal; }

.cm-visual { position:relative; min-height:520px; }
.cm-visual__panel { position:absolute; inset:18px 0 0 30px; background:linear-gradient(145deg,#dff5ee,#f9fffd); border:1px solid #d0eae1; border-radius:36px; box-shadow:var(--cm-shadow); overflow:hidden; }
.cm-bubble { position:absolute; border-radius:50%; border:1px solid rgba(255,255,255,.7); background:rgba(255,255,255,.38); backdrop-filter:blur(3px); }
.cm-bubble.b1 { width:92px;height:92px;left:9%;top:10%; }
.cm-bubble.b2 { width:58px;height:58px;right:11%;top:14%; }
.cm-bubble.b3 { width:126px;height:126px;right:4%;bottom:7%; }
.cm-bubble.b4 { width:42px;height:42px;left:18%;bottom:11%; }
.cm-bottle { position:absolute; background:linear-gradient(160deg,#2bb29a,#187860); border-radius:34px 34px 28px 28px; box-shadow:0 28px 45px rgba(25,102,83,.24); }
.cm-bottle:before { content:""; position:absolute; left:28%; right:28%; top:-52px; height:58px; border-radius:10px 10px 5px 5px; background:#174d43; }
.cm-bottle:after { content:"CLEAN\A HOME"; white-space:pre; position:absolute; inset:34% 12% auto; padding:16px 8px; border-radius:18px; background:#f7fffc; color:#1b6454; font-weight:950; text-align:center; line-height:1.05; letter-spacing:.08em; }
.cm-bottle--a { width:176px; height:310px; left:19%; top:27%; transform:rotate(-6deg); }
.cm-bottle--b { width:138px; height:245px; right:19%; top:19%; transform:rotate(8deg); background:linear-gradient(160deg,#52c9c2,#258f99); }
.cm-bottle--b:before { left:21%;right:21%;top:-39px;height:45px; }
.cm-bottle--b:after { content:"FRESH\A WASH"; }
.cm-visual__tag { position:absolute; z-index:4; padding:13px 16px; border-radius:16px; background:rgba(255,255,255,.92); box-shadow:0 12px 30px rgba(30,76,65,.13); border:1px solid rgba(214,235,228,.9); font-size:13px; font-weight:850; }
.cm-visual__tag strong { display:block; font-size:18px; color:var(--cm-primary); }
.cm-tag-a { left:0; top:70px; }
.cm-tag-b { right:-8px; bottom:42px; }

.cm-section { padding:76px 0; }
.cm-section--white { background:#fff; }
.cm-section-head { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.cm-eyebrow { margin:0 0 7px; color:var(--cm-primary); font-size:12px; font-weight:950; letter-spacing:.13em; text-transform:uppercase; }
.cm-section h2 { margin:0; font-size:clamp(30px,4vw,44px); line-height:1.1; letter-spacing:-.04em; }
.cm-section-head p { max-width:560px; margin:8px 0 0; color:var(--cm-muted); }
.cm-arrow-link { white-space:nowrap; font-weight:850; }

.cm-category-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.cm-category-card { min-height:180px; padding:22px 18px; border:1px solid var(--cm-border); border-radius:22px; background:linear-gradient(180deg,#fff,#f7fcfa); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; box-shadow:0 8px 28px rgba(29,82,69,.04); }
.cm-category-card:hover { transform:translateY(-5px); box-shadow:var(--cm-shadow); border-color:#badfd4; }
.cm-category-icon { width:64px; height:64px; margin-bottom:15px; border-radius:20px; display:grid; place-items:center; background:var(--cm-surface-soft); font-size:31px; }
.cm-category-card strong { color:var(--cm-text); line-height:1.25; }
.cm-category-card span { margin-top:5px; color:var(--cm-muted); font-size:12px; }

.cm-product-grid, .woocommerce ul.products { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:0 !important; padding:0 !important; }
.cm-product-card, .woocommerce ul.products li.product {
    width:auto !important; margin:0 !important; padding:12px 12px 18px !important;
    border:1px solid var(--cm-border); border-radius:22px; background:#fff; box-shadow:0 9px 32px rgba(28,79,67,.05); overflow:hidden;
}
.cm-product-card:hover, .woocommerce ul.products li.product:hover { transform:translateY(-5px); box-shadow:var(--cm-shadow); }
.cm-product-thumb { aspect-ratio:1/1; border-radius:17px; background:linear-gradient(145deg,#eaf8f3,#f8fffc); display:grid; place-items:center; font-size:68px; overflow:hidden; }
.woocommerce ul.products li.product img { border-radius:17px; background:#f3faf7; margin-bottom:14px !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color:var(--cm-text); font-size:16px !important; line-height:1.35; min-height:43px; }
.woocommerce ul.products li.product .price { color:var(--cm-primary-dark) !important; font-weight:900 !important; font-size:17px !important; }
.woocommerce ul.products li.product .button { width:100%; text-align:center; border-radius:13px; background:var(--cm-primary) !important; color:#fff !important; }
.woocommerce span.onsale { min-width:auto !important; min-height:auto !important; line-height:1 !important; padding:8px 10px !important; border-radius:10px !important; background:var(--cm-danger) !important; }
.cm-product-info { padding:14px 4px 0; }
.cm-product-cat { color:var(--cm-primary); font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.cm-product-info h3 { margin:6px 0 12px; font-size:16px; line-height:1.35; }
.cm-product-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cm-price { font-size:18px; font-weight:950; }
.cm-add { width:40px; height:40px; border-radius:13px; background:var(--cm-primary); color:#fff; display:grid; place-items:center; font-size:20px; }

.cm-promo { padding:0 0 76px; }
.cm-promo__inner { position:relative; overflow:hidden; display:grid; grid-template-columns:1.1fr .9fr; align-items:center; min-height:320px; padding:44px 54px; border-radius:32px; background:linear-gradient(135deg,#123f37,#1f7e68); color:#fff; box-shadow:0 25px 50px rgba(18,63,55,.18); }
.cm-promo__inner:after { content:""; position:absolute; width:380px; height:380px; border-radius:50%; right:-120px; top:-110px; background:rgba(91,220,194,.12); border:1px solid rgba(255,255,255,.12); }
.cm-promo h2 { color:#fff; max-width:650px; }
.cm-promo p { max-width:580px; color:rgba(255,255,255,.75); }
.cm-promo .cm-btn--light { border-color:rgba(255,255,255,.2); }
.cm-promo__art { position:relative; height:230px; z-index:1; }
.cm-pack { position:absolute; right:18%; bottom:-14px; width:150px; height:225px; border-radius:23px 23px 17px 17px; background:linear-gradient(150deg,#f9fff9,#bfead9); transform:rotate(5deg); box-shadow:0 26px 40px rgba(0,0,0,.16); }
.cm-pack:after { content:"ECO\A CLEAN"; white-space:pre; position:absolute; inset:36% 13% auto; color:#165746; font-size:24px; font-weight:950; text-align:center; line-height:1; }
.cm-spray { position:absolute; left:16%; bottom:-12px; width:125px; height:195px; border-radius:22px; background:linear-gradient(160deg,#2bc0b3,#0e8376); box-shadow:0 26px 40px rgba(0,0,0,.16); transform:rotate(-7deg); }
.cm-spray:before { content:""; position:absolute; left:38px; top:-44px; width:76px; height:52px; border-radius:10px 4px 8px 8px; background:#ecfff8; transform:skewX(-14deg); }

.cm-benefits { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.cm-benefit { padding:22px; border-radius:20px; border:1px solid var(--cm-border); background:#fff; display:flex; gap:15px; align-items:flex-start; }
.cm-benefit__icon { flex:0 0 48px; width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:var(--cm-surface-soft); font-size:22px; }
.cm-benefit strong { display:block; margin-bottom:3px; }
.cm-benefit p { margin:0; color:var(--cm-muted); font-size:13px; }

.cm-content { padding:54px 0 80px; }
.cm-content-wrap { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:34px; }
.cm-main-card, .cm-sidebar-card { background:#fff; border:1px solid var(--cm-border); border-radius:24px; padding:28px; box-shadow:0 10px 34px rgba(29,82,69,.05); }
.entry-title, .page-title { margin-top:0; line-height:1.15; letter-spacing:-.03em; }
.entry-meta { color:var(--cm-muted); font-size:13px; margin-bottom:18px; }
.entry-content > *:first-child { margin-top:0; }
.entry-content img { border-radius:18px; }

.woocommerce .woocommerce-breadcrumb { color:var(--cm-muted); font-size:13px; }
.woocommerce div.product { background:#fff; border:1px solid var(--cm-border); border-radius:24px; padding:24px; }
.woocommerce div.product .product_title { letter-spacing:-.035em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color:var(--cm-primary-dark); font-weight:950; }
.woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce input.button.alt, .woocommerce .button { border-radius:13px !important; background:var(--cm-primary) !important; color:#fff !important; }
.woocommerce-message, .woocommerce-info { border-top-color:var(--cm-primary) !important; background:#f4fbf8 !important; border-radius:14px; }
.woocommerce-message::before, .woocommerce-info::before { color:var(--cm-primary) !important; }
.woocommerce-cart-form, .cart_totals, .woocommerce-checkout-review-order, .woocommerce-billing-fields, .woocommerce-additional-fields { background:#fff; border:1px solid var(--cm-border); border-radius:20px; padding:20px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce select { border:1px solid var(--cm-border); border-radius:12px; padding:12px 13px; background:#fbfefd; }

.site-footer { padding:60px 0 24px; background:#103a33; color:rgba(255,255,255,.75); }
.cm-footer-grid { display:grid; grid-template-columns:1.5fr repeat(3,1fr); gap:42px; padding-bottom:42px; }
.site-footer h3, .site-footer h4 { color:#fff; margin-top:0; }
.site-footer a { color:rgba(255,255,255,.78); }
.site-footer a:hover { color:#fff; }
.site-footer ul { list-style:none; padding:0; margin:0; }
.site-footer li { margin:8px 0; }
.cm-footer-brand p { max-width:420px; }
.cm-footer-bottom { border-top:1px solid rgba(255,255,255,.12); padding-top:20px; display:flex; align-items:center; justify-content:space-between; gap:20px; font-size:13px; }
.cm-footer-credit a { color:#fff; font-weight:850; }

.reveal { opacity:0; transform:translateY(18px); transition:opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } .reveal { opacity:1; transform:none; } }

@media (max-width:1100px) {
    .cm-header__inner { grid-template-columns:auto 1fr auto; gap:18px; }
    .main-navigation { position:absolute; left:16px; right:16px; top:86px; display:none; padding:14px; background:#fff; border:1px solid var(--cm-border); border-radius:18px; box-shadow:var(--cm-shadow); }
    .main-navigation.is-open { display:block; }
    .main-navigation ul { flex-direction:column; align-items:stretch; }
    .cm-menu-toggle { display:inline-block; }
    .cm-hero__grid { grid-template-columns:1fr 1fr; gap:26px; }
    .cm-category-grid { grid-template-columns:repeat(3,1fr); }
    .cm-benefits { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:820px) {
    .cm-topbar__items span:nth-child(2), .cm-topbar__right { display:none; }
    .cm-header__inner { min-height:70px; }
    .site-description { display:none; }
    .site-branding { min-width:0; }
    .cm-icon-btn.cm-account { display:none; }
    .cm-hero { padding-top:36px; }
    .cm-hero__grid, .cm-promo__inner, .cm-content-wrap { grid-template-columns:1fr; }
    .cm-visual { min-height:420px; }
    .cm-visual__panel { inset:10px 12px 0; }
    .cm-section { padding:60px 0; }
    .cm-product-grid, .woocommerce ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .cm-promo__inner { padding:36px 28px; }
    .cm-promo__art { min-height:220px; }
    .cm-footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:560px) {
    .container { width:min(calc(100% - 22px),var(--cm-container)); }
    .cm-topbar__items { gap:10px; }
    .site-title { font-size:18px; }
    .cm-brand-mark { width:40px; height:40px; border-radius:12px; }
    .cm-header-actions .cm-cart-label { display:none; }
    .cm-hero h1 { font-size:42px; }
    .cm-hero__text { font-size:16px; }
    .cm-hero__meta { gap:10px; }
    .cm-visual { min-height:340px; }
    .cm-bottle--a { width:126px; height:225px; left:20%; top:30%; }
    .cm-bottle--a:before { top:-38px; height:42px; }
    .cm-bottle--b { width:102px; height:180px; right:18%; }
    .cm-category-grid { grid-template-columns:repeat(2,1fr); }
    .cm-section-head { align-items:flex-start; flex-direction:column; }
    .cm-product-grid, .woocommerce ul.products { grid-template-columns:1fr 1fr; gap:10px; }
    .cm-product-card, .woocommerce ul.products li.product { padding:8px 8px 13px !important; border-radius:17px; }
    .cm-product-thumb { font-size:48px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size:14px !important; }
    .cm-benefits { grid-template-columns:1fr; }
    .cm-promo { padding-bottom:58px; }
    .cm-footer-grid { grid-template-columns:1fr; gap:26px; }
    .cm-footer-bottom { flex-direction:column; align-items:flex-start; }
}
