/*
Table of Content:
@Custom Breakpoints
  (min-width: 2000px)
  (max-width: 1700px)
  (max-width: 1600px)
  (max-width: 1500px)
  (max-width: 1400px)
  (max-width: 1300px)
  (max-width: 1200px)
  (max-width: 1100px)
  (max-width: 1024px)
  (max-width: 992px) -> start of mobile menu
  (max-width: 400px)
  (max-height: 800px) -> for sticky sections on small height screen
@Bootstrap Breakpoints
  xl: (max-width: 1199px)
  lg: (max-width: 991px)
  md: (max-width: 767px)
  sm: (max-width: 575px)
*/

@media only screen and (min-width: 2000px) {
}

@media only screen and (max-width: 1700px) {
}

@media only screen and (max-width: 1600px) {
}

@media only screen and (max-width: 1400px) {
}

@media only screen and (max-width: 1300px) {
  /* Product Slider */
  .container-product-slider {
    width: 100%;

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
  }
}

@media only screen and (max-width: 1200px) {
  .filter-title {
    font-size: 1rem;
  }

  .show-filter-btn {
    transform: scale(0.5);
  }

  .compare-grid,
  .search-result-grid-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media only screen and (max-width: 1100px) {
  .category-archive-content {
    flex-direction: column;
    gap: 2rem;
  }
}


/* --- Drawer + backdrop (mobile) --- */
@media (max-width: 1024px) {
  .mobile-filters-bar { display: block; }

  /* turn the existing column into an off-canvas drawer */
  .filter-list-column {
    position: fixed;
    inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
    z-index: 9999;
    width: 100%;
    max-width: 100%;
    background: #fff;
    transform: translateY(100%); /* hidden by default */
    transition: transform .25s ease-in-out;
    overflow: auto;
    padding: 16px;
  }
  /* header close button inside drawer */
  .mobile-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid #ccc;
    background: #fff;
    padding: .4rem .6rem;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
  }
  .mobile-filter-close .dashicons { font-size: 18px; line-height: 1; }

  /* backdrop */
  .mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  /* when open */
  body.filters-open .filter-list-column {
    transform: translateY(0);
  }
  body.filters-open .mobile-filter-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* ensure product column stays visible under button */
  .product-list-column { position: relative; }

  /* collapse all filter boxes when in mobile (default) */
  .filter-box.active { /* neutralize default active in mobile */
    /* we'll remove .active via JS on load/resize */
  }

  .filter-items .filter-item { padding: 6px 0; }
}

@media only screen and (min-width: 1200px) and (max-height: 750px) {
}

