/* Product detail inspired by an editorial storefront, adapted to Detallitos. */
.product-dialog {
  width: min(1180px, calc(100vw - 44px));
  max-height: min(92dvh, 900px);
  border: 1px solid #e1c6d1;
  background: #fffaf7;
  box-shadow: 0 35px 95px rgba(33, 19, 34, .48);
}

.product-dialog-masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 12px clamp(22px, 3vw, 40px);
  border-bottom: 0;
  background: #fffaf7;
}

.product-dialog-brand {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  align-items: center;
  color: #a70d60;
  text-decoration: none;
  line-height: 1;
}

.product-dialog-brand small {
  font: 600 8px Montserrat, Arial, sans-serif;
  letter-spacing: .38em;
}

.product-dialog-brand span {
  font: 400 34px var(--script), cursive;
}

.product-dialog-category {
  color: #825e70;
  font: 600 11px Montserrat, Arial, sans-serif;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

.product-dialog .product-dialog-close {
  position: static;
  justify-self: end;
  width: 44px;
  height: 44px;
}

.product-dialog-layout {
  grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  min-height: 0;
}

.product-dialog .product-dialog-media {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 38px) 26px;
  border-right: 0;
  background: linear-gradient(140deg, #fffaf7, #faf0f3 63%, #fffaf7);
}

.product-dialog .product-dialog-media::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('./catalog-magnolias-corner.webp') right bottom / 260px auto no-repeat;
  opacity: .11;
  pointer-events: none;
}

.product-dialog-stage,
.product-dialog-related {
  position: relative;
  z-index: 1;
}

.product-dialog-stage {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.product-dialog-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #8f526e;
}

.product-dialog-rail button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d9afc0;
  border-radius: 50%;
  background: rgba(255, 250, 247, .9);
  color: #a70d60;
  font-size: 19px;
  cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}

.product-dialog-rail button:hover {
  transform: scale(1.08);
  background: #c91478;
  color: white;
}

.product-dialog-counter {
  font: 600 11px Montserrat, Arial, sans-serif;
  letter-spacing: .07em;
  writing-mode: vertical-rl;
}

.product-dialog-image-wrap {
  display: grid;
  place-items: center;
  min-width: 0;
}

.product-dialog .product-dialog-image-wrap img {
  max-width: 100%;
  max-height: min(54dvh, 520px);
  width: auto;
  height: auto;
  border-radius: 120px 120px 8px 8px;
  box-shadow: 0 16px 36px rgba(70, 39, 55, .16);
}

.product-dialog-related {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 0;
}

.product-dialog-related > span {
  flex: 1;
  color: #754b61;
  font: 600 19px/1.2 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .01em;
  text-transform: none;
}

.product-dialog-thumbs {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.product-dialog-thumb {
  width: 63px;
  height: 63px;
  padding: 3px;
  border: 1px solid #d9bbc8;
  border-radius: 5px;
  background: #fffaf7;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.product-dialog-thumb[aria-current="true"] {
  border: 2px solid #c91478;
  box-shadow: 0 0 0 3px rgba(201, 20, 120, .12);
}

.product-dialog-thumb:hover {
  transform: translateY(-3px);
  border-color: #c91478;
}

.product-dialog .product-dialog-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 3px;
}

.product-dialog .product-dialog-copy {
  padding: clamp(29px, 4vw, 54px) clamp(26px, 5vw, 66px);
  align-self: center;
}

.product-dialog .product-dialog-eyebrow {
  color: #a70d60;
  font: 600 18px/1.2 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .035em;
  text-transform: none;
}

.product-dialog .product-dialog-copy h2 {
  color: #382b35;
  font-size: clamp(36px, 3.5vw, 55px);
  margin: 12px 0 15px;
}

.product-dialog .product-dialog-hook {
  margin-bottom: 11px;
  color: #8b315f;
  font: 600 clamp(21px, 2vw, 27px)/1.25 'Cormorant Garamond', Georgia, serif;
}

.product-dialog-description {
  margin: 0 0 22px;
  color: #51424b;
  font: 500 14px/1.7 Montserrat, Arial, sans-serif;
}

