/* Sat25 UI polish v1: leave native behavior and existing assets intact. */

/* Remove only the excess after the final line in the main cart. */
body#cart #main.sat25-cart-context .cart-container .cart-items {
  margin-bottom: 0;
}
body#cart #main.sat25-cart-context .cart-container .cart-items > .cart-item:last-child {
  padding-bottom: 0;
}

/* Image overlays only: purchase/select-option actions below images stay visible. */
body .product-miniature .thumbnail-container .button-container,
body .product-miniature .thumbnail-container .quick-view-wrapper,
body .product-miniature .thumbnail-container .wishlist,
body .product-miniature .thumbnail-container .compare {
  display: none !important;
}

/* Keep the mobile search panel within its viewport, including iOS input focus. */
@media (max-width: 767.98px) {
  #offcanvas_search .modal-dialog.modal-dialog__offcanvas--top {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }
  #offcanvas_search .modal-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  #offcanvas_search .modal-dialog__offcanvas--top .modal-body {
    padding: 20px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    min-width: 0;
    box-sizing: border-box;
  }
  #offcanvas_search .tdsearchblock > p {
    padding-right: 44px;
    overflow-wrap: anywhere;
  }
  #offcanvas_search .modal-dialog__offcanvas--top button.close {
    width: 44px;
    height: 44px;
    margin: 6px;
  }
  #offcanvas_search .tdsearchblock,
  #offcanvas_search .search_block_top,
  #offcanvas_search .searchbox,
  #offcanvas_search .input-wrapper,
  #offcanvas_search .tdsearch_result_content,
  #offcanvas_search .tdsearch_result {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* 16px prevents Safari's automatic input zoom without disabling user zoom. */
  #offcanvas_search .search_block_top input.search_query_top {
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
  #offcanvas_search .search_block_top .tdsearch_result_content .autocomplete-suggestions {
    max-width: 100% !important;
    box-sizing: border-box;
  }
  #offcanvas_search .search_block_top .tdsearch_result_content .autocomplete-suggestion {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  #offcanvas_search .autocomplete-suggestion .product-name {
    overflow-wrap: anywhere;
  }
}

/* Sat25: cancel native cart-container + * spacing on the desktop summary. */
@media (min-width: 992px) {
  body#cart #main.sat25-cart-context .cart-grid-body > .cart-grid-right {
    margin-top: 0;
  }
}

/* Sat25 homepage H1 mobile v1: approved 22px preview. */
@media (max-width: 767px) {
  body#index .td-slide-description > h1 {
    font-size: 22px !important;
    line-height: 1.2 !important;
  }
}

/* Sat25: native cart errors/warnings must be easy to notice and read. */
body#cart #notifications .alert-danger,
body#cart #notifications .alert-warning {
  display:block;
  padding:14px 16px;
  margin:0 0 16px;
  border:1px solid #e1c58b;
  border-left:4px solid #a76d16;
  border-radius:8px;
  background:#fff8e8;
  color:#5f410e;
  font-size:14px;
  font-weight:600;
  line-height:1.5;
  overflow-wrap:anywhere;
}
body#cart #notifications .alert-danger ul,
body#cart #notifications .alert-warning ul { margin:0; padding-left:18px; }
body#cart #notifications .alert-danger li,
body#cart #notifications .alert-warning li { color:inherit; }
body#cart #notifications .alert-danger a,
body#cart #notifications .alert-warning a { color:inherit; text-decoration:underline; }
@media(max-width:767px) {
  body#cart #notifications .alert-danger,
  body#cart #notifications .alert-warning { padding:12px; }
}
