/* Стили страницы оплаты. Раньше стояли <style> внутри catalog/oplata.tpl. */
  /* The catalog body class must not add outer gutters to the payment page. */
  body:has(.order-payments) {
    max-width: none;
    padding-inline: 0;
  }
  /* Keep footer spacing inside the content background instead of a white outer margin. */
  .content:has(.order-payments) { margin-bottom: 0; padding-bottom: 24px; }

  /* Стили для прогресс-бара на странице оплаты */
  .order-progress {
    margin: 20px 0 30px 0;
    padding: 0 15px;
  }
  
  .progress-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
  }
  
  .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
  }
  
  .step-label {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  
  .progress-step.completed .step-circle {
    background-color: #60967d;
    color: white;
    border-color: #60967d;
  }
  
  .progress-step.completed .step-label {
    color: #60967d;
  }
  
  .progress-step.active .step-circle {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
  }
  
  .progress-step.active .step-label {
    color: #28a745;
    font-weight: 600;
  }
  
  .progress-line {
    height: 2px;
    background-color: #e9ecef;
    flex: 1;
    margin: 0 10px;
    margin-top: -20px;
    transition: all 0.3s ease;
  }
  
  .progress-step.completed + .progress-line {
    background-color: #60967d;
  }
  
  .progress-step.active + .progress-line {
    background-color: #28a745;
  }
  
  @media (max-width: 768px) {
    .order-progress {
      margin: 15px 0 20px 0;
      padding: 0 10px;
    }
    
    .step-circle {
      width: 35px;
      height: 35px;
      font-size: 14px;
    }
    
    .step-label {
      font-size: 12px;
    }
    
    .progress-line {
      margin: 0 5px;
      margin-top: -17px;
    }
  }


  /* Современные карточки способов оплаты */
  .payment-grid {
    margin: 12px 0 24px 0;
    row-gap: var(--bs-gutter-x);
  }
  .payment-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  }
  .payment-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: box-shadow .2s ease;
  }
  .pc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .pc-title {
    font-weight: 700;
    font-size: 16px;
  }
  .pc-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 9999px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    white-space: nowrap;
  }
  .pc-logos img{
    max-height: 36px;
    margin: 6px 10px 0 0;
    filter: saturate(1.1);
    object-fit: contain;
  }
  .pc-logos img.pc-logo-oplati{
    width: 113px;
    height: 20px;
  }
  .oplati-pay .oplati-logo { width:113px; height:20px; object-fit:contain; }
  .oplati-pay .oplati-badge--confirmed { background:#e8f5e9; color:#2e7d32; }
  .oplati-pay .pay-wait__btn:disabled { opacity:.65; cursor:wait; }
  .oplati-pay .pay-wait__value { flex-wrap:wrap; justify-content:flex-end; }
  .oplati-pay .oplati-check--secondary { margin-top:12px; background:#fff; color:#4d6d56; border:1px solid #d8d2c8; }
  .oplati-pay .oplati-check--secondary:hover,
  .oplati-pay .oplati-check--secondary:focus { background:#f4f7f5; color:#4d6d56; }
  .oplati-pay .oplati-hint--mobile { display:none; }
  .oplati-pay .oplati-how { margin:24px 0; }
  .oplati-pay .oplati-how summary { cursor:pointer; }
  body.pay-oplati .footer-yandex-review { display: none; }
  @media (max-width:768px) {
    .oplati-pay .oplati-hint--desktop { display:none; }
    .oplati-pay .oplati-hint--mobile { display:block; }
  }
  .pc-desc{
    color:#6c757d;
    line-height: 1.45;
    font-size: 14px;
  }
  .pc-form .form-control{
    height: 40px;
  }
  .pc-form .btn{
    height: 40px;
    padding: 0 16px;
  }
  .pc-more{
    color:#60967d;
    text-decoration: underline dotted;
    cursor:pointer;
    background:none;
    border:none;
    padding:0;
    font-size: 14px;
    align-self: flex-start;
  }
  @media (max-width: 767px){
    .payment-card{ padding:14px }
    .pc-title{ font-size:15px }
  }

  .wedding-gift-page {
    position: relative;
    min-height: 560px;
    margin: -15px -15px 0;
    padding: 48px 16px;
    overflow: hidden;
    background:
      radial-gradient(circle at 12% 22%, rgba(255,255,255,.9) 0 9%, rgba(255,255,255,0) 24%),
      linear-gradient(135deg, #fbf6ee 0%, #fffdf8 48%, #f4eee4 100%);
  }
  .wedding-gift-page:after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 88% 8%, rgba(214,188,156,.22) 0 2px, transparent 3px),
      radial-gradient(circle at 92% 14%, rgba(214,188,156,.18) 0 2px, transparent 3px),
      radial-gradient(circle at 86% 20%, rgba(214,188,156,.14) 0 2px, transparent 3px);
    pointer-events: none;
  }
  .wedding-gift-card {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 82px 58px;
    border: 1px solid rgba(219,197,174,.68);
    border-radius: 28px;
    background: rgba(255,253,248,.9);
    box-shadow: 0 24px 70px rgba(75,64,47,.12);
    overflow: hidden;
  }
  .wedding-gift-title {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 0 20px;
    color: #334137;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 48px;
    line-height: 1.18;
    font-weight: 400;
  }
  .wedding-gift-divider {
    position: relative;
    width: 156px;
    height: 18px;
    margin: 0 0 24px;
  }
  .wedding-gift-divider:before,
  .wedding-gift-divider:after {
    content: "";
    position: absolute;
    top: 8px;
    width: 66px;
    height: 1px;
    background: #d8c9b6;
  }
  .wedding-gift-divider:before { left: 0; }
  .wedding-gift-divider:after { right: 0; }
  .wedding-gift-divider span {
    position: absolute;
    left: 50%;
    top: -2px;
    transform: translateX(-50%);
    color: #c5a984;
    font-size: 18px;
  }
  .wedding-gift-text {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 0 28px;
    color: #6c6a64;
    font-size: 17px;
    line-height: 1.65;
  }
  .wedding-gift-form {
    position: relative;
    z-index: 1;
    max-width: 490px;
  }
  .wedding-gift-label {
    display: block;
    margin: 0 0 10px;
    color: #394339;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 600;
  }
  .wedding-gift-input-wrap {
    position: relative;
    margin: 0 0 22px;
  }
  .wedding-gift-input {
    width: 100%;
    height: 58px;
    padding: 0 68px 0 20px;
    border: 1px solid #d8d0c4;
    border-radius: 8px;
    background: rgba(255,255,255,.9);
    color: #2f382f;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
  }
  .wedding-gift-input:focus {
    border-color: #77967e;
    outline: none;
    box-shadow: 0 0 0 4px rgba(119,150,126,.16);
  }
  .wedding-gift-field-icon {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #e2dacf;
    color: #7a836f;
    font-size: 24px;
  }
  .wedding-gift-field-icon img {
    width: 25px;
    height: auto;
    display: block;
  }
  .wedding-gift-button {
    display: inline-flex;
    width: 100%;
    height: 64px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #7fa087 0%, #5f8268 100%);
    color: #fff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    box-shadow: 0 16px 28px rgba(71,108,82,.24);
    transition: transform .16s ease, box-shadow .16s ease;
  }
  .wedding-gift-button:hover,
  .wedding-gift-button:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(71,108,82,.3);
  }
  .wedding-gift-button small {
    color: rgba(255,255,255,.78);
    font-size: 28px;
    line-height: 1;
  }
  .wedding-gift-alert {
    position: relative;
    z-index: 1;
    max-width: 490px;
  }
  .wedding-gift-thx {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    color: #77716a;
    font-size: 15px;
  }
  @media (max-width: 767px){
    .wedding-gift-page {
      min-height: 0;
      margin: -10px -10px 0;
      padding: 24px 10px;
    }
    .wedding-gift-card {
      padding: 34px 22px 36px;
      border-radius: 20px;
    }
    .wedding-gift-title {
      font-size: 34px;
    }
    .wedding-gift-text {
      font-size: 15px;
    }
    .wedding-gift-button {
      height: 56px;
      font-size: 19px;
    }
  }
  .order-pay-success {
    text-align: center;
  }
  .order-pay-success .alert-heading {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
  }
  .order-pay-success p {
    margin: 8px 0 0;
  }
  .order-pay-tg {
    max-width: 560px;
    margin: 16px auto 0;
  }
  .order-pay-tg p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.45;
  }
  .order-pay-tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: #229ED9;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
  }
  .order-pay-tg-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  .order-pay-tg-btn:hover {
    background: #1b8ec4;
    color: #fff !important;
  }
  @media (max-width: 768px) {
    .order-pay-success .alert-heading {
      font-size: 26px;
    }
  }

  .erip-pay-block,
  .bank-pay-block,
  .cash-pay-block {
    max-width: 720px;
    margin: 0 auto 24px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #e3ece7;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  .erip-pay-block h1,
  .bank-pay-block h1,
  .cash-pay-block h1 {
    font-size: 24px;
    margin: 0 0 8px;
  }
  .bank-pay-block p,
  .cash-pay-block p {
    margin: 0 0 12px;
    font-size: 16px;
    color: #355a47;
  }
  .erip-pay-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 12px 0 18px;
    font-size: 16px;
  }
  .erip-pay-meta strong {
    color: #2e7d32;
  }
  .erip-pay-steps {
    margin: 0 0 16px;
    padding-left: 22px;
    line-height: 1.55;
  }
  .erip-pay-steps li {
    margin-bottom: 8px;
  }
  .erip-pay-note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3faf6;
    border: 1px solid #d7eadf;
    color: #355a47;
    font-size: 14px;
  }
  .erip-pay-note.pending {
    background: #fff8e6;
    border-color: #f0dfaa;
    color: #7a5b00;
  }
  .erip-copy-btn {
    margin-top: 4px;
  }

  .pay-wait {
    max-width: 560px;
    margin: 4px auto 0;
  }
  .pay-wait__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 7px 12px 7px 10px;
    border-radius: 999px;
    background: #e8dcc8;
    color: #5c5348;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }
  .pay-wait__badge svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
  .pay-wait h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 14px;
  }
  .pay-wait__lead {
    margin: 0 0 22px;
    color: #6c6a64;
    font-size: 16px;
    line-height: 1.55;
  }
  .pay-wait__card {
    background: #fff;
    border: 1px solid #ece8e1;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin: 0 0 18px;
    overflow: hidden;
  }
  .pay-wait__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0ece6;
  }
  .pay-wait__row:last-child {
    border-bottom: 0;
  }
  .pay-wait__row > span:first-child {
    color: #8a8680;
    font-size: 14px;
  }
  .pay-wait__value {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
  }
  .pay-wait__sum {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
  }
  .pay-wait__copy {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #d8d2c8;
    border-radius: 8px;
    background: #fff;
    color: #5c5348;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
  }
  .pay-wait__copy:hover {
    border-color: #b8b2a8;
  }
  .pay-wait form {
    margin: 0;
  }
  .pay-wait__btn {
    display: flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    background: #4d6d56;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  .pay-wait__btn:hover,
  .pay-wait__btn:focus {
    background: #42604a;
    color: #fff;
  }
  .pay-wait__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 0;
    color: #8a8680;
    font-size: 13px;
  }
  .pay-wait__secure svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  .pay-wait__help {
    margin: 28px 0 0;
    color: #6c6a64;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
  }
  .pay-wait__help a {
    color: #1a1a1a;
    font-weight: 700;
    text-decoration: underline;
  }
  @media (max-width: 640px) {
    .pay-wait h1 {
      font-size: 28px;
    }
    .pay-wait__row {
      padding: 14px 16px;
    }
  }
