/* 1.6.12 — Christmas decorations on the gift builder; targeted layout fixes. */
body.funbun-wordpress .gift-builder-page {
  --gift-accent: #b32635;
  --gift-soft: #f7e8e5;
  --gift-peach: #e5efe6;
  --gift-lilac: #e8f0e9;
  background: #faf7ef url("../images/christmas/snow-and-stars.svg") repeat;
  background-size: 280px 280px;
}
body.funbun-wordpress .gift-builder-page .gift-builder-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(110px, 10vw, 136px);
  background: #e5efe6 url("../images/christmas/snow-and-stars.svg") repeat !important;
  background-size: 280px 280px !important;
  border-color: #c6d9ca;
  box-shadow: inset 0 -5px 0 #b32635;
}
body.funbun-wordpress .gift-builder-page .gift-builder-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 106px;
  background: url("../images/christmas/evergreen-garland.svg") repeat-x top center / 680px 106px;
  pointer-events: none;
  z-index: -1;
}
body.funbun-wordpress .gift-builder-page .gift-builder-hero::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -12px;
  width: clamp(150px, 17vw, 230px);
  height: 270px;
  background: url("../images/christmas/christmas-tree.svg") no-repeat bottom right / contain;
  opacity: .12;
  pointer-events: none;
  z-index: -1;
}
body.funbun-wordpress .gift-builder-page :is(h1, h2, h3) { color: #234e3f; }
body.funbun-wordpress .gift-builder-page h1 em { color: #b32635 !important; }
body.funbun-wordpress .gift-builder-page :is(.section-kicker, .product-category) { color: #234e3f !important; }
body.funbun-wordpress .gift-builder-page .gift-builder-steps li { background: #fffdf5; border-color: #d3ddce; color: #234e3f; }
body.funbun-wordpress .gift-builder-page .gift-catalog { background: #fffdf5 !important; border-color: #dfd8c9; }
body.funbun-wordpress .gift-builder-page li.funbun-product-card { border-color: #d9dfd2; }
body.funbun-wordpress .gift-builder-page li.funbun-product-card > .product-image-link { background: #f0f5ee; }
body.funbun-wordpress .gift-builder-page .gift-box-card { background: #fffdf5; border-color: #c6d9ca; }
body.funbun-wordpress .gift-builder-page .gift-builder-steps li {
  border-left: 4px solid #b32635;
  background: rgba(255, 253, 245, .96);
}
body.funbun-wordpress .gift-builder-page .gift-builder-steps li:nth-child(2) { border-left-color: #32634d; }
body.funbun-wordpress .gift-builder-page .gift-builder-steps li:nth-child(3) { border-left-color: #b18a43; }
body.funbun-wordpress .gift-builder-page .gift-box-step {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: #c6d9ca;
  background: #e8f0e9 url("../images/christmas/snow-and-stars.svg") repeat !important;
  background-size: 280px 280px !important;
}
body.funbun-wordpress .gift-builder-page .gift-box-step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: repeating-linear-gradient(135deg, #b32635 0 10px, #fffdf5 10px 20px);
  pointer-events: none;
}
body.funbun-wordpress .gift-builder-page .gift-box-step::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -26px;
  width: 170px;
  height: 240px;
  background: url("../images/christmas/christmas-tree.svg") no-repeat bottom / contain;
  opacity: .1;
  pointer-events: none;
  z-index: -1;
}
body.funbun-wordpress .gift-builder-page .gift-box-card {
  position: relative;
  padding-top: 54px;
  border: 1px solid #c5a25c;
  box-shadow: 0 6px 20px rgba(35, 78, 63, .06);
}
body.funbun-wordpress .gift-builder-page .gift-box-card::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 98px;
  height: 64px;
  transform: translateX(-50%);
  background: url("../images/christmas/gift-bow.svg") no-repeat center / contain;
  pointer-events: none;
}
body.funbun-wordpress .gift-builder-page .gift-box-card > svg { color: #b32635; }
body.funbun-wordpress .gift-builder-page .gift-catalog > .shop-catalog-heading .section-kicker::before,
body.funbun-wordpress .gift-builder-page .gift-box-step > div:first-child > .section-kicker::before {
  content: "✦";
  display: inline-block;
  margin-right: 8px;
  color: #b32635;
}
body.funbun-wordpress .nav-gift-link { color: #b32635 !important; }
body.funbun-wordpress .desktop-nav .nav-gift-link::after { background: #b32635; }

/* Keep one measured gap beneath navigation, including signed-in admin views. */
body.funbun-wordpress .site-nav-shell { display: flow-root; position: relative; top: 0 !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
body.funbun-wordpress .site-nav-shell + main { display: flow-root; margin-top: 0 !important; padding-top: var(--fb-section-gap) !important; }
body.funbun-wordpress .site-nav-shell + main > section:first-of-type { margin-top: 0 !important; }
body.funbun-wordpress .site-nav-shell .site-header { margin-bottom: 0 !important; }

/* The announcement wraps naturally and aligns with the navigation below it. */
body.funbun-wordpress .site-nav-shell .announcement {
  width: calc(100% - var(--fb-page-gutter) * 2);
  max-width: var(--funbun-page-width);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 12px auto 0;
  padding: 8px 16px;
  border: 1px solid #cfddd0;
  border-radius: 16px;
  background: #e7eee4;
  color: #365442;
  line-height: 1.5;
  text-align: center;
}
body.funbun-wordpress .announcement p { width: 100%; margin: 0 !important; padding: 0 !important; font-size: 10px; line-height: 1.5; letter-spacing: .08em; white-space: normal; overflow-wrap: break-word; color: inherit; }

/* Give the item list a bounded scroll area; keep total and actions visible. */
body.funbun-cart-open { overflow: hidden; }
body.funbun-wordpress .cart-drawer { height: min(720px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
body.funbun-wordpress .cart-drawer > header,
body.funbun-wordpress .cart-drawer > .cart-drawer-footer { flex: 0 0 auto; }
body.funbun-wordpress .cart-drawer > :is(.cart-drawer-items, .widget_shopping_cart_content) { flex: 1 1 0; min-height: 0; height: auto; max-height: none; overflow-y: auto !important; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #9bbeaa #f2f4ef; scrollbar-gutter: stable; padding-block: 12px; -webkit-overflow-scrolling: touch; }
body.funbun-wordpress .cart-drawer :is(.cart-drawer-items, .widget_shopping_cart_content) .woocommerce-mini-cart { height: auto; max-height: none; overflow: visible; }
body.funbun-wordpress .cart-drawer-items:focus-visible { outline: 2px solid var(--mint-text); outline-offset: -2px; }

/* All free-box buttons share the same shape, size, type and Christmas red. */
.product-card-actions > .funbun-gift-controls { width: 100%; grid-column: 1 / -1; }
body.funbun-wordpress .gift-builder-page .funbun-gift-controls .button {
  width: 100% !important;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px 20px !important;
  border: 1px solid #b32635 !important;
  border-radius: 999px !important;
  background: #b32635 !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}
body.funbun-wordpress .funbun-gift-controls .button:disabled,
body.funbun-wordpress .funbun-add-checkout-gift-box:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.funbun-gift-minimum-message { display: block; margin-top: 12px; color: #496254; font-size: 11px; font-weight: 500; line-height: 1.6; text-align: center; }
.funbun-gift-controls .amount { font: inherit; color: inherit; }

/* Match the reserved thumbnail size to its actual size, leaving a real gap. */
body.funbun-wordpress.woocommerce-checkout #order_review .funbun-order-product { display: flex !important; align-items: center; gap: 16px !important; min-width: 0; }
body.funbun-wordpress.woocommerce-checkout #order_review .funbun-order-product-image { flex: 0 0 64px; width: 64px !important; min-width: 64px !important; max-width: 64px !important; height: 64px !important; margin: 0 !important; object-fit: cover; }
body.funbun-wordpress.woocommerce-checkout #order_review .funbun-order-product-copy { flex: 1 1 auto; min-width: 0; margin: 0 !important; padding: 0 !important; line-height: 1.5; overflow-wrap: anywhere; }
body.funbun-wordpress .funbun-account-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 700px) {
  body.funbun-wordpress .gift-builder-page .gift-builder-hero { padding-top: 100px; }
  body.funbun-wordpress .gift-builder-page .gift-builder-hero::before { height: 88px; background-size: 560px 88px; }
  body.funbun-wordpress .gift-builder-page .gift-builder-hero::after { width: 150px; height: 210px; }
  body.funbun-wordpress .gift-builder-page .gift-box-step { row-gap: 48px; }
  body.funbun-wordpress .announcement p { font-size: 9px; letter-spacing: .06em; }
  body.funbun-wordpress .cart-drawer { height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  body.funbun-wordpress.woocommerce-checkout #order_review .funbun-order-product { gap: 12px !important; }
  body.funbun-wordpress.woocommerce-checkout #order_review .funbun-order-product-image { flex-basis: 56px; width: 56px !important; min-width: 56px !important; max-width: 56px !important; height: 56px !important; }
  body.funbun-wordpress .funbun-account-overview { grid-template-columns: 1fr; }
}
@media (max-height: 560px) {
  body.funbun-wordpress .cart-drawer { padding: 16px; }
  body.funbun-wordpress .cart-drawer > header { padding-bottom: 12px; }
  body.funbun-wordpress .cart-drawer > header h2 { font-size: 24px; }
  body.funbun-wordpress .cart-drawer > .cart-drawer-footer { padding-top: 12px; }
  body.funbun-wordpress .cart-drawer-footer :is(.cart-checkout-button, .funbun-cart-close) { min-height: 40px !important; }
}