.product-dialog .product-dialog-occasion {
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  background: #fbf1f4;
  color: #51424b;
}

.product-dialog .product-dialog-occasion strong {
  margin-bottom: 3px;
  color: #a70d60;
  font: 600 17px/1.15 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .02em;
  text-transform: none;
}

.product-dialog .product-dialog-note { color: #62505b; margin: 17px 0 20px; }

.product-dialog .product-dialog-chat {
  border: 1px solid #c91478;
  transition: background .25s, transform .25s, box-shadow .25s;
}

.product-dialog .product-dialog-chat:hover {
  transform: translateY(-3px);
  background: #a70d60;
  box-shadow: 0 10px 23px rgba(167, 13, 96, .2);
}

.product-dialog-help {
  max-width: 360px;
  margin: 18px 0 0;
  color: #765d6a;
  font: 500 12px/1.6 Montserrat, Arial, sans-serif;
}

.product-dialog :is(button, a):focus-visible {
  outline: 3px solid #c91478;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .product-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    overflow: auto;
  }

  .product-dialog-masthead {
    position: sticky;
    z-index: 3;
    top: 0;
    min-height: 70px;
    padding: 9px 16px;
  }

  .product-dialog-brand span { font-size: 27px; }
  .product-dialog-brand small { font-size: 6px; }
  .product-dialog-category { font-size: 9px; letter-spacing: .06em; }
  .product-dialog .product-dialog-close { position: static; width: 39px; height: 39px; }
  .product-dialog-layout { display: block; }
  .product-dialog .product-dialog-media { min-height: 0; padding: 16px 13px 18px; border-right: 0; }
  .product-dialog .product-dialog-media::before { background-size: 185px auto; opacity: .07; }
  .product-dialog-stage { grid-template-columns: 30px minmax(0, 1fr); gap: 5px; }
  .product-dialog-rail { gap: 10px; }
  .product-dialog-rail button { width: 29px; height: 29px; }
  .product-dialog .product-dialog-image-wrap img { max-height: 45dvh; border-radius: 85px 85px 6px 6px; }
  .product-dialog-related { display: block; padding-top: 11px; }
  .product-dialog-related > span { display: block; margin-bottom: 11px; }
  .product-dialog-thumbs { justify-content: flex-start; }
  .product-dialog-thumb { width: 58px; height: 58px; }
  .product-dialog .product-dialog-copy { padding: 27px 23px 44px; }
  .product-dialog .product-dialog-copy h2 { font-size: clamp(37px, 9vw, 47px); }
  .product-dialog-description { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-dialog-rail button,
  .product-dialog-thumb,
  .product-dialog .product-dialog-chat { transition: none; }
  .product-dialog-rail button:hover,
  .product-dialog-thumb:hover,
  .product-dialog .product-dialog-chat:hover { transform: none; }
}

/* A stronger product showcase, using the shop's plum and pink palette. */
.product-dialog {
  border-color: #6e425a;
  background: #fffaf7;
}

.product-dialog-masthead {
  min-height: 91px;
  background: linear-gradient(100deg, #4b3040, #644054 52%, #4b3040);
  color: #fffaf7;
}

.product-dialog-masthead .product-dialog-brand {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  color: #fffaf7;
}

.product-dialog-masthead .product-dialog-brand::before,
.product-dialog-masthead .product-dialog-brand::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 46px;
  height: 56px;
  background: url('./catalog-flower.svg') center / contain no-repeat;
  opacity: .62;
  filter: brightness(0) invert(1);
  transform: translateY(-50%) rotate(-22deg);
  pointer-events: none;
}

.product-dialog-masthead .product-dialog-brand::before { left: -63px; }
.product-dialog-masthead .product-dialog-brand::after { right: -63px; transform: translateY(-50%) rotate(22deg) scaleX(-1); }

.product-dialog-masthead .product-dialog-category {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  color: #f6d5e3;
  text-align: left;
}

.product-dialog-masthead .product-dialog-close {
  grid-column: 3;
  grid-row: 1;
  border-color: rgba(255, 250, 247, .72);
  background: transparent;
  color: #fffaf7;
}

.product-dialog-masthead .product-dialog-close:hover {
  background: #fffaf7;
  color: #4b3040;
}

.product-dialog .product-dialog-media {
  background: linear-gradient(145deg, #fffaf7, #fdf3f5 62%, #fffaf7);
}

.product-dialog .product-dialog-media::before {
  inset: auto 0 0;
  height: 175px;
  background: url('./catalog-vintage-flowers.webp') center 49% / 340px auto repeat-x;
  opacity: .22;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%);
  mask-image: linear-gradient(to bottom, transparent, #000 55%);
}

.product-dialog-image-wrap {
  padding: 8px;
  border-radius: 190px 190px 9px 9px;
  background: #efa6c1;
  box-shadow: 0 16px 34px rgba(81, 40, 64, .12);
}

.product-dialog .product-dialog-image-wrap img {
  max-height: min(52dvh, 500px);
  border-radius: 182px 182px 5px 5px;
  box-shadow: none;
}

.product-dialog .product-dialog-copy {
  position: relative;
  isolation: isolate;
  background: #fffaf7;
}

.product-dialog .product-dialog-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 28px;
  right: 0;
  width: min(52%, 260px);
  height: 290px;
  background: url('./floral-corner.svg') right top / contain no-repeat;
  opacity: .14;
  pointer-events: none;
}

.product-dialog .product-dialog-copy h2 {
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(33px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.product-dialog .product-dialog-hook {
  color: #493541;
  font: 600 clamp(20px, 1.8vw, 25px)/1.25 'Cormorant Garamond', Georgia, serif;
}

.product-dialog-description {
  font-size: 14px;
  line-height: 1.68;
}

.product-dialog .product-dialog-occasion {
  background: #f1e3ed;
}

.product-dialog-thumb {
  box-shadow: 0 4px 10px rgba(73, 53, 65, .1);
}

@media (max-width: 700px) {
  .product-dialog-masthead { min-height: 74px; }
  .product-dialog-masthead .product-dialog-brand::before,
  .product-dialog-masthead .product-dialog-brand::after { display: none; }
  .product-dialog-masthead .product-dialog-category { max-width: 105px; font-size: 8px; }
  .product-dialog .product-dialog-media::before { height: 130px; background-size: 240px auto; opacity: .17; }
  .product-dialog-image-wrap { padding: 6px; border-radius: 100px 100px 7px 7px; }
  .product-dialog .product-dialog-image-wrap img { max-height: 43dvh; border-radius: 94px 94px 4px 4px; }
  .product-dialog .product-dialog-copy h2 { font-size: clamp(31px, 8vw, 42px); }
  .product-dialog .product-dialog-copy::before { width: 165px; height: 190px; opacity: .08; }
}

/* Bougainvillea from the supplied reference frames the product wordmark. */
.product-dialog-masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.product-dialog-masthead::before,
.product-dialog-masthead::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  width: 38%;
  background-color: #604055;
  background-image: url('./modal-bougainvillea.webp');
  background-blend-mode: multiply;
  background-position: left top;
  background-size: 450px auto;
  background-repeat: no-repeat;
  opacity: .72;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, #000 20%, transparent 100%);
  mask-image: linear-gradient(to right, #000 20%, transparent 100%);
}

.product-dialog-masthead::before { left: 0; }
.product-dialog-masthead::after { right: 0; transform: scaleX(-1); }

.product-dialog-masthead .product-dialog-brand,
.product-dialog-masthead .product-dialog-category,
.product-dialog-masthead .product-dialog-close { position: relative; z-index: 1; }

.product-dialog-masthead .product-dialog-category {
  padding: 6px 10px;
  border-radius: 3px;
  background: rgba(58, 32, 48, .58);
}

@media (max-width: 700px) {
  .product-dialog-masthead::before,
  .product-dialog-masthead::after { width: 32%; background-size: 270px auto; opacity: .48; }
  .product-dialog-masthead .product-dialog-category { padding: 3px 4px; background: rgba(58, 32, 48, .42); }
}
