/* =============================================
   Sri Sathya Silks - Responsive CSS Fixes
   ============================================= */

/* -----------------------------------------------
   DESKTOP LARGE: Fix header layout (logo too big,
   search and nav not properly aligned)
----------------------------------------------- */

/* Header middle: logo + search + cart in one row */
.header-area .header-middle .header-middle-wrap .brand-area .brand-image {
  max-width: 180px !important;
  height: auto;
}

/* Make sure the header middle flex row is properly spaced */
.header-area .header-middle .header-middle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: nowrap;
}

/* Search area takes remaining space */
.header-area .header-middle .header-middle-wrap .search-area {
  flex: 1;
  max-width: 580px;
  min-width: 200px;
}

/* Header right stays compact */
.header-area .header-middle .header-middle-wrap .header-right {
  flex-shrink: 0;
}

/* Nav bar always visible below header middle */
.header-area .header-bottom {
  display: block !important;
}

/* -----------------------------------------------
   NORMAL DESKTOP: 992px - 1200px
----------------------------------------------- */
@media (min-width: 992px) and (max-width: 1200px) {
  .header-area .header-middle .header-middle-wrap .brand-area .brand-image {
    max-width: 150px !important;
  }

  .header-area .header-middle .header-middle-wrap .search-area {
    width: 380px;
    flex: 1;
  }

  .header-area .header-bottom .menu-area .main-menu .menu-item {
    margin: 0 1.2rem;
  }

  .header-area .header-bottom .menu-area .main-menu .menu-item .menu-link {
    font-size: 1.4rem;
  }
}

/* -----------------------------------------------
   MAX 1199px: Tablet-ish desktops
----------------------------------------------- */
@media (max-width: 1199px) {
  .header-area .header-middle .header-middle-wrap .brand-area .brand-image {
    max-width: 150px !important;
  }

  .header-area .header-middle .header-middle-wrap .search-area {
    width: 350px;
    flex: 1;
  }

  .header-area .header-middle .header-middle-wrap .header-right .single-btn {
    margin-right: 1.5rem;
  }

  /* Show text labels on cart/wishlist buttons */
  .header-area .header-middle .header-middle-wrap .header-right .single-btn .header-btn .btn-right {
    display: none;
  }
}

/* -----------------------------------------------
   TABLET: 768px - 991px
----------------------------------------------- */
@media (min-width: 768px) and (max-width: 991px) {
  /* Hide desktop header, show mobile header */
  .header-area {
    display: none;
  }

  .mobile-header-area {
    display: block;
    padding: 12px 0;
    border-bottom: 2px solid #f0f0f0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .mobile-header-area .brand-logo .brand-image {
    max-width: 160px !important;
  }

  .mobile-header-area .menu-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
  }

  /* Hero section spacing for sticky header */
  .hero-section {
    margin-top: 0;
  }
}

