:root {
  --sb-color-0: #fc9403;
  --sb-color-1: #f05a1a;
  --sb-color-2: #e1e1e1;
  --sb-color-3: #eeeeee;
  --sb-color-4: #666666;
  --sb-color-5: #0070e8;
  --sb-color-6: #fcfcfc;
}

/**************
**** General ******
*********/
#content {
  display: flex;
}

.page-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  height: 100%;
}

@media only screen and (max-width: 768px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }
}
.sb-cart-page-wrap .page-content {
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 32px;
  padding-bottom: 32px;
  padding-top: 40px;
}

/*****************
***** Product Box ****
****************/
#product-serch-result {
  margin-top: 10px;
}

.product-wrap {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--sb-color-2, #e1e1e1);
  padding: 15px;
  background-color: #fcfcfc;
}
.product-wrap .title-purchase-add-area {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  word-wrap: break-word;
}
.product-wrap .title-purchase-add-area .product-title {
  max-width: 55%;
  word-break: break-word;
}
@media screen and (max-width: 805px) {
  .product-wrap .title-purchase-add-area .product-title {
    max-width: 100%;
  }
}
@media screen and (max-width: 805px) {
  .product-wrap .title-purchase-add-area {
    flex-direction: column;
  }
}

.purchase-area {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.quantity-area {
  display: flex;
  min-height: 30px;
}
.quantity-area input {
  width: 45px;
  border-radius: 0;
  padding: 0;
  text-align: center;
  border: 1px solid var(--sb-color-2, #e1e1e1);
}
.quantity-area .plus,
.quantity-area .minus {
  width: 45px;
  line-height: 9px;
  background-color: var(--sb-color-3, #eeeeee);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  border: 1px solid var(--sb-color-2, #e1e1e1);
}
.quantity-area .plus {
  border-left: none;
}
.quantity-area .minus {
  border-right: none;
}

.add-product-area {
  display: flex;
}

.add-product {
  cursor: pointer;
  min-width: 160px;
  height: 30px;
  line-height: 9px;
  background-color: var(--sb-color-0, #fc9403);
  color: #fff;
  border-radius: 0;
  border: none;
  font-size: 14px;
  font-weight: 400;
}
.add-product:hover, .add-product:focus {
  background-color: var(--sb-color-1, #f05a1a);
}
@media screen and (max-width: 767px) {
  .add-product {
    min-height: 100%;
  }
}

#dummy-searchbox-wrap {
  margin: 0;
  border-radius: 0;
}
#dummy-searchbox-wrap p {
  margin: 0;
  padding-bottom: 12px;
  text-align: right;
  font-size: 14px;
}

#dummy-searchbox {
  box-sizing: border-box;
  border-radius: 0;
  margin-bottom: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--sb-color-2, #e1e1e1);
}

.product-wrap input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.product-wrap input[type=number] {
  -moz-appearance: textfield;
}

li.widget {
  list-style: none;
}

.product-wrap .description .product-content {
  font-size: 14px;
  color: var(--sb-color-4, #666666);
}

/*****************
Sidebar
****************/
#sidebar h3 {
  font-size: 15.4px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
#sidebar p#product-cart__message {
  margin-top: 0.75em;
}
#sidebar .sb-button {
  border-radius: 0;
  background-color: var(--sb-color-0, #fc9403);
  border: none;
  line-height: 15px;
  transition: all 0.3s ease;
  color: #fff;
  font-size: 15px;
  padding: 0;
}
#sidebar .sb-button a {
  display: inline-block;
  padding: 15px 30px;
  color: #fff;
  text-decoration: none;
  background-color: var(--sb-color-0, #fc9403);
}
#sidebar .sb-button a:hover, #sidebar .sb-button a:focus {
  background-color: var(--sb-color-1, #f05a1a);
}
#sidebar .item {
  border-top: none;
  position: relative;
  margin-bottom: 15px;
  padding-top: 10px;
}
#sidebar .item .description {
  max-width: 80%;
}
#sidebar .item .cart-title {
  font-size: 14px;
  margin: 0;
  color: var(--sb-color-4, #666666);
}
#sidebar .item .cart-amount {
  padding: 8px 0;
  margin: 0;
  font-size: 11px;
  color: var(--sb-color-4, #666666);
}
#sidebar .remove-product {
  position: absolute;
  top: 15px;
  right: 10px;
  cursor: pointer;
  border: 1px solid var(--sb-color-4, #666666);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--sb-color-4, #666666);
}
#sidebar #cart-subtotal .subtotal-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--sb-color-4, #666666);
}
#sidebar #cart-subtotal .subtotal-amount {
  font-size: 14px;
  color: var(--sb-color-4, #666666);
}

