/* 見積カゴ（プロトタイプ） */

/* 検索フォーム（absolute配置）の外にカゴを並べる */
.s_form_row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.s_form_row .s_form_wrap {
  flex: 1;
  min-width: 0;
}

.estimate-cart-header-slot {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
}

.estimate-cart-header-slot .estimate-cart-nav-btn {
  height: 40px;
  padding: 0 0.9em;
  white-space: nowrap;
  border-radius: 20px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .s_form_row {
    gap: 6px;
  }

  .estimate-cart-header-slot .estimate-cart-nav-btn {
    padding: 0 0.65em;
    font-size: 12px;
  }
}

.estimate-cart-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  background: #004ea2;
  color: #fff !important;
  font-weight: bold;
  border: 0;
  cursor: pointer;
  padding: 0 1em;
  height: 100%;
  font-size: inherit;
  font-family: inherit;
  line-height: 1.2;
}

.estimate-cart-nav-btn:hover,
.estimate-cart-nav-btn:focus-visible {
  background: #003a7a;
  color: #fff !important;
  outline: none;
}

.header_menu_list_item.estimate-cart-nav {
  background: #004ea2;
}

.header_menu_list_item.estimate-cart-nav::before {
  display: none;
}

.estimate-cart-badge {
  display: none;
  min-width: 1.25em;
  height: 1.25em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: #bf1d2b;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.25em;
  text-align: center;
}

.estimate-cart-badge.is-on {
  display: inline-block;
}

.burger_menu_list_item .estimate-cart-nav-btn {
  width: 100%;
  justify-content: center;
  padding: 0.9em 1em;
  background: #004ea2;
}

.estimate-cart-add {
  display: inline-block;
  margin: 0.6em 0 1em;
  padding: 0.75em 1.4em;
  background: #004ea2;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border: 2px solid #004ea2;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.estimate-cart-add:hover,
.estimate-cart-add:focus-visible {
  background: #fff;
  color: #004ea2;
  outline: none;
}

.estimate-cart-add.is-added {
  background: #1a7a4c;
  border-color: #1a7a4c;
  color: #fff;
}

.estimate-cart-add.is-added:hover,
.estimate-cart-add.is-added:focus-visible {
  background: #fff;
  color: #1a7a4c;
}

.estimate-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.estimate-cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.estimate-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: #fff;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.estimate-cart-drawer.is-open {
  transform: translateX(0);
}

.estimate-cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #ddd;
  background: #004ea2;
  color: #fff;
}

.estimate-cart-drawer__ttl {
  margin: 0;
  font-size: 1.05rem;
  font-weight: bold;
}

.estimate-cart-drawer__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2em 0.35em;
}

.estimate-cart-drawer__close:hover,
.estimate-cart-drawer__close:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.estimate-cart-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 0.8rem 1rem 1rem;
}

.estimate-cart-empty {
  margin: 1.5em 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

.estimate-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4em 0.8em;
  padding: 0.9em 0;
  border-bottom: 1px dotted #ccc;
}

.estimate-cart-item__name {
  margin: 0;
  font-weight: bold;
  font-size: 0.95rem;
  line-height: 1.4;
}

.estimate-cart-item__name a {
  color: #004ea2;
  text-decoration: underline;
}

.estimate-cart-item__name a:hover {
  color: #bf1d2b;
}

.estimate-cart-item__price {
  margin: 0.2em 0 0;
  font-size: 0.85rem;
  color: #555;
}

.estimate-cart-item__ops {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4em;
}

.estimate-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.estimate-cart-item__qty button {
  width: 1.8em;
  height: 1.8em;
  border: 1px solid #004ea2;
  background: #fff;
  color: #004ea2;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.estimate-cart-item__qty button:hover,
.estimate-cart-item__qty button:focus-visible {
  background: #004ea2;
  color: #fff;
  outline: none;
}

.estimate-cart-item__qty input {
  width: 2.6em;
  text-align: center;
  border: 1px solid #ccc;
  height: 1.8em;
  font-size: 0.9rem;
}

.estimate-cart-item__remove {
  border: 0;
  background: transparent;
  color: #bf1d2b;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.estimate-cart-item__remove:hover,
.estimate-cart-item__remove:focus-visible {
  color: #004ea2;
  outline: none;
}

.estimate-cart-drawer__foot {
  padding: 0.9rem 1rem 1.2rem;
  border-top: 1px solid #ddd;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}

.estimate-cart-drawer__note {
  margin: 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

.estimate-cart-cta {
  display: block;
  text-align: center;
  padding: 0.85em 1em;
  background: #bf1d2b;
  color: #fff !important;
  font-weight: bold;
  text-decoration: none !important;
  border: 2px solid #bf1d2b;
  transition: background 0.2s, color 0.2s;
}

.estimate-cart-cta:hover,
.estimate-cart-cta:focus-visible {
  background: #fff;
  color: #bf1d2b !important;
  outline: none;
}

.estimate-cart-cta.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.estimate-cart-clear {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2em 0;
  align-self: center;
}

.estimate-cart-clear:hover,
.estimate-cart-clear:focus-visible {
  color: #bf1d2b;
  outline: none;
}

.estimate-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%) translateY(12px);
  background: #1a7a4c;
  color: #fff;
  padding: 0.7em 1.2em;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 10060;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: calc(100% - 2rem);
  text-align: center;
}

.estimate-cart-toast.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

body.estimate-cart-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .estimate-cart-nav-btn {
    padding: 0.6em 0.8em;
    font-size: 0.85rem;
  }

  .estimate-cart-toast {
    bottom: 6.5rem;
  }
}
