:root {
  --hk-base-50: #f6f2ee;
  --hk-base-100: #efe7df;
  --hk-base-200: #e4d8cc;
  --hk-primary: #6b7a52;
  --hk-primary-hover: #55633f;
  --hk-primary-light: #8fa178;
  --hk-accent: #d4a373;
  --hk-accent-hover: #c38e5d;
  --hk-accent-light: #e6be9a;
  --hk-text-primary: #2b2b2b;
  --hk-text-secondary: #5c5c5c;
  --hk-text-muted: #9a9a9a;
  --hk-success: #4caf50;
  --hk-error: #e57373;
  --hk-warning: #ffb74d;
}

body {
  background: var(--hk-base-50);
  color: var(--hk-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrapper {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1 1 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--hk-base-50);
  border-bottom: 1px solid var(--hk-base-200);
}

.site-header-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 14px 8px;
}

.site-header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  margin-bottom: 0;
}

.site-menu-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hk-base-200);
  background: var(--hk-base-100);
  color: var(--hk-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-logo {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hk-text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.site-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: #ef4444;
  vertical-align: middle;
}

.site-nav-dot--mobile {
  margin-left: 8px;
}

/* Кошик у шапці лише на десктопі; на мобільному — у нижньому меню */
.site-icon-btn.site-header-cart-desktop {
  display: none;
}

.site-icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.site-icon-btn.is-active {
  color: var(--hk-text-primary);
  background: var(--hk-base-100);
}

.site-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.site-search {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}

.site-search input {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--hk-base-200);
  background: #f7f7f7;
  padding: 0 12px;
  font-size: 0.92rem;
}

.site-search button {
  height: 38px;
  border-radius: 8px;
  border: 0;
  background: var(--hk-accent);
  color: #fff;
}

.site-search button:hover {
  background: var(--hk-accent-hover);
}

.site-nav-desktop {
  display: none;
}

.mobile-main-menu {
  display: none;
  border-top: 1px solid var(--hk-base-200);
  background: var(--hk-base-50);
  padding: 8px 14px 12px;
}

.mobile-main-menu.show {
  display: grid;
}

.mobile-main-menu a {
  color: var(--hk-text-primary);
  text-decoration: none;
  padding: 10px 4px;
  border-bottom: 1px solid #f2f4f8;
}

.mobile-main-menu a:last-child {
  border-bottom: 0;
}

.mobile-main-menu a.is-active {
  color: var(--hk-primary);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(212, 163, 115, 0.2) 0%, transparent 100%);
  border-radius: 8px;
  padding-left: 10px;
  margin-left: -6px;
  margin-right: -6px;
  border-bottom-color: transparent;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: var(--hk-base-50);
  border-top: 1px solid var(--hk-base-200);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 70;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--hk-text-secondary);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.72rem;
  gap: 2px;
}

.mobile-bottom-nav i {
  font-size: 1rem;
}

.mobile-bottom-nav a.is-active,
.mobile-bottom-nav button.is-active {
  color: var(--hk-accent-hover);
}

.mobile-bottom-nav a.is-active i {
  color: var(--hk-accent-hover);
}

.mobile-bottom-nav-cart {
  position: relative;
}

.mobile-bottom-nav a {
  position: relative;
}

.mobile-bottom-nav-badge {
  position: absolute;
  top: 6px;
  right: 14px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--hk-accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.mobile-orders-dot {
  position: absolute;
  top: 8px;
  right: 22px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
}

.site-footer {
  margin-top: 28px;
  background: #2b2b2b;
  color: #ddd2c7;
  padding-bottom: 72px;
}

.site-footer-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 14px 14px;
}

.site-footer-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.site-footer-brand p {
  margin: 0 0 12px;
  color: #98a2b3;
  font-size: 0.9rem;
}

.site-footer-links {
  display: grid;
  gap: 8px;
}

.site-footer-links a {
  color: #d0d5dd;
  text-decoration: none;
}

.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  text-align: center;
  color: #98a2b3;
  font-size: 0.82rem;
}

@media (min-width: 992px) {
  .site-header-shell {
    max-width: 1240px;
    padding: 10px 16px 8px;
  }

  .site-menu-toggle {
    display: none;
  }

  .site-header-top {
    display: grid;
    grid-template-columns: auto minmax(420px, 560px) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 14px;
  }

  .site-logo,
  .site-search,
  .site-actions {
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
  }

  .site-logo {
    justify-self: start;
  }

  .site-search {
    flex: 0 1 auto;
    margin-top: 0;
    grid-template-columns: 1fr 38px;
    gap: 8px;
  }

  .site-search input {
    height: 34px;
    border-radius: 7px;
    background: #f4f4f4;
  }

  .site-search button {
    height: 34px;
    border-radius: 7px;
  }

  .site-actions {
    justify-self: end;
  }

  .site-icon-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    font-size: 1rem;
  }

  .site-nav-desktop {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ececec;
  }

  .site-nav-desktop a {
    color: #3f3f46;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
  }

  .site-nav-desktop .site-nav-link {
    position: relative;
    padding-bottom: 6px;
    transition: color 0.15s ease;
  }

  .site-nav-desktop .site-nav-link:hover {
    color: #2b2b2b;
  }

  .site-nav-desktop .site-nav-link.is-active {
    color: #1f2937;
  }

  .site-nav-desktop .site-nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #1f2937;
    border-radius: 999px;
  }

  .mobile-main-menu,
  .mobile-bottom-nav {
    display: none;
  }

  .site-icon-btn.site-header-cart-desktop {
    display: inline-flex;
  }

  .site-footer {
    padding-bottom: 0;
  }

  .site-footer-shell {
    padding: 26px 14px 18px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 18px;
    align-items: start;
  }

  .site-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
  }
}

/* Global warm overrides above app.entry.min.css */
.wrapper,
.content,
main,
section {
  background-color: transparent;
}

body,
.wrapper {
  background: var(--hk-base-50) !important;
  color: var(--hk-text-primary);
}

.card,
.modal-content,
.dropdown-menu {
  border-color: var(--hk-base-200) !important;
}

.btn-primary,
.bg-primary {
  background-color: var(--hk-primary) !important;
  border-color: var(--hk-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--hk-primary-hover) !important;
  border-color: var(--hk-primary-hover) !important;
}

.btn-success {
  background-color: var(--hk-accent) !important;
  border-color: var(--hk-accent) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: var(--hk-accent-hover) !important;
  border-color: var(--hk-accent-hover) !important;
}

.btn-outline-primary {
  color: var(--hk-primary) !important;
  border-color: var(--hk-primary-light) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--hk-primary) !important;
  border-color: var(--hk-primary) !important;
  color: #fff !important;
}

.text-primary,
a.text-primary,
.link-primary,
.page-link,
.nav-link.active {
  color: var(--hk-primary) !important;
}

.page-link {
  border-color: var(--hk-base-200) !important;
  background: #fff;
}

.page-item.active .page-link {
  background: var(--hk-primary) !important;
  border-color: var(--hk-primary) !important;
  color: #fff !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--hk-primary-light) !important;
  box-shadow: 0 0 0 3px rgba(107, 122, 82, 0.18) !important;
}
