/* ==========================================================================
   NEELKANTH CRAFT - RESPONSIVE STYLESHEET
   Mobile, Tablet & Breakpoint Adapters
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LARGE DESKTOPS & SCREENS (<= 1280px)
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .header-inner {
    padding: 0 24px;
  }
  
  .nav-menu {
    gap: 22px;
  }
  
  .intro-grid {
    gap: 32px;
  }
  
  .skills-grid {
    gap: 40px;
  }
  
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 30px;
  }
}

/* --------------------------------------------------------------------------
   2. TABLET LANDSCAPE & MEDIUM DESKTOPS (<= 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  /* Header & Mobile Drawer Navigation */
  .mobile-menu-btn {
    display: flex !important;
  }

  /* Backdrop Overlay */
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 40, 82, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Off-canvas Slide-Out Drawer */
  .desktop-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background-color: #ffffff;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -10px 0 35px rgba(8, 40, 82, 0.18);
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }

  .desktop-nav.active {
    transform: translateX(0);
  }

  /* Drawer Header */
  .mobile-drawer-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(8, 40, 82, 0.08);
    background: #faf8f5;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .mobile-drawer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-drawer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
  }

  .mobile-drawer-text {
    display: flex;
    flex-direction: column;
  }

  .drawer-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neelkanth-blue);
    line-height: 1.15;
  }

  .drawer-tagline {
    font-family: var(--font-sans);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--neelkanth-gold);
    font-weight: 700;
    margin-top: 2px;
  }

  .mobile-nav-close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--neelkanth-blue);
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .mobile-nav-close-btn:hover {
    color: var(--neelkanth-gold);
    transform: rotate(90deg);
  }

  /* Nav Menu List */
  .desktop-nav .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    flex: 1 1 auto;
    margin: 0;
    list-style: none;
    width:93%;
  }

  .desktop-nav .nav-item {
    position: relative;
    border-bottom: 1px solid rgba(8, 40, 82, 0.06);
    display: block;
    width: 100%;
  }

  .desktop-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--neelkanth-blue);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

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

  .desktop-nav .nav-link i.arrow {
    font-size: 0.72rem;
    margin-left: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: transform 0.3s ease, color 0.2s ease;
  }

  .desktop-nav .nav-item.dropdown-open > .nav-link i.arrow {
    transform: rotate(180deg);
    color: var(--neelkanth-cyan);
  }

  /* Accordion Submenu Dropdown */
  .desktop-nav .nav-dropdown {
    position: static;
    top: auto;
    left: auto;
    min-width: 100%;
    width: 100%;
    background-color: #f7f9fb;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--neelkanth-gold);
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), padding 0.3s ease;
    z-index: 1;
    list-style: none;
  }

  .desktop-nav .nav-item.dropdown-open > .nav-dropdown {
    max-height: 500px;
    padding: 6px 0;
  }

  .desktop-nav .nav-dropdown-item a {
    display: block;
    padding: 9px 20px 9px 30px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .desktop-nav .nav-dropdown-item a:hover {
    color: var(--neelkanth-cyan);
    padding-left: 36px;
    background-color: rgba(0, 180, 216, 0.08);
  }

  /* Drawer Footer */
  .mobile-drawer-footer {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
    background-color: #faf8f5;
    border-top: 1px solid rgba(8, 40, 82, 0.08);
    margin-top: auto;
  }

  .mobile-drawer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--neelkanth-blue);
    text-decoration: none;
    font-weight: 500;
  }

  .mobile-contact-item i {
    color: var(--neelkanth-gold);
    width: 16px;
    font-size: 0.85rem;
  }

  .mobile-nav-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
  }

  .mobile-nav-whatsapp-btn:hover {
    background-color: #1ebc57;
  }

  .mobile-nav-whatsapp-btn i {
    font-size: 1.05rem;
  }

  /* Intro Section */
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .intro-main-col {
    padding-right: 0;
    text-align: center;
  }

  .intro-feature-card {
    padding-top: 0;
    text-align: center;
  }

  /* Portfolio Grid */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
  }
  
  .portfolio-item.large {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Products Carousel */
  .product-card {
    flex: 0 0 calc(50% - 15px);
  }

  /* Workshop Split */
  .workshop-grid {
    grid-template-columns: 1fr;
  }
  
  .workshop-image-side {
    min-height: 420px;
  }
  
  .workshop-features-side {
    padding: 60px 8%;
  }

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Parallax Counters */
  .counters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  /* Blog Grid */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .blog-card:last-child {
    grid-column: span 2;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Store Locations */
  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  /* Instagram Grid */
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* --------------------------------------------------------------------------
   3. TABLET PORTRAIT (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section-padding {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  /* Hero Slider */
  .hero-slider-section {
    min-height: 540px;
    height: 85vh;
  }

  .slider-arrow {
    display: none;
  }
  
  .hero-slide .slide-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero-slide .slide-desc {
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 24px;
  }

  /* Category Banners */
  .banners-grid {
    grid-template-columns: 1fr;
  }

  .category-banner {
    height: 360px;
  }

  /* Team Grid */
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
    gap: 50px;
  }

  /* Workshop Features */
  .workshop-features-side {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Blog Cards */
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  
  .blog-card:last-child {
    grid-column: span 1;
  }

  /* Quick View Modal */
  .quickview-card {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .quickview-img {
    height: 260px;
    min-height: auto;
  }

  .quickview-content {
    padding: 24px;
  }

  /* Promo Banner */
  .promo-callout-content {
    padding: 20px 24px;
    margin: 0 16px;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   4. MOBILE PHONES (<= 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .header-inner {
    padding: 0 16px;
    height: 74px;
  }

  .brand-title {
    font-size: 1.35rem;
  }
  
  .brand-monogram {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .header-actions {
    gap: 14px;
  }
  
  .header-action-btn span:not(.cart-count) {
    display: none;
  }

  /* Products */
  .product-card {
    flex: 0 0 100%;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
  
  .portfolio-item.large {
    grid-column: span 1;
  }

  /* Milestone Counters */
  .counters-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Locations */
  .locations-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .location-item h4 {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  /* Newsletter Form */
  .newsletter-form {
    flex-direction: column;
    box-shadow: none;
  }

  .newsletter-input {
    border-right: 1px solid var(--border-light);
    margin-bottom: 12px;
    text-align: center;
  }

  .newsletter-btn {
    padding: 16px;
  }

  /* Instagram Grid */
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand-logo {
    display: flex;
    justify-content: center;
  }

  .footer-brand-link {
    justify-content: center;
    text-align: left;
  }
  
  .footer-socials {
    justify-content: center;
  }

  .footer-links a:hover {
    padding-left: 0;
  }

  /* Back to Top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  /* Drawers */
  .side-drawer,
  .mini-cart-drawer {
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
  }
}
