/* =========================================================
   Ashley·Design — SIDE-CART drawer
   z-index 10100 (above search panel 10000)
   ========================================================= */

.ad-sc-backdrop {
  position: fixed; inset: 0;
  background: rgba(31, 53, 48, 0.45);
  z-index: 10090;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
body.ad-sc-open .ad-sc-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ad-sc {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  z-index: 10100;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 50px rgba(31, 53, 48, 0.18);
  visibility: hidden;
}
body.ad-sc-open .ad-sc {
  transform: translateX(0);
  visibility: visible;
}

.ad-sc__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.ad-sc__head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; }
.ad-sc__close {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  border: 0;
}
.ad-sc__close:hover { background: var(--terra); color: #fff; }

.ad-sc__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.ad-sc__empty {
  text-align: center;
  padding: 56px 16px;
  color: var(--ink-soft);
  font-size: 14px;
}
.ad-sc__empty strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 8px; }

.ad-sc__items { list-style: none; padding: 0; margin: 0; }
.ad-sc__item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.ad-sc__thumb {
  aspect-ratio: 1 / 1;
  background: var(--soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.ad-sc__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-sc__info h4 {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 4px;
}
.ad-sc__meta { font-size: 11.5px; color: var(--ink-mute); margin-bottom: 6px; }
.ad-sc__price { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ad-sc__qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 34px;
  margin-top: 6px;
}
.ad-sc__qty button {
  width: 30px; height: 100%;
  background: transparent; color: var(--ink);
  cursor: pointer; border: 0; font-size: 16px;
}
.ad-sc__qty input {
  width: 36px; text-align: center;
  border: 0; background: transparent;
  font: inherit; font-weight: 600; font-size: 13px;
}
.ad-sc__remove {
  font-size: 11px;
  color: var(--ink-mute);
  text-decoration: underline;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0; margin-top: 4px;
}
.ad-sc__remove:hover { color: var(--terra); }

.ad-sc__foot {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  background: var(--soft);
}
.ad-sc__subtotal {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 14px;
}
.ad-sc__subtotal-amount { font-size: 18px; color: var(--ink); }
.ad-sc__ctas {
  display: grid; gap: 8px;
}
.ad-sc__ctas .btn {
  display: block; text-align: center; width: 100%; min-width: 100%;
  padding: 14px;
}

/* Toast for "added to cart" feedback */
.ad-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 30px);
  background: var(--dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.ad-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Search overlay */
.ad-search-overlay {
  position: fixed;
  top: var(--ad-header-bottom, 60px);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 10000;
  padding: 28px 0 36px;
  box-shadow: 0 18px 32px rgba(31, 53, 48, 0.08);
  transform: translateY(-12px);
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.ad-search-overlay:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}
.ad-search-backdrop {
  position: fixed;
  top: var(--ad-header-bottom, 60px); left: 0; right: 0; bottom: 0;
  background: rgba(31, 53, 48, 0.4);
  z-index: 9998;
}
.ad-search-form {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  max-width: 720px;
  margin: 0 auto;
}
.ad-search-form:focus-within { border-color: var(--terra); }
.ad-search-form input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 4px;
}
.ad-search-form button[type=submit] {
  background: var(--terra);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ad-search-close {
  background: transparent;
  color: var(--ink-mute);
  border: 0;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
}
.ad-search-results {
  max-width: 720px;
  margin: 20px auto 0;
  display: grid; gap: 10px;
}
.ad-search-suggest {
  display: flex; gap: 12px; align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  transition: background 0.15s var(--ease);
}
.ad-search-suggest:hover { background: var(--soft); }
.ad-search-suggest img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius); }
.ad-search-suggest strong { font-size: 14px; }
.ad-search-suggest .ad-search-suggest__price { font-size: 13px; color: var(--ink-soft); }
.ad-search-suggest__meta { display: flex; flex-direction: column; gap: 2px; }

/* Mobile side-cart */
@media (max-width: 540px) {
  .ad-sc { width: 100vw; }
}
