/* =========================================================
   ARONGA Design System — SAFE rebuild (v4)
   Keeps brand look; avoids layout breakages from v1–v3
   ========================================================= */

:root {
  --aronga-coral: #d63d4a;
  --aronga-coral-deep: #b52f3b;
  --aronga-coral-soft: rgba(214, 61, 74, 0.12);
  --aronga-ink: #1a1817;
  --aronga-mute: #5a534e;
  --aronga-faint: #8a817a;
  --aronga-stone: #e9e2dc;
  --aronga-paper: #fffdfb;
  --aronga-line: #ddd3cb;
  --aronga-steel: #2f4f68;
  --aronga-radius: 10px;
  --aronga-radius-sm: 6px;
  --aronga-shadow: 0 8px 22px rgba(40, 28, 24, 0.06);
  --aronga-font: "Onest", "Geologica", system-ui, sans-serif;
  --aronga-display: "Geologica", "Onest", system-ui, sans-serif;
  --body-bg: transparent !important;
}

html { background-color: var(--aronga-stone) !important; }

body {
  font-family: var(--aronga-font) !important;
  color: var(--aronga-ink) !important;
  background-color: var(--aronga-stone) !important;
  background-image:
    radial-gradient(ellipse 90% 55% at 8% -8%, rgba(214, 61, 74, 0.16), transparent 52%),
    radial-gradient(ellipse 70% 45% at 96% 0%, rgba(47, 79, 104, 0.08), transparent 48%),
    radial-gradient(ellipse 80% 35% at 50% 105%, rgba(214, 61, 74, 0.08), transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d63d4a' stroke-width='1.1' opacity='0.12'%3E%3Cpath d='M40 6 L74 40 L40 74 L6 40 Z'/%3E%3Cpath d='M40 18 L62 40 L40 62 L18 40 Z'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat !important;
  background-size: auto, auto, auto, 80px 80px !important;
  -webkit-font-smoothing: antialiased;
}

body > .container,
body .container,
main,
#common-home,
#content,
.content-top,
.content-bottom {
  background: transparent !important;
}

h1, h2, h3, .heading {
  font-family: var(--aronga-display) !important;
  letter-spacing: -0.02em;
  color: var(--aronga-ink) !important;
}

/* Surfaces — header/footer only, NOT every uni-wrapper */
header,
.header,
.top-menu,
.header-block,
.footer,
footer.footer,
.footer-top,
.footer-bottom {
  background-color: rgba(255, 253, 251, 0.96) !important;
}

header,
.header {
  border-bottom: 1px solid rgba(221, 211, 203, 0.85) !important;
}

/* Brand */
.aronga-brand {
  display: inline-flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  margin-left: 10px !important;
  text-decoration: none !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
}
.aronga-brand__badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: linear-gradient(135deg, var(--aronga-coral) 0%, var(--aronga-coral-deep) 100%) !important;
  color: #fff !important;
  font-family: var(--aronga-display) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 5px 10px 5px 8px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}
.aronga-brand__diamond {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  transform: rotate(45deg);
  background: #fff;
  border-radius: 1px;
}
.aronga-brand__sub {
  display: block !important;
  color: var(--aronga-steel) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  padding-left: 2px;
}

/* Buttons */
.btn-primary,
a.btn-primary,
.product-thumb__add-to-cart {
  background: linear-gradient(180deg, var(--aronga-coral) 0%, var(--aronga-coral-deep) 100%) !important;
  border: 1px solid var(--aronga-coral-deep) !important;
  color: #fff !important;
  border-radius: var(--aronga-radius-sm) !important;
  font-weight: 600 !important;
}
.btn-menu,
.header-menu__btn,
button.header-menu__btn {
  background: var(--aronga-ink) !important;
  border-color: var(--aronga-ink) !important;
  color: #fff !important;
  border-radius: var(--aronga-radius-sm) !important;
}

/* Menu: do NOT touch overflow (L2 panel depends on visible) */
@media (min-width: 992px) {
  .menu1.new {
    box-shadow: 0 12px 32px rgba(40, 28, 24, 0.14) !important;
    border: 1px solid var(--aronga-line) !important;
  }
  .menu-wrapper.new .menu__collapse,
  .menu1.new .menu__collapse {
    overflow: visible !important;
  }
  .menu1.new .menu__level-2 {
    background: #f6f1ed !important;
  }
}

/* Home cars — keep 5-col, compact, soft titles */
.aronga-cars {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px 10px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
  background: rgba(255, 253, 251, 0.7) !important;
  border: 1px solid rgba(221, 211, 203, 0.85) !important;
  border-radius: 14px !important;
  padding: 16px 12px 12px !important;
}
.aronga-cars__item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  text-decoration: none !important;
  color: inherit !important;
  padding: 6px 4px 8px !important;
  border-radius: 10px !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}