@media only screen and (max-width: 992px) {
  /* mobile menu */
  #nav {
    background: var(--mobile-nav-back);
  }
  #hamburger {
    width: 30px;
    height: 40px;
    position: relative;
    border: none;
    background: transparent;
  }
  .hamb-line {
    border-top: 3px solid var(--hambcolor);
    position: absolute;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translatey(-50%);
  }
  .hl1 {
    margin-top: 7px;
  }
  .hl3 {
    margin-top: -7px;
  }
  .hambclick .hl1,
  .hambclick .hl3 {
    margin-top: 0;
    width: 100%;
  }
  .hambrotate .hl1 {
    transform: rotate(135deg);
  }
  .hambclick .hl2 {
    transform: scale(0, 1);
  }
  .hambrotate .hl3 {
    transform: rotate(225deg);
  }
  .hamb-line {
    transition: all 0.2s ease-in-out;
  }
  .navitem_wrap {
    text-align: center;
  }
  .navitem {
    justify-content: center;
  }
  /* Start medial nav */
  #nav {
    height: 100vh;
    padding-top: 100px;
    overflow-x: hidden;
    left: 100%;
    position: fixed;
    width: 100vw;
  }
  #nav.hambclick {
    left: 0 !important;
  }
  #nav .row {
    display: block !important;
  }
  .nav-logo-wrap {
    display: none;
  }
  #nav .navitem_wrap a {
    display: block;
    width: 100%;
    margin: auto !important;
    padding: 1.5rem 0;
    background-color: var(--color-dark-green);
    color: var(--color-white);
    border-bottom: 1px solid var(--color-dark-green-5);
    transition: 0.4s;
  }
  #nav .navitem_wrap:last-child a {
    border-bottom: none;
  }
  #nav .navitem_wrap a:hover {
    background-color: var(--color-dark-green-5);
  }
  .navitem {
    color: var(--color-white);
  }
  .open_sub_menu {
    display: none;
  }
  .mobile-nav {
    z-index: 9999;
    background: var(--mobile-nav-back);
    top: 0;
  }

  body {
    margin-top: var(--header-height-mobile);
  }

  body.logged-in {
    margin-top: calc(var(--header-height-mobile) + var(--header-wp-admin));
  }

  .logged-in .mobile-nav {
    top: var(--header-wp-admin);
  }

  #nav {
    top: var(--header-height-mobile);
  }

  .logged-in #nav {
    top: calc(var(--header-height-mobile) + var(--header-wp-admin));
  }

  .mobile-nav .nav_logo {
    width: 150px;
  }
  .mobile-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav_dropdown {
    position: static;
    display: block;
  }

  .woocommerce-MyAccount-navigation ul {
    flex-direction: column;
  }

  #nav-topbar img {
    height: 30px;
  }

  /* Inside the nav */
  #nav #nav-topbar {
    display: none;
  }

  #nav {
    padding-top: 0;
  }

  .main-nav-utility-wrapper {
    margin-top: 2rem;
    justify-content: center;
  }

  .main-nav-utility-wrapper li img {
    filter: brightness(0) invert(1);
  }

  .wc-block-components-notice-snackbar-list {
    display: none;
  }

  .wc-block-components-sidebar-layout {
    flex-direction: column;
  }

  div.wc-block-components-sidebar-layout .wc-block-components-main,
  div.wc-block-components-sidebar {
    width: 100%;
  }

  .wc-block-components-form .wc-block-components-text-input,
  .wc-block-components-text-input {
    margin-top: 1.5rem;
  }
}

@media only screen and (max-width: 782px) {
  body {
    margin-top: var(--header-wp-admin-mobile);
  }

  body.logged-in {
    margin-top: calc(
      var(--header-wp-admin-mobile) + var(--header-height-mobile)
    );
  }
 
  .logged-in .mobile-nav {
    top: var(--header-wp-admin-mobile);
  }
}

@media only screen and (max-width: 400px) {
}

@media only screen and (max-width: 767px) {
}

@media only screen and (min-width: 576px) and (max-width: 992px) {
}

/**
  *
  * @Bootstrap Breakpoints - 
  * The Breakpoints below matches the bootstrap breakpoints 
  * But desktop-first approach
  *
  * xl: (max-width: 1199px)
  * lg: (max-width: 991px)
  * md: (max-width: 767px)
  * sm: (max-width: 575px)
  *
  **/

/**
  *** @xl and below  
  **/
@media (max-width: 1199px) {
}

/**
  *** @lg and below  
  **/
@media (max-width: 991px) {
  .layout-hero.hero-tall {
    min-height: 80vh;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .small-slider-container {
    display: block;
  }

  .small-slider-controls {
    top: 50%;
    transform: translateY(-50%);
  }

  .small-slider-headline {
    margin-bottom: 3rem;
    text-align: center;
  }

  .small-slider-headline br {
    display: none;
  }

  /* Category Grid */
  .category-grid-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .layout-category-grid__item--4 .layout-category-grid__content {
    margin-bottom: 0;
    justify-content: flex-end;
  }

  .layout-category-grid__item {
    grid-row: auto;
    grid-column: auto;
  }

  /* Image Text */
  .layout-image-text-section__title {
    font-size: 2.5rem;
  }

  /* Single Product */
  .product-feature-container {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem;
  }
  .product-feature-image-gallery .main-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
  }

  .thumbnail-gallery {
    grid-template-columns: repeat(6, 1fr);
  }
}

