:root {
  --merary-graphite: #352824;
  --merary-graphite-hover: #2c211e;
  --merary-graphite-line: #b7aaa5;
  --merary-graphite-muted: #7d7470;
  --merary-graphite-green: #59ad73;
}

body.product-exact .product-info {
  position: relative;
}

body.product-exact .merary-product-actions,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  margin-top: 13px;
}

body.product-exact .merary-buy-now,
body.product-exact .merary-add-cart,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-buy-now,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart {
  height: 40px;
  border-radius: 7px;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

body.product-exact .merary-buy-now,
body.product-exact #buyOneClick.merary-buy-now,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-buy-now {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  min-width: 0 !important;
  width: auto !important;
  height: 40px !important;
  padding: 0 18px !important;
  margin-top: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: var(--merary-graphite) !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: 0 5px 12px rgba(53, 40, 36, 0.14) !important;
}

body.product-exact .merary-add-cart,
body.product-exact #addToCart.merary-add-cart,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  width: 66px !important;
  height: 40px !important;
  padding: 0 !important;
  margin-top: 0 !important;
  border: 1px solid var(--merary-graphite-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--merary-graphite) !important;
  box-shadow: none !important;
}

body.product-exact .merary-buy-now:hover:not(:disabled),
body.product-exact #buyOneClick.merary-buy-now:hover:not(:disabled),
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-buy-now:hover:not(:disabled) {
  background: var(--merary-graphite-hover) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(53, 40, 36, 0.19) !important;
}

body.product-exact .merary-add-cart:hover:not(:disabled),
body.product-exact #addToCart.merary-add-cart:hover:not(:disabled),
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart:hover:not(:disabled) {
  background: #faf7f6 !important;
  border-color: #887a75 !important;
  color: var(--merary-graphite) !important;
}

body.product-exact .merary-buy-now:active:not(:disabled),
body.product-exact #buyOneClick.merary-buy-now:active:not(:disabled),
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-buy-now:active:not(:disabled) {
  transform: scale(0.985);
}

body.product-exact .merary-add-cart:active:not(:disabled),
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart:active:not(:disabled) {
  transform: scale(0.94);
}

.merary-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.merary-buy-now:hover .merary-arrow {
  transform: translateX(3px);
}

body.product-exact .merary-cart-icon,
body.product-exact .merary-check-icon,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-cart-icon,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-check-icon {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: transform 0.3s cubic-bezier(0.2, 0.85, 0.25, 1.25), opacity 0.2s ease;
}

body.product-exact .merary-cart-icon svg,
body.product-exact .merary-check-icon svg,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-cart-icon svg,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-check-icon svg {
  width: 100%;
  height: 100%;
}