@media only screen and (max-width: 768px) {
  #sidebar .cart {
    padding: 40px 0 0 0;
    margin: 0 0 40px 0;
    border-left: none;
    border-top: 1px solid var(--sb-color-3, #eeeeee);
  }
}
/****************
Search
******************/
.searchbox-wrap {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 720px;
}

/* Force the cart container chain wide enough on desktop — Astra's empty
   sidebar otherwise squeezes the content column down to ~270px. */
@media (min-width: 769px) {
  .sb-cart-page-wrap,
  .sb-cart-page-wrap .main-area-wrap,
  .sb-cart-page-wrap .searchbox-area {
    width: 100%;
    min-width: 720px;
  }
}

/* Kill the faint separator lines the theme puts above/below the search. */
.sb-cart-page-wrap .page-content {
  border-bottom: none !important;
  margin-bottom: 16px !important;
  padding-bottom: 0 !important;
}
#sidebar .cart {
  border-top: none !important;
}

/* Neutralize the theme's default box-shadow on form controls — it otherwise
   bleeds 1-2px below the pill and reads as a faint grey line. */
.searchbox-wrap input,
.searchbox-wrap button,
.searchbox-wrap select {
  box-shadow: none !important;
}

/* The visible pill is the .sbuy-search-row — the Select2 container sits
   absolutely inside the wrap but doesn't render any UI of its own. */
.sbuy-search-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 2px solid #ff7a00;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.sbuy-search-row:focus-within {
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}

/* Invisible Select2 container behind the pill — it drives the dropdown position. */
.searchbox-wrap > .select2-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 1;
}
.searchbox-wrap > #dummy-searchbox-wrap {
  position: relative;
  z-index: 2;
}

/* Hide Select2's own internal search — the visible #dummy-searchbox acts as the search input. */
.select2-search.select2-search--dropdown {
  display: none !important;
}

.sbuy-search-row input#dummy-searchbox {
  flex: 1 1 auto !important;
  width: auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 14px 22px !important;
  font-size: 15px !important;
  color: #333 !important;
  cursor: text;
}

.sbuy-search-row input#dummy-searchbox::placeholder {
  color: #888 !important;
  opacity: 1;
}

.sbuy-search-row .sbuy-search-trigger {
  flex: 0 0 auto;
  width: 56px;
  background: #ff7a00;
  color: #fff;
  border: none;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sbuy-search-row .sbuy-search-trigger:hover,
.sbuy-search-row .sbuy-search-trigger:focus {
  background: #e86c00;
  outline: none;
}

.select2-container--focus,
.select2-container--focus .select2-selection {
  outline: none !important;
}

.select2-container--default .select2-results > .select2-results__options {
  border-top: none !important;
}

.select2-selection__arrow {
  display: none;
}

.select2-selection__rendered {
  box-sizing: border-box;
  padding: 12px 12px 0 !important;
}

.select2-container--open .select2-dropdown.select2-dropdown--below {
  margin-top: 0;
}

.select2-results {
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.1);
}

.select2-selection.select2-selection--single {
  border-radius: 0;
  cursor: auto !important;
  background: none !important;
  border: none !important;
  height: auto !important;
}

.select2-results__option.select2-results__message {
  display: none;
}

.select2-container .select2-selection--single {
  height: 36px;
  border: 1px solid rgb(225, 225, 225);
  background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
}

.select2-results__option {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgb(100, 100, 100);
  overflow: auto;
}

.select2-container--default .select2-results__option--selectable {
  font-size: 14px;
  padding: 4px 5px;
  font-weight: 700;
  margin: 0;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--sb-color-0, #fc9403);
  color: #ffffff;
}

input.select2-search__field {
  border-radius: 0;
}

