/* v1.7.5: availability and sorting styling. Does not modify the user's existing catalog markup. */
#wedding-gifts .wreg-availability-row,
#wedding-gifts .wreg-sort-row { display:flex; justify-content:center; align-items:center; width:100%; margin:0 auto; font-family:'Manrope',Arial,sans-serif; }
#wedding-gifts .wreg-availability-row { margin-bottom:14px; }
#wedding-gifts .wreg-sort-row { margin-top:14px; }
#wedding-gifts .wreg-availability-toggle { display:inline-flex; align-items:center; gap:10px; cursor:pointer; color:#806568; font-size:11px; font-weight:600; letter-spacing:.025em; padding:8px 12px; border-radius:30px; }
#wedding-gifts .wreg-availability-toggle:hover { background:#fbf6f6; }
#wedding-gifts .wreg-availability-input { position:absolute; width:1px; height:1px; opacity:0; }
#wedding-gifts .wreg-availability-check { flex:0 0 auto; display:block; width:33px; height:19px; border-radius:20px; border:1px solid #ccb5b9; background:#f4e9e9; position:relative; transition:background .2s ease; }
#wedding-gifts .wreg-availability-check::after { content:''; position:absolute; width:13px; height:13px; background:#fff; border-radius:50%; top:2px; left:2px; box-shadow:0 1px 3px #0002; transition:transform .2s ease; }
#wedding-gifts .wreg-availability-input:checked + .wreg-availability-check { background:#a7747c; border-color:#a7747c; }
#wedding-gifts .wreg-availability-input:checked + .wreg-availability-check::after { transform:translateX(14px); }
#wedding-gifts .wreg-availability-input:focus-visible + .wreg-availability-check { outline:2px solid #96656e; outline-offset:3px; }
#wedding-gifts .wreg-card.is-unavailable .wreg-card-link { cursor:default; }
#wedding-gifts .wreg-card.is-unavailable .wreg-img { filter:grayscale(1) opacity(.43); transform:none !important; }
#wedding-gifts .wreg-card.is-unavailable .wreg-overlay { display:none !important; }
#wedding-gifts .wreg-card.is-unavailable .wreg-touch-caption { opacity:.56; }
#wedding-gifts .wreg-card .wreg-gift-status-tag[hidden] { display:none !important; }
#wedding-gifts .wreg-gift-status-tag { position:absolute; z-index:5; top:50%; left:50%; transform:translate(-50%,-50%); max-width:calc(100% - 16px); padding:9px 12px; text-align:center; white-space:normal; font-family:'Manrope',Arial,sans-serif; font-size:10px; font-weight:650; letter-spacing:.06em; line-height:1.35; text-transform:uppercase; color:#946a72; background:rgba(255,250,250,.95); border:1px solid rgba(159,112,125,.35); border-radius:2px; pointer-events:none; box-shadow:0 3px 16px rgba(62,35,42,.06); }
.wreg-gift-notice { position:fixed; inset:0; z-index:2147483001; display:flex; justify-content:center; align-items:center; padding:18px; font-family:'Manrope',Arial,sans-serif; }
.wreg-gift-notice-backdrop { position:absolute; inset:0; background:rgba(30,22,25,.6); backdrop-filter:blur(4px); }
.wreg-gift-notice-card { position:relative; width:min(425px,100%); padding:35px 32px 30px; background:#fffaf9; border-radius:12px; text-align:center; color:#645559; box-shadow:0 20px 70px #0003; }
.wreg-gift-notice-eyebrow { display:block; color:#946a72; font-size:10px; font-weight:600; letter-spacing:.19em; text-transform:uppercase; margin-bottom:14px; }
.wreg-gift-notice-card h2 { font:italic 400 clamp(30px,5vw,40px)/1.06 'Cormorant Garamond',Georgia,serif; color:#956870; margin:0 0 16px; }
.wreg-gift-notice-card p { font-size:13px; line-height:1.8; margin:0 0 25px; }
.wreg-gift-notice-close { background:#956870; color:#fff; border:1px solid #956870; padding:11px 24px; cursor:pointer; border-radius:4px; font:600 11px/1.3 'Manrope',Arial,sans-serif; letter-spacing:.04em; }
.wreg-gift-notice-close:hover { background:#754f58; }
.wreg-gift-notice-close:focus-visible { outline:2px solid #956870; outline-offset:4px; }
@media (max-width:680px) { #wedding-gifts .wreg-gift-status-tag { font-size:9px; padding:7px 8px; } }
@media (prefers-reduced-motion:reduce) { #wedding-gifts .wreg-availability-check, #wedding-gifts .wreg-availability-check::after { transition:none; } }

/* Discreet sorting selector, integrated with the existing gift availability controls. */
#wedding-gifts .wreg-sort-control { display:inline-flex; align-items:center; justify-content:center; gap:11px; color:#806568; font:600 11px/1.4 'Manrope',Arial,sans-serif; letter-spacing:.025em; white-space:nowrap; }
#wedding-gifts .wreg-sort-select-wrap { position:relative; display:inline-flex; align-items:center; }
#wedding-gifts .wreg-sort-select-wrap::after { content:''; position:absolute; right:12px; top:50%; width:8px; height:8px; border-right:1.5px solid #9b7a80; border-bottom:1.5px solid #9b7a80; transform:translateY(-70%) rotate(45deg); pointer-events:none; }
#wedding-gifts .wreg-sort-select { -webkit-appearance:none; appearance:none; box-sizing:border-box; min-width:175px; max-width:100%; padding:9px 34px 9px 12px; color:#806568; background-color:#fffaf9; border:1px solid #e7d9dc; border-radius:4px; cursor:pointer; font:500 11px/1.4 'Manrope',Arial,sans-serif; box-shadow:none; }
#wedding-gifts .wreg-sort-select:hover { border-color:#ba939a; }
#wedding-gifts .wreg-sort-select:focus-visible { outline:2px solid #96656e; outline-offset:2px; }

@media (max-width:600px) {
  #wedding-gifts .wreg-availability-row { margin-bottom:12px; }
  #wedding-gifts .wreg-sort-row { margin-top:12px; }
  #wedding-gifts .wreg-sort-control { justify-content:center; flex-wrap:nowrap; width:auto; }
  #wedding-gifts .wreg-sort-select { min-width:165px; }
}


/* v1.7.9 — STRUCTURAL MOBILE FIX (the touch caption is a sibling of the
   image link, not inside the legacy aspect-ratio:1/1 link).
   This sheet uses #wedding-gifts specificity to beat original Custom HTML CSS,
   even if the original style block is added later by WordPress. */
#wedding-gifts .wreg-card { min-width:0; }
#wedding-gifts .wreg-card-media {
  position:absolute; inset:0; display:block; width:100%; height:100%;
  overflow:hidden; border-radius:inherit;
  background-color:var(--wreg-gift-bg,#fff);
  contain:paint;
}
#wedding-gifts .wreg-card .wreg-img {
  background-color:var(--wreg-gift-bg,#fff) !important;
}
#wedding-gifts .wreg-card .wreg-touch-price,
#wedding-gifts .wreg-card .wreg-price,
#wedding-gifts .wreg-card .wreg-view { display:none !important; }
/* Native links. The caption is not an overlay; it never contributes to the
   square image link's aspect ratio or gets clipped by its overflow. */
#wedding-gifts .wreg-card > .wreg-touch-caption {
  display:none;
  text-decoration:none !important;
  color:inherit;
  cursor:pointer;
}
#wedding-gifts .wreg-card > .wreg-touch-caption:focus-visible {
  outline:2px solid #96656e; outline-offset:4px;
}
#wedding-gifts .wreg-card > .wreg-touch-caption:hover {
  text-decoration:none !important;
}
/* Stable GPU rasterization while scale animates back from hover. The baseline
   and hover transforms share the same 3D transform list (no layer teardown on
   the last animation frame). No filtering animation is applied to available gifts. */
@media (hover:hover) and (pointer:fine) {
  #wedding-gifts .wreg-card:not(.is-unavailable) .wreg-img {
    transform:translate3d(0,0,0) scale(1) !important;
    -webkit-transform:translate3d(0,0,0) scale(1) !important;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
    transition:transform .7s cubic-bezier(.21,.6,.29,1) !important;
  }
  #wedding-gifts .wreg-card:not(.is-unavailable) .wreg-card-link:is(:hover,:focus-visible) .wreg-img {
    transform:translate3d(0,0,0) scale(1.095) !important;
    -webkit-transform:translate3d(0,0,0) scale(1.095) !important;
  }
}
#wedding-gifts .wreg-card.is-unavailable .wreg-img {
  transform:none !important; -webkit-transform:none !important;
  filter:grayscale(1) opacity(.43) !important;
  transition:none !important;
}
/* Force the touch presentation on phones and tablet/touch devices, irrespective
   of mobile browsers emulating :hover. Photo remains a square image link;
   text flows in its OWN clickable anchor below. */
#wedding-gifts.wreg-touch-layout .wreg-grid .wreg-card {
  display:block; height:auto !important; min-height:0 !important;
  overflow:visible !important;
}
#wedding-gifts.wreg-touch-layout .wreg-card > .wreg-card-link {
  display:block !important; position:relative !important;
  width:100% !important; height:auto !important; min-height:0 !important;
  aspect-ratio:1/1 !important; overflow:hidden !important;
  isolation:isolate; background:var(--wreg-gift-bg,#fff) !important;
  border-radius:3px;
}
#wedding-gifts.wreg-touch-layout .wreg-card .wreg-card-media {
  position:absolute !important; inset:0 !important; display:block !important;
  width:100% !important; height:100% !important; aspect-ratio:auto !important;
  overflow:hidden !important;
}
#wedding-gifts.wreg-touch-layout .wreg-card .wreg-img {
  position:absolute !important; inset:0 !important;
  width:100% !important; height:100% !important;
  object-fit:contain !important; transform:none !important;
  -webkit-transform:none !important;
  transition:none !important;
}
#wedding-gifts.wreg-touch-layout .wreg-card .wreg-overlay { display:none !important; }
#wedding-gifts.wreg-touch-layout .wreg-card > a.wreg-touch-caption {
  position:static !important; inset:auto !important;
  display:block !important; visibility:visible !important;
  height:auto !important; width:100% !important;
  min-height:0 !important; max-height:none !important;
  aspect-ratio:auto !important; overflow:visible !important;
  margin:0 !important; padding:12px 2px 0 !important;
  opacity:1 !important; transform:none !important;
  text-align:left !important;
  background:transparent !important; border:0 !important;
}
#wedding-gifts.wreg-touch-layout .wreg-card.is-unavailable > a.wreg-touch-caption { opacity:.60 !important; }
#wedding-gifts.wreg-touch-layout .wreg-card .wreg-touch-title {
  display:block !important; position:static !important;
  color:var(--wreg-rose,#96656e) !important;
  font:italic 400 clamp(20px,5.3vw,29px)/1.08 'Cormorant Garamond',Georgia,serif !important;
  overflow-wrap:anywhere !important; margin:0 0 5px !important;
  text-decoration:none !important;
}
#wedding-gifts.wreg-touch-layout .wreg-card .wreg-touch-desc {
  display:block !important; position:static !important;
  color:#81736d !important;
  font:500 10px/1.6 'Manrope',Arial,sans-serif !important;
  letter-spacing:.035em !important; text-transform:uppercase !important;
  margin:6px 0 0 !important; overflow-wrap:anywhere !important;
  text-decoration:none !important;
}
@media(max-width:767px) {
  /* Also render correctly while the responsive class initializes. */
  #wedding-gifts .wreg-card > a.wreg-touch-caption {display:block; padding:12px 2px 0;}
  #wedding-gifts .wreg-card .wreg-overlay {display:none !important;}
}
@media(prefers-reduced-motion:reduce) {
  #wedding-gifts .wreg-card .wreg-img { transition-duration:.01ms !important; }
}