/* -----------------------------------------------
   SMALL MOBILE: 320px - 767px
----------------------------------------------- */
@media (min-width: 320px) and (max-width: 767px) {
  /* Hide desktop header completely */
  .header-area {
    display: none;
  }

  /* Mobile header: full width, sticky */
  .mobile-header-area {
    display: block !important;
    padding: 10px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #eee;
  }

  .mobile-header-area .menu-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 8px;
  }

  /* Logo: reasonable size on mobile */
  .mobile-header-area .brand-logo .brand-image {
    max-width: 130px !important;
    height: auto;
    display: block;
  }

  /* Right side: icons row */
  .mobile-header-area .header-right {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Cart/wishlist icon buttons */
  .mobile-header-area .header-right .header-btn {
    margin-right: 0;
    margin-left: 0;
    top: 0;
  }

  .mobile-header-area .header-right .header-btn .btn-left {
    width: 2.8rem;
    margin-left: 0;
    padding-top: 0;
    position: relative;
  }

  /* Icon sizing on mobile */
  .mobile-header-area .header-right .header-btn .btn-left .btn-icon {
    font-size: 2.4rem;
    line-height: 1;
    padding: 0.4rem;
    border-radius: 8px;
  }

  /* Badge count position */
  .mobile-header-area .header-right .header-btn .btn-left .count {
    position: absolute;
    right: -4px;
    top: -4px;
    width: 1.6rem;
    height: 1.6rem;
    line-height: 1.8rem;
    font-size: 0.9rem;
  }

  /* Hamburger menu button */
  .mobile-header-area .header-right .menu-bar {
    font-size: 3rem;
    top: 0;
    color: #252959;
  }

  /* Hero section: no top gap since header is sticky */
  .hero-section {
    margin-top: 0;
  }

  /* Hero slider height on mobile */
  .hero-section .hero-slider .signle-slide {
    height: auto;
    min-height: 280px;
    padding: 2rem 0 2rem 0;
    justify-content: center;
  }

  /* Hero text adjustments */
  .hero-section .hero-slider .signle-slide .slider-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }

  .hero-section .hero-slider .signle-slide .slider-sub-title {
    font-size: 2.8rem;
    line-height: 1.2;
  }

  /* Section spacing */
  .section {
    padding: 4rem 0;
  }

  /* Products grid: 2 columns on mobile */
  .single-grid-product {
    margin-bottom: 2rem;
  }

  /* Footer spacing */
  .footer-area .footer-widget-area {
    padding: 4rem 0 2rem 0;
  }

  /* ---- Offcanvas slide-out menu fixes ---- */

  /* Constrain offcanvas width on mobile */
  .menu-offcanvas {
    max-width: 280px;
    width: 280px !important;
  }

  /* Hide the big logo image inside the offcanvas header —
     the brand name text / small logo is enough */
  .menu-offcanvas .mobile-menu-area .offcanvas-header .brand-logo img {
    max-width: 120px !important;
    height: auto;
  }

  /* Hide category select dropdown inside offcanvas —
     it belongs in the main page search, not the nav menu */
  .menu-offcanvas .mobile-menu-area .menu-search-form .form-select {
    display: none !important;
  }

  /* Keep the search input but make it cleaner */
  .menu-offcanvas .mobile-menu-area .menu-search-form {
    margin-bottom: 2rem;
  }

  .menu-offcanvas .mobile-menu-area .menu-search-form .form-group .form-control {
    border-radius: 0.4rem;
    border: 1px solid #C4C4C4;
    font-size: 1.4rem;
    height: 4.4rem;
    padding: 0 4rem 0 1.2rem;
  }

  /* Nav menu items: clean spacing */
  .menu-offcanvas .mobile-menu-area .main-menu .menu-list .menu-item {
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .menu-offcanvas .mobile-menu-area .main-menu .menu-list .menu-item .menu-link {
    padding: 1.2rem 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    display: block;
  }

  .menu-offcanvas .mobile-menu-area .main-menu .menu-list .menu-item:hover .menu-link,
  .menu-offcanvas .mobile-menu-area .main-menu .menu-list .menu-item.active .menu-link {
    color: var(--primary-color, #EF1B27);
  }

  /* Bottom account/lang section — keep compact */
  .menu-offcanvas .mobile-menu-area .menu-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
  }
}

/* -----------------------------------------------
   LARGE MOBILE: 577px - 767px
----------------------------------------------- */
@media only screen and (min-width: 577px) and (max-width: 767px) {
  .mobile-header-area .brand-logo .brand-image {
    max-width: 150px !important;
  }

  .mobile-header-area .header-right .header-btn .btn-left .btn-icon {
    font-size: 2.8rem;
  }

  .hero-section .hero-slider .signle-slide {
    min-height: 340px;
  }

  .hero-section .hero-slider .signle-slide .slider-title {
    font-size: 2.6rem;
  }
}

/* -----------------------------------------------
   VERY SMALL: under 400px
----------------------------------------------- */
@media (max-width: 400px) {
  .mobile-header-area .brand-logo .brand-image {
    max-width: 110px !important;
  }

  .mobile-header-area .header-right .header-btn .btn-left .btn-icon {
    font-size: 2rem;
    padding: 0.3rem;
  }

  .mobile-header-area .menu-wrap {
    padding: 0 8px;
    gap: 4px;
  }

  .hero-section .hero-slider .signle-slide .slider-title {
    font-size: 1.8rem;
  }

  .hero-section .hero-slider .signle-slide .slider-sub-title {
    font-size: 2.2rem;
  }
}