body.product-exact .merary-cart-icon path,
body.product-exact .merary-cart-icon circle,
body.product-exact .merary-check-icon path,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-cart-icon path,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-cart-icon circle,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-check-icon path {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

body.product-exact .merary-check-icon,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-check-icon {
  opacity: 0;
  transform: scale(0.55) rotate(-8deg);
}

body.product-exact .merary-add-cart.is-added,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart.is-added {
  background: var(--merary-graphite);
  border-color: var(--merary-graphite);
  color: #fff;
}

body.product-exact .merary-add-cart.is-added .merary-cart-icon,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart.is-added .merary-cart-icon {
  opacity: 0;
  transform: translateY(12px) scale(0.72);
}

body.product-exact .merary-add-cart.is-added .merary-check-icon,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart.is-added .merary-check-icon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

body.product-exact .merary-add-cart:disabled,
body.product-exact .merary-buy-now:disabled,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart:disabled,
:is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-buy-now:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.product-exact .merary-cart-toast {
  position: absolute;
  right: 0;
  bottom: calc(100% - 8px);
  z-index: 3;
  pointer-events: none;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--merary-graphite);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(7px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.product-exact .merary-cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.product-exact .product-info .buy-zone {
  display: none !important;
}

@media (max-width: 420px) {
  body.product-exact .merary-product-actions,
  :is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-product-actions {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
  }

  body.product-exact .merary-add-cart,
  :is(body.catalog-exact, .cx-admin-stage, #bestsellers) .merary-add-cart {
    width: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .merary-buy-now,
  .merary-add-cart,
  .merary-arrow {
    transition: none;
  }
}

/* Product page — same palette as catalog cards (variant 2) */
body.product-exact .product-info.merary-product-info {
  padding: 14px 16px 15px;
  background: #fff;
  border-radius: 12px;
  box-sizing: border-box;
}

body.product-exact .product-info .cx-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--merary-graphite-green);
  font-family: Montserrat, Manrope, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

body.product-exact .product-info .cx-stock__icon {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}

body.product-exact .product-info .cx-stock--out {
  color: #b08a5a;
}

body.product-exact .product-info h1 {
  margin: 0 !important;
  color: #211a18 !important;
  font-family: "Times New Roman", Times, serif !important;
  font-size: 21px !important;
  line-height: 1.15 !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
}

body.product-exact .product-info .cx-product-desc {
  margin: 7px 0 0;
  color: var(--merary-graphite-muted);
  font-family: Montserrat, Manrope, Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 400;
}

body.product-exact .product-info .price,
body.product-exact .product-info .current-price,
body.product-exact .product-info .merary-price {
  margin: 14px 0 0 !important;
  color: #1b1513 !important;
  font-family: "Times New Roman", Times, serif !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  letter-spacing: -0.01em !important;
}

body.product-exact .product-info .subtitle,
body.product-exact .product-info .meta {
  display: none !important;
}

body.product-exact .product-info .size-block {
  margin-top: 16px !important;
}

body.product-exact .product-info .size-block h3 {
  margin: 0 0 10px !important;
  color: #211a18 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
}

body.product-exact .product-info .size-card,
body.product-exact .product-info .size-option {
  border-color: #e8e0dd !important;
  color: #211a18 !important;
}

body.product-exact .product-info .size-card span,
body.product-exact .product-info .size-option span {
  color: var(--merary-graphite-muted) !important;
}

body.product-exact .product-info .size-card.active,
body.product-exact .product-info .size-option.active {
  border-color: var(--merary-graphite) !important;
  box-shadow: 0 4px 14px rgba(53, 40, 36, 0.1) !important;
}

body.product-exact .product-info .size-card strong,
body.product-exact .product-info .size-option strong,
body.product-exact .product-info .size-card b,
body.product-exact .product-info .size-option b {
  color: #1b1513 !important;
}

body.product-exact .product-info .size-note {
  background: #faf7f6 !important;
  border: 1px solid #efe8e5 !important;
  color: var(--merary-graphite-muted) !important;
}

body.product-exact .product-info .size-note span {
  color: var(--merary-graphite) !important;
}

body.product-exact .product-info .product-messengers {
  margin-top: 18px;
}

body.product-exact .product-messengers__label {
  display: block;
  margin-bottom: 10px;
  color: var(--merary-graphite-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.2;
}

body.product-exact .product-messengers__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.product-exact .product-messenger-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e8e0dd;
  border-radius: 8px;
  background: #fff;
  color: #352824;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

body.product-exact .product-messenger-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

body.product-exact .product-messenger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(53, 40, 36, 0.08);
}

body.product-exact .product-messenger-btn--tg {
  color: #29a9e0;
}

body.product-exact .product-messenger-btn--tg:hover {
  border-color: #29a9e0;
  background: #f4fbff;
}

body.product-exact .product-messenger-btn--vk {
  color: #0077ff;
}

body.product-exact .product-messenger-btn--vk:hover {
  border-color: #0077ff;
  background: #f3f8ff;
}

body.product-exact .product-messenger-btn--max:hover {
  border-color: #9500ff;
  background: #faf5ff;
}

body.product-exact .product-info .messengers {
  display: none !important;
}

@media (max-width: 760px) {
  body.product-exact .product-info h1 {
    font-size: 19px !important;
  }

  body.product-exact .product-info .price,
  body.product-exact .product-info .merary-price {
    font-size: 20px !important;
  }
}

body.product-exact .bento-choice {
  min-width: 0;
  max-width: 100%;
}

body.product-exact .bento-fillings {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.product-exact .bento-filling {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--pc-line, #f0e2e5);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

body.product-exact .bento-filling:has(input:checked) {
  border-color: #ef4c73;
  background: #fff5f7;
  box-shadow: none;
}

body.product-exact .bento-filling input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid var(--merary-graphite-line);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

body.product-exact .bento-filling input:checked,
body.product-exact .bento-inscription__mode input:checked {
  border-color: #ef4c73;
  background: #ef4c73;
}

body.product-exact .bento-filling input:focus-visible {
  outline: 2px solid var(--merary-graphite);
  outline-offset: 2px;
}

body.product-exact .bento-filling__name {
  flex: 1 1 auto;
  min-width: 0;
  color: #211a18;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.product-exact .bento-filling__delta {
  flex: 0 0 auto;
  color: var(--merary-graphite-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

body.product-exact .bento-choice__error {
  margin: 8px 0 0;
  color: var(--pc-pink, #f13f69);
  font-size: 13px;
  line-height: 1.35;
}

body.product-exact .bento-inscription {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
  max-width: 100%;
}

body.product-exact .bento-inscription legend {
  margin: 0 0 10px;
  padding: 0;
  color: #211a18;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

body.product-exact .bento-inscription__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-width: 0;
}

body.product-exact .bento-inscription__mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #211a18;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

body.product-exact .bento-inscription__mode input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid var(--merary-graphite-line);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

body.product-exact .bento-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
  padding-bottom: 5px;
  color: #211a18;
  font-size: 15px;
}

body.product-exact .bento-total strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.product-exact .bento-inscription textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 76px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--pc-line, #f0e2e5);
  border-radius: 12px;
  background: #fff;
  color: #211a18;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
}

body.product-exact .bento-inscription textarea[hidden] {
  display: none !important;
}