.select2-search.select2-search--dropdown {
  padding: 12px 12px 12px 12px;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
  border: 1px solid rgb(225, 225, 225);
  background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
}

input#dummy-searchbox {
  width: 100% !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 15px !important;
  color: #333 !important;
  padding: 2px 4px !important;
}

input#dummy-searchbox::placeholder {
  color: #888 !important;
  opacity: 1;
}

/* Dropdown search field (Select2) keeps its own prominent box */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 2px solid #ccc !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-search--dropdown .select2-search__field::placeholder {
  color: #888 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #ff7a00 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2) !important;
}

.select2-container--open .select2-dropdown {
  border: none;
}

.select2-container--default .select2-results > .select2-results__options {
  border-top: 1px solid var(--sb-color-2, #e1e1e1);
  margin: 0;
  padding-left: 0;
  padding-bottom: 0;
}

.select2-container .selection .select2-selection__rendered:focus-visible,
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single:focus-visible,
.select2-container .select2-selection--single:focus-visible {
  outline: none;
}


/* ===== 1.3.6 additions: add-to-cart feedback + mobile sticky footer ===== */
#sidebar .item.sbuy-item-added { animation: sbuy-item-flash 1.8s ease-out; }
#sidebar #sbuy-cart-footer:empty { display: none; }
@keyframes sbuy-item-flash {
  0%   { background-color: rgba(46, 125, 50, 0.28); }
  40%  { background-color: rgba(46, 125, 50, 0.28); }
  100% { background-color: transparent; }
}
#sbuy-toast-container { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100000; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 90vw; pointer-events: none; }
.sbuy-toast { display: flex; align-items: center; gap: 10px; background: #2e2e2e; color: #fff; padding: 11px 18px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); font-size: 14px; line-height: 1.3; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.sbuy-toast--visible { opacity: 1; transform: translateY(0); }
.sbuy-toast__check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #2e7d32; color: #fff; flex-shrink: 0; }
.sbuy-toast__title { font-weight: 600; }
@media only screen and (max-width: 768px) {
  #sidebar .cart { padding-bottom: 96px; }
  #sidebar #sbuy-cart-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 16px; background: #fff; border-top: 1px solid var(--sb-color-2, #e1e1e1); box-shadow: 0 -2px 12px rgba(0,0,0,0.12); }
  #sidebar #sbuy-cart-footer #cart-subtotal { margin: 0; display: flex; flex-direction: column; line-height: 1.25; }
  #sidebar #sbuy-cart-footer #cart-subtotal .subtotal-text { font-size: 12px; font-weight: 600; }
  #sidebar #sbuy-cart-footer #cart-subtotal .subtotal-amount { font-size: 18px; font-weight: 700; }
  #sidebar #sbuy-cart-footer #checkout-button { margin: 0; flex-shrink: 0; }
  #sidebar #sbuy-cart-footer #checkout-button a { padding: 14px 22px; white-space: nowrap; }
  #sbuy-toast-container { bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) { .sbuy-toast { transition: opacity 0.01s linear; transform: none; } .item.sbuy-item-added { animation: none; } }

/* ===== 1.3.7: cap mobile dropdown results above on-screen keyboard ===== */
@media (max-width: 768px) {
  .select2-results__options {
    max-height: var(--sbuy-dropdown-max-h, 35vh) !important;
    overflow-y: auto !important;
  }
}

/* ===== 1.3.16: enlarge touch hit-targets on mobile (visual size unchanged) ===== */
@media (max-width: 768px) {
  /* Cart X button: hit area becomes 44x44 via padding around the visual circle */
  #sidebar .remove-product {
    width: 44px;
    height: 44px;
    padding: 12px;
    box-sizing: border-box;
    /* Border stays as the visual circle, just sized via background trick:
       padding pushes the inner content out to ~20x20 visual size at center. */
    border: none;
    background: transparent;
    position: absolute;
    top: 3px;
    right: -2px;
  }
  #sidebar .remove-product::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--sb-color-4, #666666);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  #sidebar .remove-product svg {
    width: 12px;
    height: 12px;
    position: relative;
    z-index: 1;
  }
  /* Select2 dropdown options: hit area >= 44px via padding */
  .select2-container--default .select2-results__option--selectable {
    padding: 12px 14px;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 15px;
  }
}
