/* ==========================================================================
   MISTY FROZEN FOODS – RESPONSIVE STYLESHEET (responsive.css)
   Desktop (>1024px), Tablet (<=991px), and Mobile (<=767px / <=480px)
   ========================================================================== */

/* ==================== LARGE DESKTOP (> 1140px) ==================== */
@media screen and (min-width: 1140px) {
  .container {
    max-width: 1140px;
  }

  .about-split-wrapper {
    max-width: 1140px;
  }

  .product-img-wrap {
    height: 118px;
  }
}

/* ==================== TABLET & SMALL LAPTOP (<= 991px) ==================== */
@media screen and (max-width: 991px) {
  .container {
    padding: 0 24px;
  }

  /* Navigation: Hamburger menu on Tablet & Mobile */
  .hamburger-btn {
    display: inline-flex;
  }

  .btn-quote-header {
    padding: 8px 16px;
    font-size: 0.78rem;
  }

  .main-nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
    background-color: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 24px;
    box-shadow: 0 14px 30px rgba(6, 33, 59, 0.14);
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1995;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    font-size: 0.94rem;
    padding: 10px 8px;
    border-radius: 6px;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: var(--bg-light);
  }

  /* Mobile Language Dropdown inside Hamburger Menu */
  .nav-item-dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .lang-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    font-size: 0.94rem;
    padding: 10px 8px;
    border-radius: 6px;
    text-align: left;
  }

  .lang-caret-icon {
    margin-left: auto;
    font-size: 0.68rem;
  }

  .lang-dropdown-menu {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
    box-shadow: none;
    border: 1px solid #DFEAF5;
    background-color: #F4F9FD;
    border-radius: 8px;
    margin-top: 4px;
    padding: 6px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .lang-dropdown-menu::before {
    display: none;
  }

  .nav-item-dropdown.open .lang-dropdown-menu,
  .lang-dropdown-toggle[aria-expanded="true"] + .lang-dropdown-menu {
    display: block;
  }

  .lang-dropdown-link {
    font-size: 0.92rem;
    min-height: 44px;
    padding: 10px 12px;
  }

  .mobile-nav-cta {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
  }

  .mobile-nav-cta .btn {
    width: 100%;
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  /* Hero adjustments */
  .hero-section {
    min-height: 400px;
  }

  .hero-content {
    margin-left: 0;
    max-width: 420px;
  }

  .hero-heading {
    font-size: 2.35rem;
  }

  /* Highlights: 2x2 grid on tablet */
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 18px;
  }

  .highlight-item {
    padding: 6px 14px;
  }

  .highlight-item:nth-child(2) {
    border-right: none;
  }

  .highlight-item:first-child {
    padding-left: 14px;
  }

  /* Products: Two product cards per row on Tablet */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-img-wrap {
    height: 160px;
  }

  .product-info {
    padding: 10px 14px;
    min-height: 54px;
  }

  .product-name {
    font-size: 1.05rem;
  }

  .product-specs {
    font-size: 0.76rem;
  }

  /* About & Sustainability: Stack panels cleanly on Tablet */
  .about-split-wrapper {
    grid-template-columns: 1fr;
  }

  .about-left-panel {
    padding: 32px 24px;
    min-height: 220px;
  }

  .about-left-content {
    max-width: 540px;
  }

  .about-right-panel {
    padding: 28px 24px;
  }

  /* Certifications */
  .certifications-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 0;
  }

  .certifications-copy {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #E4ECF4;
    padding-bottom: 12px;
  }

  .certifications-logos {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding-right: 0;
  }

  .cert-logo-img {
    height: 90px;
  }

  .cert-eia,
  .cert-haccp {
    height: 94px;
  }

  /* Footer: 2 columns on tablet */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
    column-gap: 24px;
  }

  .footer-col {
    padding: 0;
    border-right: none;
  }

  .footer-col:first-child {
    padding-left: 0;
  }

  .footer-bottom-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Modals */
  .product-modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Contact Us Page – Tablet: Two contact cards per row, adjusted form & map */
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .map-embed-wrapper,
  .map-embed-wrapper iframe {
    min-height: 360px;
  }

  .partnership-cta-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* ==================== MOBILE DEVICES (<= 767px) ==================== */
