/* ==========================================================================
   KC BOUTIQUE - UNIVERSAL RESPONSIVE STYLESHEET (UPGRADED BREAKPOINTS)
   ========================================================================== */

/* Global Containment */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   1. ULTRA-WIDE & 4K DISPLAYS (1440px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  .container {
    max-width: 1380px;
  }
  .hero-title {
    font-size: 4.5rem;
  }
}

/* --------------------------------------------------------------------------
   2. DESKTOPS & LARGE LAPTOPS (992px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .hamburger {
    display: none !important;
  }
  .mobile-drawer-header,
  .mobile-only-btn {
    display: none !important;
  }
  .nav-actions #open-search-btn,
  .nav-actions #theme-toggle-btn {
    display: inline-flex !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    padding: 0 20px;
  }

  .logo-text {
    font-size: 1.45rem;
    letter-spacing: 2px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.72rem;
    letter-spacing: 1px;
  }

  .nav-actions {
    gap: 6px;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS, IPADS & MOBILE DEVICES (Up to 991px) - MOBILE DRAWER ACTIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  :root {
    --nav-height: 65px;
  }

  .container {
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .top-bar {
    font-size: 0.65rem;
    padding: 6px 10px;
    width: 100%;
  }

  .top-bar p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  /* Header Mobile/Tablet Layout - Bulletproof Zero-Overlap */
  .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    height: var(--nav-height) !important;
    padding: 0 !important;
  }

  .brand-logo {
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .logo-text {
    font-size: 1.25rem !important;
    letter-spacing: 1.5px !important;
    white-space: nowrap !important;
  }

  .logo-tagline {
    display: none !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  /* Hide Search & Dark Mode icons from header bar on mobile/tablet to prevent crowding */
  .nav-actions #open-search-btn,
  .nav-actions #theme-toggle-btn {
    display: none !important;
  }

  .nav-icon-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }

  .hamburger {
    display: flex !important;
    margin-left: 4px !important;
    z-index: 10002 !important;
  }

  /* Mobile Drawer Header & Drawer Button */
  .mobile-drawer-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-only-btn {
    display: inline-flex !important;
    width: 100%;
    margin-top: 15px;
  }

  /* Slide-in Mobile Drawer using Transform */
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 85% !important;
    max-width: 320px !important;
    height: 100vh !important;
    background: var(--bg-card) !important;
    flex-direction: column !important;
    padding: 80px 20px 40px 20px !important;
    gap: 12px !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25) !important;
    transform: translateX(100%) !important;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    z-index: 10001 !important;
    overflow-y: auto !important;
  }

  .nav-links.active {
    transform: translateX(0) !important;
  }

  .nav-links a {
    font-size: 0.9rem !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
    width: 100% !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 40px 0 30px 0;
    min-height: auto;
    width: 100%;
  }

  .hero-tag {
    font-size: 0.72rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .btn {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.78rem;
    justify-content: center;
  }

  /* Category Cards Mobile */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .category-card {
    height: 300px;
    border-radius: var(--radius-sm);
  }

  .category-title {
    font-size: 1.4rem;
  }

  /* Filter Tabs Touch Scroll */
  .filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 5px 0 12px 0;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    width: 100%;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  /* Product Grid Layout */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
  }

  .product-card {
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .product-img-wrapper {
    height: 260px;
    width: 100%;
  }

  .product-info {
    padding: 14px;
  }

  .product-name {
    font-size: 0.95rem;
  }

  .product-actions-overlay {
    position: relative;
    bottom: 0;
    opacity: 1;
    background: transparent;
    padding: 10px 0 0 0;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .product-actions-overlay .btn {
    width: 100%;
    padding: 8px 6px;
    font-size: 0.7rem;
  }

  /* Tailoring Section */
  .tailoring-section {
    padding: 60px 0;
  }

  .tailoring-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .tailoring-features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0;
  }

  .tailoring-feature-card {
    padding: 16px;
  }

  .about-img-main {
    height: 350px;
    width: 100%;
  }

  .about-experience-badge {
    position: relative;
    right: 0 !important;
    bottom: 0 !important;
    margin-top: 15px;
    display: inline-block;
    padding: 15px 25px;
  }

  /* Slider */
  .slider-container {
    width: 100%;
  }

  .slider-card {
    min-width: 100%;
  }

  /* Promotional Banner Box */
  .banner-glass-box {
    padding: 25px 18px;
    border-radius: var(--radius-md);
  }

  .banner-heading {
    font-size: 1.7rem;
  }

  /* Instagram Grid */
  .insta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .insta-item {
    height: 150px;
  }

  /* Newsletter Box */
  .newsletter-card {
    padding: 30px 16px;
    border-radius: var(--radius-md);
  }

  .newsletter-card h2 {
    font-size: 1.7rem;
  }

  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }

  .newsletter-input {
    width: 100%;
    padding: 12px 18px;
  }

  /* Contact Form */
  .contact-form-container {
    padding: 20px 15px;
  }

  /* Footer */
  .footer {
    padding: 50px 0 20px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .copyright-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Modals */
  .modal-overlay {
    padding: 12px;
    width: 100vw;
    max-width: 100vw;
  }

  .quickview-box {
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    overflow-y: auto;
  }

  .quickview-img {
    height: 220px;
  }

  .quickview-content {
    padding: 16px;
  }

  .tailoring-box {
    width: 100%;
    max-height: 85vh;
    padding: 20px 15px;
    border-radius: var(--radius-md);
  }

  .suit-type-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .suit-chip {
    font-size: 0.72rem;
    padding: 8px 6px;
  }

  /* Prevent iOS Input Zoom */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Floating Buttons */
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }

  .scroll-top-btn {
    bottom: 15px;
    right: 72px;
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   4. SMARTPHONES & COMPACT SCREENS (Under 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .product-img-wrapper {
    height: 320px;
  }

  .product-actions-overlay {
    flex-direction: row;
  }

  .product-actions-overlay .btn {
    flex: 1;
  }
}

@media (max-width: 380px) {
  .logo-text {
    font-size: 1.15rem !important;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .suit-type-grid {
    grid-template-columns: 1fr;
  }

  .product-actions-overlay {
    flex-direction: column;
  }
}
