/* Catalog pages: mobile/tablet overrides for style-original.css (≤1024px) */
@media (max-width: 1024px) {
  /* Reset forced body padding */
  body.cct-page, body.catalog-page {
    padding-top: 0 !important;
  }
  /* Tighter hero on mobile */
  .cct-hero {
    padding: 16px 0 24px !important;
  }
  .cct-hero-inner {
    flex-direction: column !important;
    gap: 20px !important;
  }
  .cct-hero-img {
    flex: 0 0 auto !important;
    max-width: 280px !important;
  }
  .cct-hero-info h1 {
    font-size: 20px !important;
  }
  .cct-hero-price {
    font-size: 22px !important;
  }
  /* Reset fixed header height → auto */
  .cct-page .header, .catalog-page .header {
    height: auto !important;
  }
  /* Reset header-top fixed height, keep compact padding */
  .cct-page .header-top, .catalog-page .header-top {
    height: auto !important;
    padding: 8px 16px !important;
  }
  /* Make nav visible & flex, not hidden grid */
  .cct-page .nav, .catalog-page .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: center !important;
  }
  /* Nav links: inline, not grid items */
  .cct-page .nav a, .catalog-page .nav a {
    display: inline !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #333 !important;
    padding: 6px 0 !important;
    height: auto !important;
    white-space: nowrap !important;
    border: none !important;
    background: none !important;
    text-decoration: none !important;
    align-items: normal !important;
    justify-content: normal !important;
    text-align: left !important;
  }
  .cct-page .nav a:last-child, .catalog-page .nav a:last-child {
    border-right: none !important;
  }
  .cct-page .nav a:hover, .catalog-page .nav a:hover {
    background: none !important;
    color: #F77C2A !important;
  }
  /* Mega menu wrap needs relative positioning */
  .cct-page .mega-menu-wrap, .catalog-page .mega-menu-wrap {
    position: relative !important;
  }
  /* Mega menu link inline-flex */
  .cct-page .nav .mega-menu-link, .catalog-page .nav .mega-menu-link {
    display: inline-flex !important;
    font-size: 12px !important;
    padding: 6px 0 !important;
  }
  /* Consult button compact */
  .cct-page .consult-btn, .catalog-page .consult-btn {
    min-width: 100px !important;
    padding: 5px 10px !important;
    font-size: 10px !important;
    height: 28px !important;
  }

  /* Logo smaller */
  .cct-page .logo-img, .catalog-page .logo-img {
    height: 50px !important;
    max-width: 160px !important;
    padding-top: 4px !important;
    padding-bottom: 2px !important;
  }
  .cct-page .logo-section, .catalog-page .logo-section {
    flex: 0 0 auto !important;
  }
  .cct-page .logo, .catalog-page .logo {
    margin-bottom: 0 !important;
    min-height: auto !important;
  }

  /* Phone compact */
  .cct-page .phone-number a, .catalog-page .phone-number a {
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  .cct-page .phone, .catalog-page .phone {
    font-size: 12px !important;
    padding-left: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Header-right keeps row */
  .cct-page .header-right, .catalog-page .header-right {
    flex-direction: row !important;
    gap: 8px !important;
  }

  /* Hide desktop mega-menu dropdown on tablet (use overlay instead) */
  .cct-page .mega-menu-wrap:hover .mega-menu,
  .catalog-page .mega-menu-wrap:hover .mega-menu {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  /* Breadcrumbs: left padding */
  .cct-page .breadcrumbs, .catalog-page .breadcrumbs,
  .cct-page .cct-breadcrumbs, .catalog-page .cct-breadcrumbs,
  .cct-page .catalog-breadcrumbs, .catalog-page .catalog-breadcrumbs {
    padding-left: 24px !important;
  }
}

/* Tablet: overlay in 2 columns (769-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-menu-overlay .mobile-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
}

/* Ultra-small screens: tighten further */
@media (max-width: 480px) {
  .cct-page .header-top, .catalog-page .header-top {
    padding: 6px 10px !important;
    gap: 4px !important;
  }
  .cct-page .nav, .catalog-page .nav {
    gap: 6px !important;
  }
  .cct-page .nav a, .catalog-page .nav a,
  .cct-page .nav .mega-menu-link, .catalog-page .nav .mega-menu-link {
    font-size: 10px !important;
    padding: 4px 0 !important;
  }
  .cct-page .consult-btn, .catalog-page .consult-btn {
    min-width: 70px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
    height: 24px !important;
  }
  .cct-page .logo-img, .catalog-page .logo-img {
    height: 36px !important;
    max-width: 120px !important;
  }
  .cct-page .phone-number a, .catalog-page .phone-number a {
    font-size: 10px !important;
  }
}

/* Full-screen mobile menu overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu-overlay.active {
  display: block;
}
.mobile-menu-overlay .mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.mobile-menu-overlay .mobile-menu-header span {
  font-size: 18px;
  font-weight: 700;
  color: #2b2b39;
}
.mobile-menu-overlay .mobile-menu-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 4px 12px;
  line-height: 1;
  border-radius: 8px;
  transition: background .2s;
}
.mobile-menu-overlay .mobile-menu-close:hover {
  background: #f5f5f5;
  color: #333;
}
.mobile-menu-overlay .mobile-menu-content {
  padding: 8px 24px 40px;
}
.mobile-menu-overlay .mega-col {
  margin-bottom: 0;
  padding: 0;
}
.mobile-menu-overlay .mega-col h3 {
  font-size: 16px;
  font-weight: 700;
  color: #F77C2A;
  margin: 0;
  padding: 16px 0 8px;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-menu-overlay .mega-col h3 a {
  color: #F77C2A;
  text-decoration: none;
}
.mobile-menu-overlay .mega-col a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f8f8f8;
  line-height: 1.4;
  background: none;
}
.mobile-menu-overlay .mega-col a:last-child {
  border-bottom: none;
}
.mobile-menu-overlay .mega-col a:hover {
  color: #F77C2A;
  background: none;
}
.mobile-menu-overlay .mega-aux {
  display: none;
}
