* { box-sizing: border-box; }

:root {
  --www-green: #76bd26;
  --www-green-text: #5a9419;
  --www-green-text-strong: #4a7a14;
  --www-green-soft: #eef7e0;
  --header-top-height: 36px;
  --page-max-width: 1320px;
  --page-pad: 16px;
  --page-content-pad: max(var(--page-pad), calc((100% - var(--page-max-width)) / 2 + var(--page-pad)));
}

BODY {margin:0; min-height:100vh; display:flex; flex-flow:column nowrap; justify-content:space-between; font-family:Arial, sans-serif; background:#f9f9fa; color:#16181d;}
A {color:inherit; text-decoration:none;}

BODY > HEADER { position: sticky; top: calc(-1 * var(--header-top-height)); z-index: 60; }
BODY > ARTICLE {flex:1 0 auto; padding:24px var(--page-content-pad);}
BODY > FOOTER { margin-top: 48px; border-top: 1px solid #e5e7eb; background: #fff; padding: 28px var(--page-content-pad) 16px; }

/* HEADER */

.header-top { position: relative; z-index: 60; display: flex; gap: 20px; height: var(--header-top-height); align-items: center; padding: 0 var(--page-content-pad); border-bottom: 1px solid #e5e7eb; background: #fff; font-size: 13px; color: #4b5563; }
.www-header-phone { margin-left: auto; font-weight: 700; color: #16181d; }

.www-top-drop { position: relative; display: flex; align-items: center; height: 100%; }
.www-top-drop > A { display: flex; align-items: center; height: 100%; }
.www-top-menu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  display: none; flex-direction: column; gap: 2px;
  padding: 8px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}
.www-top-menu A { padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.www-top-menu A:hover { background: #f9f9fa; color: var(--www-green-text); }
.www-top-drop:hover .www-top-menu { display: flex; }

.header-main { position: relative; z-index: 50; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 0 var(--page-content-pad); background: #fff; box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06); }
.www-logo { display: inline-flex; align-items: center; }
.www-logo-img { display: block; height: 24px; width: auto; }
.www-logo-img--footer { height: 20px; }

.catalog-wrap { position: relative; }
.catalog-btn { border: 0; border-radius: 10px; background: var(--www-green); color: #fff; font-weight: 700; padding: 10px 14px; cursor: pointer; }

.catalog-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(22, 24, 29, 0.25); opacity: 0; transition: opacity 0.2s ease; }
.catalog-overlay.is-open { opacity: 1; }

.catalog-panel { position: absolute; left: 0; top: calc(100% + 10px); z-index: 50; width: 420px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 8px 28px rgba(16, 24, 40, 0.12); overflow: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.catalog-panel.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.catalog-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid #f3f4f6; font-size: 16px; }
.catalog-panel-head BUTTON { border: 0; background: transparent; cursor: pointer; color: #6b7280; font-size: 18px; line-height: 1; padding: 4px 6px; }
.catalog-tree { max-height: min(70vh, 560px); overflow: auto; padding: 10px; }

.catalog-item { border-radius: 10px; }
.catalog-item + .catalog-item { margin-top: 4px; }
.catalog-trigger { width: 100%; border: 0; background: #fff; text-align: left; padding: 12px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px; }
.catalog-item.is-open > .catalog-trigger { background: var(--www-green-soft); color: var(--www-green-text-strong); }
.catalog-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.catalog-item.is-open .catalog-body { grid-template-rows: 1fr; }
.catalog-body-inner { min-height: 0; overflow: hidden; display: grid; gap: 4px; }
.catalog-item.is-open .catalog-body-inner { padding: 4px 14px 10px; }
.catalog-sublink { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: #4b5563; }
.catalog-sublink:hover { background: #f9f9fa; color: var(--www-green-text); }

.www-search { display: flex; flex: 1; min-width: 220px; border: 2px solid var(--www-green); border-radius: 12px; overflow: hidden; }
.www-search INPUT { flex: 1; border: 0; padding: 11px 12px; outline: none; font-size: 15px; }
.www-search BUTTON { border: 0; background: var(--www-green); color: #fff; font-weight: 700; padding: 0 14px; cursor: pointer; }

.sr-only {position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0, 0, 0, 0);border: 0;}

.www-actions { display: flex; gap: 12px; font-size: 13px; color: #4b5563; }
.www-cart-link { font-weight: 700; color: var(--www-green-text-strong); }
#cartCount { display: inline-block; margin-left: 4px; min-width: 18px; text-align: center; border-radius: 99px; background: var(--www-green); color: #fff; font-size: 11px; padding: 1px 5px; }

/* FOOTER */
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr; gap: 24px; }
.www-footer-logo { display: inline-flex; align-items: center; }
.www-footer-brand P { margin: 12px 0 10px; max-width: 360px; color: #4b5563; font-size: 14px; line-height: 1.4; }
.www-footer-phone { display: block; font-size: 20px; font-weight: 700; }
.www-footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.www-footer-col H4 { margin: 0 0 10px; font-size: 14px; }
.www-footer-col A { display: block; margin-bottom: 8px; color: #4b5563; font-size: 14px; }
.www-footer-col A:hover { color: var(--www-green-text); }
.www-footer-col--stack { display: flex; flex-direction: column; gap: 18px; }
.www-footer-col--stack H4 { margin-top: 14px; }
.www-footer-col--stack H4:first-child { margin-top: 0; }
.footer-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f3f4f6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; color: #6b7280; font-size: 13px; line-height: 1.5; }
.www-footer-copy { margin-right: 16px; white-space: nowrap; }
.www-footer-legal { display: flex; flex-wrap: wrap; align-items: center; flex: 1 1 auto; min-width: 0; }
.www-footer-legal A { color: #6b7280; white-space: nowrap; }
.www-footer-legal A:not(:last-child)::after { content: "·"; margin: 0 12px; color: #d1d5db; pointer-events: none; }
.www-footer-legal A:hover { color: var(--www-green-text); }
.www-footer-social-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #f3f4f6; color: #4b5563; }
.www-footer-social-link:hover { background: var(--www-green-soft); color: var(--www-green-text-strong); }
.www-footer-social-link SVG { width: 22px; height: 22px; fill: currentColor; }

.www-footer-meta { width: 100%; max-width: none; margin: 0; padding: 7px 16px; background: #33363a; color: #ccc; font: normal 13px/21px Arial narrow, Arial, sans-serif; }
.www-footer-meta::after { content: ""; display: block; clear: both; }
.www-footer-meta A { color: #eed; }
.www-footer-meta A:hover { color: #fc8; }

@media (max-width: 1100px) { .footer-top { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .footer-top { grid-template-columns: 1fr; } }
