/**
 * Common Header & Footer Styles
 * Include this file on every page that uses #site-header-placeholder and #site-footer-placeholder
 * Font: Inter (load via page: fonts.googleapis.com Inter 400,500,600,700)
 */

:root {
  --hf-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hf-color-primary: #FFAA4C;
  --hf-color-primary-hover: #e6993a;
  --hf-color-dark: #374151;
  --hf-color-muted: #6B7280;
  --hf-color-border: #D1D5DB;
  --hf-color-bg: #F8F8F8;
  --hf-color-white: #FFFFFF;
  --hf-radius-input: 8px;
}

/* ========== HEADER ========== */
.site-header {
  background: var(--hf-color-bg);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .logo-text {
  font-size: 1.25rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.site-header .logo-text img {
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
}

.site-header .nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header .nav-menu a {
  color: var(--hf-color-muted);
  text-decoration: none;
  font-family: var(--hf-font);
  font-size: 15px;
  font-weight: 500;
}

.site-header .nav-menu a:hover {
  color: var(--hf-color-dark);
}

.site-header .nav-menu a.active {
  color: var(--hf-color-dark);
  border-bottom: 2px solid var(--hf-color-primary);
  padding-bottom: 2px;
}

/* Logo + main nav grouped on the left; utilities stay on the right (justify-content-between on .site-header-inner) */
.site-header .site-header-inner {
  column-gap: 1rem;
  row-gap: 0.75rem;
}

.site-header .site-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

@media (min-width: 992px) {
  .site-header .site-header-left {
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
    flex-wrap: nowrap;
  }
}

.site-header .header-utilities {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .site-header .header-utilities {
    gap: clamp(0.5rem, 1vw, 0.75rem);
    margin-left: auto;
  }

  /* Space between last nav link (Price) and Register / icons */
  .site-header .site-header-inner {
    column-gap: clamp(1.25rem, 3vw, 2.5rem);
  }
}

.site-header .header-auth-link {
  color: var(--hf-color-muted);
  text-decoration: none;
  font-family: var(--hf-font);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.site-header .header-auth-link:hover {
  color: var(--hf-color-dark);
}

/* Catalog hover dropdown – 9 cards in 3x3 grid, centered, 80% of screen */
.site-header .nav-item-has-dropdown {
  position: relative;
}
.site-header .nav-catalog-dropdown {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  max-width: 80vw;
  height: 80vh;
  max-height: 80vh;
  padding: 0.75rem;
  background: var(--hf-color-white);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
  transition-delay: 0.25s;
  z-index: 1001;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.site-header .nav-item-has-dropdown:hover .nav-catalog-dropdown,
.site-header .nav-catalog-dropdown.nav-catalog-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.site-header .nav-catalog-dropdown-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  max-width: 100%;
  width: 100%;
}
.site-header .nav-catalog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.site-header .nav-catalog-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.site-header .nav-catalog-card-header {
  background: #ffa54f;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.35rem 0.25rem;
  line-height: 1.15;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header .nav-catalog-card-img {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #e5e7eb;
}
.site-header .nav-catalog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-header .header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header .icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hf-color-muted);
  border: none;
  background: transparent;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
}

.site-header .icon-btn:hover {
  color: var(--hf-color-dark);
  background: rgba(0,0,0,0.05);
}

.site-header .icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
}

/* Language pill (same as register page) */
.site-header .lang-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  background: var(--hf-color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
  font-family: var(--hf-font);
}
.site-header .lang-pill:hover {
  transform: translateY(-1px);
}
.site-header .lang-flag-large {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.site-header .lang-text-bold {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hf-color-dark);
  margin-right: 2px;
}
.site-header .lang-chevron {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--hf-color-dark);
}

/* ========== HEADER RESPONSIVE (mobile-first redesign) ========== */
.site-header .container {
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}
.site-header .d-flex {
  min-height: 64px;
  flex-wrap: nowrap;
}
.site-header .logo-text {
  flex-shrink: 0;
}

/* Mobile menu button (hamburger) */
.site-header .header-menu-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.site-header .header-menu-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.site-header .header-menu-btn[aria-expanded="true"] .header-menu-icon {
  background: transparent;
}
.site-header .header-menu-btn[aria-expanded="true"] .header-menu-icon::before {
  transform: translateY(0) rotate(45deg);
}
.site-header .header-menu-btn[aria-expanded="true"] .header-menu-icon::after {
  transform: translateY(0) rotate(-45deg);
}
.site-header .header-menu-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hf-color-dark);
  border-radius: 1px;
  position: relative;
  transition: background 0.2s;
}
.site-header .header-menu-icon::before,
.site-header .header-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--hf-color-dark);
  border-radius: 1px;
  transition: transform 0.25s ease;
}
.site-header .header-menu-icon::before {
  top: -7px;
}
.site-header .header-menu-icon::after {
  top: 7px;
}