@media screen and (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .site-header {
    height: 62px;
  }

  .main-nav {
    top: 62px;
    max-height: calc(100vh - 62px);
    padding: 16px;
  }

  .brand-logo {
    min-width: 0;
    max-width: calc(100% - 52px);
  }

  .logo-emblem {
    width: 42px;
    height: 36px;
    flex-shrink: 0;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-title {
    font-size: 0.96rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-tagline {
    font-size: 0.63rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-quote-header {
    display: none;
  }

  /* Hero section mobile: 100% full-visibility mobile image slider (no cropping, no text) */
  .hero-section {
    min-height: 0;
    height: auto;
    padding: 0;
    display: block;
    background-color: #06213B;
    overflow: hidden;
  }

  .hero-section .hero-bg-wrapper,
  .hero-section .hero-container,
  .hero-section .desktop-hero-controls {
    display: none !important;
  }

  .mobile-hero-slider {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: #06213B;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  .mobile-hero-track {
    position: relative;
    width: 100%;
    aspect-ratio: 1199 / 1312;
    background-color: #06213B;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
  }

  .mobile-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #06213B;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease-in-out, visibility 0.65s ease-in-out;
    pointer-events: none;
    z-index: 1;
  }

  .mobile-hero-slide:first-child {
    position: relative;
  }

  .mobile-hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
  }

  .mobile-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    transform: none;
    margin: 0 auto;
  }

  .mobile-hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #06213B;
    position: relative;
    z-index: 4;
  }

  .mobile-hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
  }

  .mobile-hero-dot.active {
    width: 22px;
    background-color: #0875E1;
  }

  /* Highlights: 2 columns or 1 column on mobile */
  .highlights-section {
    padding: 18px 0;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .highlight-item,
  .highlight-item:first-child {
    padding: 10px 12px;
    border-right: none;
    border: 1px solid #E8F0F8;
    border-radius: 10px;
    background-color: #FAFCFF;
  }

  /* Products Section: Two product cards per row on Mobile */
  .products-section {
    padding: 24px 0 28px;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-heading {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-img-wrap {
    height: 105px;
  }

  .product-info {
    padding: 8px 10px;
    min-height: 48px;
  }

  .product-name {
    font-size: 0.86rem;
  }

  .product-specs {
    font-size: 0.64rem;
  }

  .product-arrow-btn {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
  }

  /* About & Sustainability mobile */
  .about-left-panel {
    padding: 26px 16px;
  }

  .about-heading {
    font-size: 1.45rem;
  }

  .about-right-panel {
    padding: 22px 16px;
  }

  .about-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Certifications: Responsive grid on mobile */
  .certifications-section {
    padding: 20px 0;
  }

  .certifications-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    justify-items: center;
  }

  .cert-logo-img,
  .cert-eia,
  .cert-haccp {
    height: 78px;
  }

  /* Footer: Stacked vertically on mobile */
  .footer-top {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-col {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 20px;
  }

  .footer-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Form Modal Mobile */
  .quote-modal-dialog,
  .product-modal-dialog {
    padding: 22px 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Contact Us Page – Mobile: Single-column cards, full-width form & map */
  .contact-hero-section {
    min-height: 230px;
  }

  .contact-hero-container {
    padding-top: 28px;
    padding-bottom: 30px;
  }

  .contact-hero-heading {
    font-size: 1.9rem;
  }

  .contact-hero-subtitle {
    font-size: 0.84rem;
  }

  .contact-info-section {
    padding: 28px 0 16px;
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-info-card {
    padding: 20px 18px;
  }

  .contact-main-section {
    padding: 16px 0 36px;
  }

  .contact-form-card,
  .contact-map-card {
    padding: 22px 18px;
  }

  .contact-section-heading {
    font-size: 1.45rem;
  }

  .contact-map-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-directions {
    width: 100%;
    justify-content: center;
  }

  .map-embed-wrapper,
  .map-embed-wrapper iframe {
    min-height: 260px;
  }

  .map-card-footer {
    grid-template-columns: 1fr;
  }

  .partnership-cta-section {
    padding: 32px 0;
  }

  .partnership-heading {
    font-size: 1.45rem;
  }

  .partnership-cta-action,
  .btn-partnership-cta {
    width: 100%;
    justify-content: center;
  }

  /* Floating WhatsApp Contact Button on Mobile */
  .whatsapp-float-btn {
    right: 18px;
    bottom: 20px;
    width: 55px;
    height: 55px;
  }

  .whatsapp-float-icon {
    width: 29px;
    height: 29px;
  }

  .whatsapp-float-tooltip {
    display: none;
  }
}

/* ==================== EXTRA SMALL MOBILE (<= 359px) ==================== */
@media screen and (max-width: 359px) {
  .brand-title {
    font-size: 0.86rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .certifications-logos {
    grid-template-columns: repeat(2, 1fr);
  }
}