.aronga-cars__item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.8) !important;
}
.aronga-cars__img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 110px !important;
  object-fit: contain !important;
}
.aronga-cars__name {
  display: block !important;
  margin-top: 8px !important;
  font-weight: 600 !important;
  color: #8f4545 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}
@media (max-width: 1199px) {
  .aronga-cars { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 767px) {
  .aronga-cars { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .aronga-cars__name { color: #7a3f3f !important; font-weight: 500 !important; }
}

/* Parent groups: hide big category photo/scheme — teasers only */
#product-category #content .aronga-scheme-block:not(.aronga-scheme-block--leaf),
#product-category #content .category-info.aronga-scheme-block:not(.aronga-scheme-block--leaf) {
  display: none !important;
}

/* Leaf scheme: compact + loupe */
#product-category #content .aronga-scheme-block--leaf {
  display: block !important;
  max-width: 720px !important;
  margin: 0 auto 20px auto !important;
  padding: 10px !important;
  text-align: center !important;
  background: #fff !important;
  border: 1px solid var(--aronga-line) !important;
  border-radius: 12px !important;
}
#product-category #content .aronga-scheme-block--leaf .aronga-scheme__img {
  max-width: min(100%, 680px) !important;
  max-height: 420px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  cursor: zoom-in !important;
}
.aronga-scheme-block--leaf a.aronga-scheme-zoom {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.aronga-scheme-block--leaf a.aronga-scheme-zoom::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,253,251,.96) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") center/20px no-repeat;
  border: 1px solid #ccc;
  pointer-events: none;
}

/* Aesthetic teasers compact */
#product-category .category-list__img,
#product-category .category-list img {
  max-height: 120px !important;
  width: auto !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}
#product-category .category-list__name {
  color: #8f4545 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 4px 0 !important;
}
@media (max-width: 767px) {
  #product-category .category-list__name {
    color: #7a3f3f !important;
    font-weight: 500 !important;
    font-size: 12px !important;
  }
  #product-category .category-list__img,
  #product-category .category-list img {
    max-height: 96px !important;
  }
}
@media (min-width: 1200px) {
  #product-category .category-list > div { width: 20% !important; }
}

/* Product cards — light touch, no overflow clipping */
.product-thumb {
  background: rgba(255, 253, 251, 0.92) !important;
  border: 1px solid rgba(221, 211, 203, 0.75) !important;
  border-radius: 10px !important;
}
.product-thumb__price,
.price {
  font-family: var(--aronga-display) !important;
  font-weight: 700 !important;
}

/* Map — always visible, never clipped to 0 */
.aronga-footer-map,
.aronga-map,
.contacts__map {
  display: block !important;
  visibility: visible !important;
  max-width: 640px !important;
  width: 100% !important;
  margin: 12px 0 16px !important;
}
.aronga-footer-map img {
  display: block !important;
  width: 100% !important;
  max-width: 640px !important;
  height: auto !important;
  border-radius: 10px !important;
}
.aronga-footer-map iframe,
.aronga-map iframe,
.contacts__map iframe,
.information-information iframe[src*="yandex"],
#information-contact iframe[src*="yandex"] {
  display: block !important;
  width: 100% !important;
  max-width: 640px !important;
  height: 360px !important;
  min-height: 320px !important;
  border: 0 !important;
  border-radius: 10px !important;
}

/* Forms */
.form-control:focus,
#search input:focus {
  border-color: rgba(214, 61, 74, 0.5) !important;
  box-shadow: 0 0 0 3px var(--aronga-coral-soft) !important;
}

/* Home section title accent */
#common-home .heading,
.uni-module .heading {
  font-family: var(--aronga-display) !important;
  font-weight: 700 !important;
}

#common-home .fa,
#common-home .fas,
#common-home .far {
  color: var(--aronga-coral) !important;
}

.footer a:hover {
  color: var(--aronga-coral) !important;
}

/* Content panels — ONLY category/product/checkout, not global #content > * */
#product-category #content .uni-wrapper,
#product-product #content .uni-wrapper,
#unicheckout .uni-wrapper,
#unicheckout .checkout-cart__wrapper {
  background: rgba(255, 253, 251, 0.94) !important;
  border: 1px solid rgba(221, 211, 203, 0.7) !important;
  border-radius: 12px !important;
  box-shadow: var(--aronga-shadow) !important;
  padding: 16px !important;
}

@media (max-width: 767px) {
  .aronga-brand__badge { font-size: 10px !important; }
  .aronga-brand__sub { font-size: 9px !important; }
  #product-category #content .uni-wrapper,
  #product-product #content .uni-wrapper {
    padding: 10px !important;
  }
}