/* Mobile drawer */
.site-header .header-mobile-drawer {
  background: var(--hf-color-white);
  border-top: 1px solid var(--hf-color-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.site-header .header-drawer-inner {
  padding: 1rem 1rem 1.25rem;
}
.site-header .header-mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header .header-mobile-nav li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header .header-mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--hf-color-dark);
  text-decoration: none;
  transition: color 0.15s, padding-left 0.15s;
}
.site-header .header-mobile-nav a:hover,
.site-header .header-mobile-nav a.active {
  color: var(--hf-color-primary);
}
.site-header .header-mobile-nav a.active {
  border-left: 3px solid var(--hf-color-primary);
  margin-left: -1rem;
  padding-left: calc(1rem + 0.75rem);
}
.site-header .header-mobile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hf-color-border);
}
.site-header .header-mobile-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--hf-color-muted);
  text-decoration: none;
  padding: 0.5rem 0;
}
.site-header .header-mobile-link:hover {
  color: var(--hf-color-dark);
}
.site-header .header-mobile-cta {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--hf-color-primary);
  color: var(--hf-color-white);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}
.site-header .header-mobile-cta:hover {
  background: var(--hf-color-primary-hover);
  color: var(--hf-color-white);
}

/* Mobile: compact icons and lang pill */
@media (max-width: 991.98px) {
  .site-header {
    padding: 0.6rem 0;
  }
  .site-header .logo-text img {
    height: 46px;
    max-width: 230px;
  }
  .site-header .header-icons {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .site-header .icon-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .site-header .lang-pill-header {
    padding: 4px 8px 4px 4px;
    gap: 6px;
  }
  .site-header .lang-flag-large {
    width: 22px;
    height: 22px;
  }
  .site-header .lang-text-bold {
    font-size: 0.8125rem;
  }
}

@media (max-width: 575.98px) {
  .site-header .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .site-header .logo-text img {
    height: 40px;
    max-width: 200px;
  }
  .site-header .icon-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .site-header .header-menu-btn {
    width: 40px;
    height: 40px;
  }
  .site-header .header-mobile-nav a {
    padding: 0.75rem 0;
    font-size: 0.9375rem;
  }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--hf-color-bg);
  padding: 2.5rem 0 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.site-footer .footer-brand .logo-text {
  font-size: 1.125rem;
}

.site-footer .footer-brand .logo-text img {
  height: 52px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.site-footer .footer-desc {
  font-size: 13px;
  color: var(--hf-color-muted);
  margin: 0.75rem 0 1rem;
  max-width: 220px;
}

.site-footer .footer-social {
  display: flex;
  gap: 0.75rem;
}

.site-footer .footer-social a {
  color: var(--hf-color-muted);
  font-size: 1.25rem;
  text-decoration: none;
}

.site-footer .footer-social a:hover {
  color: var(--hf-color-dark);
}

.site-footer {
  font-family: var(--hf-font);
}
.site-footer .footer-col h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--hf-color-dark);
  margin-bottom: 0.75rem;
}

.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer .footer-col a {
  font-size: 13px;
  color: var(--hf-color-muted);
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
}

.site-footer .footer-col a:hover {
  color: var(--hf-color-dark);
}

.site-footer .footer-bottom {
  padding: 1rem 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer .footer-bottom span {
  font-size: 12px;
  color: var(--hf-color-muted);
}

.site-footer .footer-bottom-links {
  display: flex;
  gap: 1rem;
}

.site-footer .footer-bottom-links a {
  font-size: 12px;
  color: var(--hf-color-muted);
  text-decoration: none;
}

.site-footer .footer-bottom-links a:hover {
  color: var(--hf-color-dark);
}

@media (max-width: 991.98px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  /* Logo side (brand, para, social) stays full width */
  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }
  /* Rest sections: 2 per row — Quick Links | Support, then Contact */
  .site-footer .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }
  .site-footer .footer-brand .footer-desc {
    max-width: none;
  }
  .site-footer .footer-col:last-child {
    grid-column: 1 / -1;
  }
  .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
