/* Quote Banner — fixed layout; text / image / background editable */

.shop-quote-banner {
  --quote-banner-bg: #8c1f27;
  --quote-banner-text: #ffffff;
  --quote-banner-radius: 20px;
  --quote-banner-image-radius: 10px;
  --quote-banner-font:
    "Noto Serif SC", "Songti SC", "SimSun", "STSong", Georgia, serif;

  box-sizing: border-box;
  width: 100%;
  margin: 1.75em 0;
  padding: 28px;
  background: var(--quote-banner-bg);
  border-radius: var(--quote-banner-radius);
  color: var(--quote-banner-text);
  font-family: var(--quote-banner-font);
}

/* Full-bleed background (frontend only): the banner background spans the full
   viewport width, while __inner stays centered at max-width:1100px so the
   internal layout is unchanged. Editor (.is-editor) keeps the card look. */
.shop-quote-banner:not(.is-editor) {
  width: 100vw;
  max-width: 100vw;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

/* Deletable elements: hover an element in the editor to reveal its × button.
   Only rendered inside the editor (root has .is-editor). */
.shop-quote-banner .is-deletable {
  position: relative;
}
.shop-quote-banner__icon-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shop-quote-banner .shop-del-btn {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 6;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #e11d48;
  border-radius: 50%;
  background: #fff;
  color: #e11d48;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.is-editor .is-deletable:hover > .shop-del-btn,
.is-editor .shop-del-btn:focus {
  display: inline-flex;
}

.shop-quote-banner *,
.shop-quote-banner *::before,
.shop-quote-banner *::after {
  box-sizing: border-box;
}

.shop-quote-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px 32px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.shop-quote-banner__media {
  min-width: 0;
}

.shop-quote-banner__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: var(--quote-banner-image-radius);
  background: transparent;
}

.shop-quote-banner__image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--quote-banner-image-radius);
  background: rgba(255, 255, 255, 0.12);
}

.shop-quote-banner__content {
  min-width: 0;
}

.shop-quote-banner__title {
  margin: 0 0 16px;
  font-family: var(--quote-banner-font);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--quote-banner-text);
}

/* 提高特异性，避免被主题 .article-panel .entry-content h2 的深色覆盖 */
.shop-quote-banner .shop-quote-banner__content .shop-quote-banner__title,
.shop-quote-banner.is-editor
  .shop-quote-banner__title.block-editor-rich-text__editable {
  color: #ffffff;
}

.shop-quote-banner__text {
  margin: 0 0 14px;
  font-family: var(--quote-banner-font);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--quote-banner-text);
}

.shop-quote-banner__text:last-child {
  margin-bottom: 0;
}

.shop-quote-banner__text strong,
.shop-quote-banner__text b {
  font-weight: 700;
}

/* ---------- Editor ---------- */
.shop-quote-banner.is-editor
  .shop-quote-banner__title.block-editor-rich-text__editable,
.shop-quote-banner.is-editor
  .shop-quote-banner__text.block-editor-rich-text__editable {
  color: var(--quote-banner-text);
  outline: none;
}

.shop-quote-banner__image-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.shop-quote-banner__image-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.shop-quote-banner__image-btn:hover .shop-quote-banner__image-hint,
.shop-quote-banner__image-btn:focus-visible .shop-quote-banner__image-hint {
  opacity: 1;
}

.shop-quote-banner__image-placeholder.is-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.shop-quote-banner__image-placeholder.is-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- Action buttons (Add to cart / View details) ---------- */
.shop-quote-banner__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 22px 0 4px;
}

.shop-quote-banner.has-text-align-center .shop-quote-banner__actions {
  justify-content: center;
}

.shop-quote-banner.has-text-align-right .shop-quote-banner__actions {
  justify-content: flex-end;
}

.shop-quote-banner .shop-quote-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--quote-banner-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.1s ease;
}

.shop-quote-banner .shop-quote-banner__btn:active {
  transform: translateY(1px);
}

.shop-quote-banner .shop-quote-banner__btn-label {
  display: inline-block;
}

.shop-quote-banner .shop-quote-banner__btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Add to cart: solid light pill on the dark banner */
.shop-quote-banner .shop-quote-banner__btn--cart {
  background: #ffffff;
  color: #8c1f27;
  border-color: #ffffff;
}

.shop-quote-banner .shop-quote-banner__btn--cart:hover {
  background: #f7ede9;
  border-color: #f7ede9;
  color: #8c1f27;
}

/* View details: outlined light pill */
.shop-quote-banner .shop-quote-banner__btn--details {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
}

.shop-quote-banner .shop-quote-banner__btn--details:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

/* Editor: button labels inherit the button color instead of global link rules */
.shop-quote-banner.is-editor
  .shop-quote-banner__btn-label.block-editor-rich-text__editable {
  color: inherit;
  outline: none;
  cursor: text;
}

.shop-quote-banner.is-editor .shop-quote-banner__btn {
  cursor: default;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shop-quote-banner {
    padding: 20px;
  }

  .shop-quote-banner__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .shop-quote-banner__title {
    font-size: clamp(1.25rem, 4.5vw, 1.55rem);
  }

  .shop-quote-banner__actions {
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  .shop-quote-banner {
    padding: 16px;
    border-radius: 16px;
  }
}

/* ---------- Rich-text inline formats (system toolbar) ---------- */
.shop-quote-banner mark,
.shop-quote-banner mark.has-inline-background-color {
  padding: 0.05em 0.25em;
  border-radius: 3px;
  background-color: #fdeeb3;
  color: inherit;
}

.shop-quote-banner code {
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.shop-quote-banner kbd {
  padding: 0.1em 0.4em;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.shop-quote-banner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shop-quote-banner sub,
.shop-quote-banner sup {
  font-size: 0.72em;
  line-height: 0;
}

.shop-quote-banner img {
  max-width: 100%;
  height: auto;
}

.shop-quote-banner .rich-text *,
.shop-quote-banner [data-rich-text-format-boundary] {
  box-sizing: border-box;
}
