body .dgwt-wcas-search-wrapp {
  margin-bottom: 0;
}

body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
  min-height: 48px;
  border-radius: 8px;
}

body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
  border-radius: 8px;
}

body .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
  height: 46px;
  background-color: transparent !important;
}

body .dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
  fill: var(--foreground);
}

/* ==========================================================================
   Desktop: Search Results Layout
   2-column grid: sidebar (categories + blog) | products
   ========================================================================== */

body .dgwt-wcas-suggestions-wrapp {
  max-width: 1664px;
  width: 100% !important;
  margin: 0 auto;
  left: 0 !important;
  right: 0 !important;

  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto auto;
  gap: 20px;

  padding: 24px 64px;
  border-radius: 12px;
  box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.12);
  background: #fff;
  overflow: hidden;
}

/* Categories — grid col 1, row 1 */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  border-right: 1px solid #ededed;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Blog/Posts — grid col 1, row 2. Below categories in sidebar */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog {
  grid-column: 1;
  grid-row: 2;
  padding: 0;
  border-right: 1px solid #ededed;
  border-top: 1px solid #ededed;
  padding-right: 20px;
  padding-top: 16px;
  box-sizing: border-box;
}

/* Products — grid col 2, spans both rows */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-title {
  line-height: 24px;
  margin-bottom: 16px;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories .dgwt-wcas-st-breadcrumbs {
  display: none;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion {
  line-height: 28px;
  padding: 3px 0px;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion:hover {
  text-decoration: none !important;
}

/* Product grid — 4 columns with gap */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-section-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Product cards — column layout */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
  display: flex;
  flex-direction: column;
  border: 1px solid #cdd1d4;
  padding: 8px;
  padding-top: 0;
  border-radius: 8px;
  background: #fff;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-sp {
  display: flex;
}

/* Product content wrapper — stack vertically */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-content-wrapp {
  flex-direction: column;
  padding: 16px 12px;
  row-gap: 12px;
  width: 100%;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-content-wrapp .dgwt-wcas-sp {
  padding-left: 0;
}

/* Product image — full width, contain */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-si {
  width: 100%;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-si img {
  border: none;
  margin: 0;
  padding: 0;
  max-height: fit-content;
  object-fit: contain;
  border-radius: 8px 8px 0 0;
  width: 100%;
}

body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product.dgwt-wcas-sp {
  padding: 0;
}

/* Product description — 3-line clamp */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-sd {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* "SEE ALL PRODUCTS" link */
body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-view-all {
  line-height: 28px;
  text-decoration: none !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 30px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  margin-top: 12px !important;
}

/* ==========================================================================
   Tablet/Mobile: Search Results Layout
   Single column, section dividers, 2-col product grid
   ========================================================================== */

@media (max-width: 1024px) {
  /* --- Inline dropdown mode (non-overlay) --- */
  body .dgwt-wcas-suggestions-wrapp {
    grid-template-columns: 1fr !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.12) !important;
    background: #fff !important;
    overflow-y: auto;
    max-height: 70vh;
  }

  /* Section dividers between categories/products/blog */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-section {
    margin-bottom: 16px;
  }

  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-section + .dgwt-wcas-suggestion-section {
    border-top: 1px solid #ededed;
    padding-top: 16px;
  }

  /* Remove sidebar border — single column */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories,
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog {
    border-right: none;
    padding-right: 0;
  }

  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog {
    border-top: 1px solid #ededed;
    padding-top: 16px;
  }

  /* Product grid — 2 columns on tablet/mobile */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-section-content,
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-layout-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 13px !important;
  }

  /* Product cards — column layout */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
    padding: 8px;
    border-radius: 8px !important;
    border: none !important;
    background: #fff;
    overflow: hidden;
  }

  /* Product image — responsive, contained */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-si {
    width: 100% !important;
    max-width: 145px;
  }

  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-si img {
    width: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
  }

  /* Product content wrapper */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-content-wrapp {
    flex-direction: column !important;
    padding: 0 !important;
    row-gap: 12px !important;
    width: 100%;
  }

  /* Product price */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-sp {
    padding: 0 !important;
  }

  /* "SEE ALL PRODUCTS" link — tablet/mobile */
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-view-all,
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-view-all {
    text-decoration: none !important;
    text-transform: uppercase !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    height: 30px !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    margin-top: 12px !important;
  }

  /* --- Overlay mode (mobile fullscreen search) --- */
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
    top: 68px !important;
    padding: 24px;
    display: grid !important;
    grid-template-columns: 1fr;
    padding-bottom: 50px;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
  }

  /* Section ordering in overlay */
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products {
    grid-column: 1;
  }

  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories {
    grid-row: 1;
    height: auto;
  }

  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products {
    grid-row: 2;
  }

  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog {
    grid-row: 3;
  }

  /* Section dividers & sidebar border removal — applies to both inline and overlay */
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-categories,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-blog {
    border-right: none;
    padding-right: 0;
  }

  /* --- Overlay bar styles --- */
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return,
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return:active,
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus,
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover {
    background-color: transparent !important;
  }

  .js-dgwt-wcas-overlay-mobile .js-dgwt-wcas-om-bar {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 22px;
    height: auto;
    background: var(--background-1, #fff);
    box-shadow: 0 -1px 0 0 rgba(225, 227, 229, 0.5) inset;
  }

  .js-dgwt-wcas-overlay-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
    border-radius: 8px;
    border: 2px solid var(--border, #cdd1d4);
  }

  .js-dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-si {
    max-width: 145px;
  }

  .js-dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product .dgwt-wcas-si img {
    border-radius: var(--Border-border-6, 6px);
  }
}

/* ==========================================================================
   Small Mobile: Adjustments
   ========================================================================== */

@media (max-width: 425px) {
  /* Smaller padding */
  body .dgwt-wcas-suggestions-wrapp {
    padding: 20px 16px 16px !important;
  }

  /* Keep 2-column product grid on mobile */
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-section-content,
  body .dgwt-wcas-suggestions-wrapp .dgwt-wcas-layout-grid,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-section-products .dgwt-wcas-section-content,
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp .dgwt-wcas-layout-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