/**
  *** @md and below   
  **/
@media (max-width: 767px) {
  /* Footer */
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-bottom-links {
    font-size: 0.8rem;
  }

  .footer-topbar .footer-feature:not(:last-child) {
    border-right: none;
  }

  .footer-topbar .footer-feature:last-child {
    margin-bottom: 0 !important;
  }

  /* */
  .category-grid,
  .category-archive-content .products-grid,
  .product-list-column.product-view-grid .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-list-header {
    flex-direction: column;
    gap: 1rem;
  }

  .attribute-options.six-columns {
    grid-template-columns: repeat(5, 1fr);
  }

  /* .compare-grid,
  .search-result-grid-view {
    grid-template-columns: 1fr;
    gap: 1rem;
  } */
  .compare-card {
    padding: 1rem 0.5rem;
  }
}

/**
  *** @sm and below  
  **/
@media (max-width: 575px) {
  /* .category-grid,
    .category-archive-content .products-grid,
  .product-list-column.product-view-grid .products-grid {
    grid-template-columns: repeat(1, 1fr);
  } */

  /* Hero */
  .hero-title {
    text-align: center;
  }

  .hero-copy {
    text-align: center;
    margin-bottom: 2rem;
  }

  .hero-button {
    width: 100%;
    text-align: center;
  }

  .hero-button {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .small-slider-container {
    padding-left: 3rem;
    padding-right: 3rem;
  }

  .layout-product-slider-subtitle {
    margin-bottom: 1rem;
  }

  .product-slider-controls {
    margin-bottom: 2rem;
    position: static;
  }

  /* Product Category Grid */
  .category-grid-content {
    grid-template-columns: repeat(1, 1fr);
  }

  /* Featured with List */
  .layout-featured-with-list {
    text-align: center;
  }
  .compare-grid,
  .search-result-grid-view {
    grid-template-columns: 1fr;
    gap: 1rem;
  } 
}

@media (max-width: 400px) {
}

/* Mobile list layout:
   Row 1: image (left) | title + price (right)
   Row 2: attributes + compare
   Row 3: button
*/
@media (max-width: 640px) {
  #search-results.results-list-view .compare-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "img  header"
      "attrs compare"
      "btn  btn";
    gap: 0.75rem 1rem;
    align-items: start;
  }

  /* Image on left */
  #search-results.results-list-view .compare-card-image {
    grid-area: img;
    max-width: 100px;
    max-height: 100px;
  }
  #search-results.results-list-view .compare-card-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
  }

  /* Title + Price stacked on the right of image */
  #search-results.results-list-view .compare-card-header {
    grid-area: header;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 0;
  }
  #search-results.results-list-view .compare-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: #222;
  }
  #search-results.results-list-view .compare-card-price {
    font-size: 0.95rem;
    color: #555;
  }

  /* Attributes + compare */
  #search-results.results-list-view .compare-card-attributes {
    grid-area: attrs;
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #444;
    justify-content: flex-start;
  }
  #search-results.results-list-view .compare-checkbox-wrap {
    grid-area: compare;
    justify-self: end;
    width: auto;
  }
  #search-results.results-list-view .compare-checkbox-wrap label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
  }

  /* Button full width below */
  #search-results.results-list-view .compare-btn-wrapper {
    grid-area: btn;
    display: flex;
    width: 100%;
  }
  #search-results.results-list-view .compare-btn-wrapper .btn {
    width: 100%;
    font-size: 0.9rem;
  }

  /* Clean up */
  #search-results.results-list-view .compare-card hr,
  #search-results.results-list-view .compare-card-img-caption {
    display: none;
  }

  /* Reset previous flex orders */
  #search-results.results-list-view .compare-card > * {
    order: initial !important;
    flex: initial !important;
  }
  #search-results.results-list-view .compare-card-price{
    display: none;
  }
  #search-results.results-list-view .compare-card-price-mobile {
    display: block;
  }
}


