/**
 * Kapil Cutting Tools - Responsive & Mobile Styling
 *
 * @package KapilCuttingTools
 */

/* Mobile Navigation Hamburger Button */
.kct-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.kct-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--kct-navy);
  border-radius: 2px;
  transition: var(--kct-transition);
}

.kct-hamburger.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.kct-hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.kct-hamburger.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Bottom Mobile Sticky Action Bar */
.kct-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--kct-navy);
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}

.kct-mobile-sticky-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: rgba(255, 255, 255, 0.15);
}

.kct-mobile-action-btn {
  background-color: var(--kct-navy);
  color: var(--kct-clean-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  gap: 0.2rem;
}

.kct-mobile-action-btn.call {
  background-color: var(--kct-navy-dark);
}
.kct-mobile-action-btn.whatsapp {
  background-color: #128C7E;
}
.kct-mobile-action-btn.quote {
  background-color: var(--kct-accent-red);
}

/* Tablet Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
  .kct-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--kct-clean-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow-y: auto;
  }

  .kct-nav.is-open {
    display: flex;
  }

  .kct-nav a {
    font-size: 1.1rem;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--kct-light-grey);
  }

  .kct-hamburger {
    display: block;
  }

  .kct-header-ctas {
    display: none;
  }
}

/* Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 60px; /* Prevent footer clipping behind mobile action bar */
  }

  .kct-mobile-sticky-bar {
    display: block;
  }

  .kct-top-bar {
    font-size: 0.78rem;
  }

  .kct-top-info {
    justify-content: center;
    width: 100%;
  }

  .kct-top-actions {
    display: none;
  }

  .kct-form-grid {
    grid-template-columns: 1fr;
  }

  .kct-form-full {
    grid-column: span 1;
  }

  .kct-specs-table th {
    width: 45%;
  }
}

/* Small Mobile (<= 480px / 360px / 390px) */
@media (max-width: 480px) {
  .kct-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .kct-brand-logo {
    font-size: 1.15rem;
  }

  .kct-logo-mark {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .kct-product-grid {
    grid-template-columns: 1fr;
  }
}
