/* Block wrapper reset */
.wp-block[data-type="custom-blocks/quality-guarantee"],
.editor-styles-wrapper .wp-block[data-type="custom-blocks/quality-guarantee"],
.editor-styles-wrapper .wp-block.custom-blocks-quality-guarantee,
.wp-block-custom-blocks-quality-guarantee,
.custom-blocks-quality-guarantee {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.custom-blocks-quality-guarantee {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.custom-blocks-guarantee__container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* Header */
.custom-blocks-guarantee__header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 48px auto;
}

.custom-blocks-guarantee__title {
  margin: 0 0 14px 0;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.custom-blocks-guarantee__subtitle {
  margin: 0;
  font-family: var(--font-sans, 'Inter', sans-serif);
  line-height: 1.6;
}

/* Cards Grid */
.custom-blocks-guarantee__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  margin-bottom: 48px;
  box-sizing: border-box;
}

.custom-blocks-guarantee__card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  padding: 28px 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.custom-blocks-guarantee__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
  border-color: #CBD5E1;
}

.custom-blocks-guarantee__card-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.custom-blocks-guarantee__card-title {
  margin: 0 0 8px 0;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  line-height: 1.3;
}

.custom-blocks-guarantee__card-desc {
  margin: 0;
  font-family: var(--font-sans, 'Inter', sans-serif);
  line-height: 1.55;
}

/* Card toolbar in editor */
.custom-blocks-guarantee__card-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  gap: 2px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 5px;
  padding: 1px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 5;
}

.custom-blocks-guarantee__card:hover .custom-blocks-guarantee__card-toolbar,
.custom-blocks-guarantee__card:focus-within .custom-blocks-guarantee__card-toolbar {
  opacity: 1;
  visibility: visible;
}

/* Bottom Centered CTA Button */
.custom-blocks-guarantee__cta-wrap {
  text-align: center;
  display: flex;
  justify-content: center;
  width: 100%;
}

.custom-blocks-guarantee__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 15px;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  background-color: #072547;
  color: #FFFFFF !important;
  border: 1px solid #072547;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(7, 37, 71, 0.15);
}

.custom-blocks-guarantee__btn:hover {
  background-color: #0d3d70;
  border-color: #0d3d70;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(7, 37, 71, 0.25);
}

/* Responsive */
@media (max-width: 1024px) {
  .custom-blocks-guarantee__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .custom-blocks-guarantee__grid {
    grid-template-columns: 1fr;
  }
}

/* Active Selected Item Canvas Highlight */
.custom-blocks-quality-guarantee .is-selected-focus {
  outline: 2px dashed #007cba !important;
  outline-offset: 4px !important;
  border-radius: 5px !important;
  transition: outline 0.15s ease-in-out;
}

/* ── "+ Add Card" Button Slot on Canvas ────────────────────── */
.cb-canvas-add-card {
  background: #F8FAFC !important;
  border: 2px dashed #CBD5E1 !important;
  border-radius: 5px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  min-height: 180px !important;
  padding: 24px 20px !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
  text-align: center;
}

.cb-canvas-add-card:hover {
  background: #EFF6FF !important;
  border-color: #104B8A !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08) !important;
}

.cb-add-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #64748B;
  transition: color 0.2s ease;
  width: 100%;
}

.cb-canvas-add-card:hover .cb-add-card-inner {
  color: #072547;
}

.cb-add-card-icon {
  font-size: 26px;
  font-weight: 400;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px dashed #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.cb-canvas-add-card:hover .cb-add-card-icon {
  border-color: #072547;
  background: #072547;
  color: #FFFFFF;
}

.cb-add-card-text {
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
}

.cb-canvas-empty-cards {
  transition: all 0.25s ease;
}

.cb-canvas-empty-cards:hover {
  border-color: #072547 !important;
  background: #F1F5F9 !important;
}

