/* RAY MOBILE CARDS + ACCOUNT LAYOUT 20260715
   Только мобильная версия:
   1) компактные карточки товаров;
   2) аккуратные account/login и account/register.
*/

@media (max-width: 767px) {
  /* =========================================================
     1. КАРТОЧКИ ТОВАРОВ
     ========================================================= */

  html body .product-layout,
  html body .product-grid,
  html body .product-list,
  html body .rm-product-card,
  html body .ray-home-product-card,
  html body .ray-all-bouquets-card {
    min-width: 0 !important;
  }

  html body .product-layout .product-thumb,
  html body .product-grid .product-thumb,
  html body .product-list .product-thumb,
  html body .ray-mobile-final-card .product-thumb,
  html body .ray-mobile-final-card .ray-quick-product-thumb {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 19px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  html body .product-layout .product-thumb > .image,
  html body .product-grid .product-thumb > .image,
  html body .product-list .product-thumb > .image,
  html body .ray-mobile-final-card .ray-quick-card-image,
  html body .ray-mobile-final-card .rm-product-image {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 19px 19px 0 0 !important;
  }

  html body .product-layout .product-thumb > .image > a,
  html body .product-grid .product-thumb > .image > a,
  html body .product-list .product-thumb > .image > a,
  html body .ray-mobile-final-card .ray-quick-card-image > a,
  html body .ray-mobile-final-card .rm-product-image > a {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
  }

  html body .product-layout .product-thumb > .image img,
  html body .product-grid .product-thumb > .image img,
  html body .product-list .product-thumb > .image img,
  html body .ray-mobile-final-card .ray-quick-card-image img,
  html body .ray-mobile-final-card .rm-product-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
  }

  html body .product-layout .product-thumb > .caption,
  html body .product-grid .product-thumb > .caption,
  html body .product-list .product-thumb > .caption,
  html body .ray-mobile-final-card .caption,
  html body .ray-mobile-final-card .rm-product-info {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 10px 11px 5px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html body .product-layout .product-thumb .caption h4,
  html body .product-layout .product-thumb .caption h4 a,
  html body .product-grid .product-thumb .caption h4,
  html body .product-grid .product-thumb .caption h4 a,
  html body .product-list .product-thumb .caption h4,
  html body .product-list .product-thumb .caption h4 a,
  html body .ray-mobile-final-card .caption h4,
  html body .ray-mobile-final-card .caption h4 a,
  html body .ray-mobile-final-card .rm-product-title {
    display: -webkit-box !important;
    width: 100% !important;
    min-height: 39px !important;
    max-height: 45px !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #242024 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.38 !important;
    text-align: left !important;
    text-decoration: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  html body .product-layout .product-thumb .caption > p:not(.price),
  html body .product-grid .product-thumb .caption > p:not(.price),
  html body .product-list .product-thumb .caption > p:not(.price),
  html body .ray-mobile-final-card .caption > p:not(.price),
  html body .ray-mobile-final-card .rm-product-description,
  html body .ray-mobile-final-card .description,
  html body .ray-mobile-final-card [class*="description"] {
    display: none !important;
  }

  html body .ray-mobile-final-card .ray-mobile-final-buy-row,
  html body .ray-mobile-final-card .ray-card-buy-row {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 2px 11px 8px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  html body .ray-mobile-final-card .ray-mobile-final-buy-row > .price,
  html body .ray-mobile-final-card .ray-mobile-final-buy-row > .rm-price,
  html body .ray-mobile-final-card .ray-mobile-final-price,
  html body .ray-mobile-final-card .ray-card-buy-row > .price,
  html body .ray-mobile-final-card .ray-card-buy-row > .rm-price {
    order: 1 !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 3px 6px !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #87083e !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    text-align: left !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html body .ray-mobile-final-card .price-new,
  html body .ray-mobile-final-card .rm-new-price,
  html body .ray-mobile-final-card .ray-mobile-final-price-current {
    color: #87083e !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
  }

  html body .ray-mobile-final-card .price-old,
  html body .ray-mobile-final-card .rm-old-price,
  html body .ray-mobile-final-card .ray-mobile-final-price-old {
    color: #9d969a !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    text-decoration: line-through !important;
  }

  /* Все прежние корзины внутри обработанной мобильной карточки скрываются. */
  html body .ray-mobile-final-card button[onclick*="cart.add"]:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card a[onclick*="cart.add"]:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card .rm-cart-btn:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card .torbax-cart-btn:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card .ray-card-cart-btn:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card .ray-desktop-cart-right-button:not(.ray-mobile-final-cart),
  html body .ray-mobile-final-card .ray-ab-cart-icon-only:not(.ray-mobile-final-cart) {
    display: none !important;
  }

  html body .ray-mobile-final-card .ray-mobile-final-cart {
    order: 2 !important;
    position: relative !important;
    display: inline-grid !important;
    flex: 0 0 46px !important;
    place-items: center !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #970a4a, #b3155c) !important;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(151, 10, 74, .20) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    cursor: pointer !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  html body .ray-mobile-final-card .ray-mobile-final-cart i {
    display: block !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 20px !important;
    line-height: 1 !important;
    pointer-events: none !important;
  }

  html body .ray-mobile-final-card .ray-mobile-final-cart span,
  html body .ray-mobile-final-card .ray-mobile-final-cart strong,
  html body .ray-mobile-final-card .ray-mobile-final-cart small {
    display: none !important;
  }

  html body .ray-mobile-final-card .button-group,
  html body .ray-mobile-final-card .ray-legacy-card-actions,
  html body .ray-mobile-final-card button[onclick*="compare.add"],
  html body .ray-mobile-final-card a[onclick*="compare.add"] {
    display: none !important;
  }

  html body .ray-mobile-final-card .ray-quick-order-btn,
  html body .ray-mobile-final-card .ray-mobile-final-quick {
    position: relative !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: calc(100% - 22px) !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 11px 11px !important;
    padding: 8px 7px !important;
    gap: 6px !important;
    border: 1px solid #e7bfd0 !important;
    border-radius: 12px !important;
    background: #fff8fb !important;
    color: #8f0a44 !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
  }

  html body .ray-mobile-final-card .ray-quick-order-btn i,
  html body .ray-mobile-final-card .ray-mobile-final-quick i {
    flex: 0 0 auto !important;
    font-size: 14px !important;
  }

  html body .ray-mobile-final-card .ray-card-wishlist,
  html body .ray-mobile-final-card [class*="wishlist"] {
    z-index: 5 !important;
  }

  /* Удаляем высоты, оставшиеся от прежних карточных патчей. */
  html body .ray-mobile-final-card,
  html body .ray-mobile-final-card .product-thumb,
  html body .ray-mobile-final-card .caption,
  html body .ray-mobile-final-card .rm-product-info {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  /* =========================================================
     2. АВТОРИЗАЦИЯ И РЕГИСТРАЦИЯ
     ========================================================= */

  html.ray-account-login-page body,
  html.ray-account-register-page body {
    overflow-x: hidden !important;
    background: #fffafa !important;
  }

  html.ray-account-login-page body #content,
  html.ray-account-register-page body #content {
    width: 100% !important;
    max-width: 620px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 22px 16px 145px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  html.ray-account-login-page body #content > h1,
  html.ray-account-register-page body #content > h1 {
    margin: 4px 0 20px !important;
    color: #262126 !important;
    font-size: 35px !important;
    font-weight: 700 !important;
    line-height: 1.08 !important;
    text-align: center !important;
  }

  html.ray-account-login-page body #content > h1::after,
  html.ray-account-register-page body #content > h1::after {
    content: "" !important;
    display: block !important;
    width: 74px !important;
    height: 4px !important;
    margin: 14px auto 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #920845, #ff7166) !important;
  }

  html.ray-account-login-page body #content > .row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 0 !important;
    gap: 16px !important;
  }

  html.ray-account-login-page body #content > .row > [class*="col-"] {
    float: none !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 20px 18px !important;
    border: 1px solid #edd8e1 !important;
    border-radius: 23px !important;
    background: #fff !important;
    box-shadow: 0 14px 34px rgba(84, 31, 53, .08) !important;
    box-sizing: border-box !important;
  }

  html.ray-account-login-page body #content h2 {
    margin: 0 0 8px !important;
    color: #282328 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.16 !important;
    text-align: left !important;
  }

  html.ray-account-login-page body #content h2 + p,
  html.ray-account-login-page body #content p {
    margin: 0 0 15px !important;
    color: #5f575d !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    text-align: left !important;
  }

  html.ray-account-login-page body #content form {
    width: 100% !important;
    margin: 0 !important;
  }

  html.ray-account-login-page body #content .form-group,
  html.ray-account-register-page body #content .form-group {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
  }

  html.ray-account-login-page body #content label,
  html.ray-account-register-page body #content label,
  html.ray-account-register-page body #content .control-label {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: #292429 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: left !important;
  }

  html.ray-account-login-page body #content input.form-control,
  html.ray-account-register-page body #content input.form-control,
  html.ray-account-register-page body #content select.form-control,
  html.ray-account-register-page body #content textarea.form-control {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border: 1px solid #e7d8df !important;
    border-radius: 15px !important;
    background: #fff !important;
    color: #2e292d !important;
    box-shadow: none !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  html.ray-account-register-page body #content textarea.form-control {
    height: auto !important;
    min-height: 105px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    resize: vertical !important;
  }

  html.ray-account-login-page body #content input.form-control:focus,
  html.ray-account-register-page body #content input.form-control:focus,
  html.ray-account-register-page body #content select.form-control:focus,
  html.ray-account-register-page body #content textarea.form-control:focus {
    border-color: #b5165c !important;
    box-shadow: 0 0 0 4px rgba(181, 22, 92, .10) !important;
    outline: none !important;
  }

  html.ray-account-login-page body #content a[href*="forgotten"] {
    display: inline-block !important;
    margin: 8px 0 13px !important;
    color: #8e0b44 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
  }

  html.ray-account-login-page body #content .btn,
  html.ray-account-register-page body #content .btn,
  html.ray-account-register-page body #content input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 11px 18px !important;
    border: 0 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #920845, #b81760) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(146, 8, 69, .20) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }

  html.ray-account-login-page body #content .btn:hover,
  html.ray-account-register-page body #content .btn:hover,
  html.ray-account-register-page body #content input[type="submit"]:hover {
    color: #fff !important;
    filter: brightness(.98) !important;
  }

  html.ray-account-register-page body #content > p {
    margin: 0 auto 18px !important;
    color: #5f575d !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  html.ray-account-register-page body #content > p a {
    color: #920845 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
  }

  html.ray-account-register-page body #content form.form-horizontal {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.ray-account-register-page body #content fieldset {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 16px !important;
    padding: 18px 16px 5px !important;
    border: 1px solid #edd8e1 !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(84, 31, 53, .07) !important;
    box-sizing: border-box !important;
  }

  html.ray-account-register-page body #content fieldset legend {
    float: none !important;
    width: 100% !important;
    margin: 0 0 15px !important;
    padding: 0 0 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #eee0e6 !important;
    color: #2b252a !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1.18 !important;
    text-align: left !important;
  }

  html.ray-account-register-page body #content .form-horizontal .col-sm-2,
  html.ray-account-register-page body #content .form-horizontal .col-sm-10,
  html.ray-account-register-page body #content .form-horizontal .col-sm-8,
  html.ray-account-register-page body #content .form-horizontal .col-sm-offset-2,
  html.ray-account-register-page body #content [class*="col-sm-"] {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  html.ray-account-register-page body #content .required .control-label::before {
    margin-right: 4px !important;
    color: #c51963 !important;
  }

  html.ray-account-register-page body #content .radio,
  html.ray-account-register-page body #content .checkbox,
  html.ray-account-register-page body #content label.radio-inline,
  html.ray-account-register-page body #content label.checkbox-inline {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-height: 38px !important;
    margin: 0 15px 8px 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    color: #342e32 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
  }

  html.ray-account-register-page body #content input[type="radio"],
  html.ray-account-register-page body #content input[type="checkbox"] {
    position: static !important;
    display: inline-block !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #a20c4d !important;
    transform: none !important;
    vertical-align: middle !important;
  }

  html.ray-account-register-page body #content .buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    gap: 13px !important;
    border: 1px solid #edd8e1 !important;
    border-radius: 22px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(84, 31, 53, .07) !important;
    box-sizing: border-box !important;
  }

  html.ray-account-register-page body #content .buttons .pull-left,
  html.ray-account-register-page body #content .buttons .pull-right {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: left !important;
  }

  html.ray-account-register-page body #content .buttons .pull-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  html.ray-account-register-page body #content .buttons .pull-right > label,
  html.ray-account-register-page body #content .buttons .pull-right > span,
  html.ray-account-register-page body #content .buttons .pull-right > a {
    max-width: 100% !important;
    color: #443c42 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  html.ray-account-login-page body .breadcrumb,
  html.ray-account-register-page body .breadcrumb {
    width: calc(100% - 32px) !important;
    max-width: 620px !important;
    margin: 12px auto 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 13px !important;
  }

  html.ray-account-login-page body .alert,
  html.ray-account-register-page body .alert,
  html.ray-account-register-page body .text-danger {
    width: 100% !important;
    margin: 0 0 12px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
  }
}
