/* Desktop-only regression fixes. Mobile stays isolated in mobile/mobile.css. */
@media (min-width: 761px) {
  .site-header { z-index: 1200 !important; overflow: visible !important; }
  .header-grid { position: relative; z-index: 30 !important; overflow: visible !important; }
  .search { z-index: 60 !important; overflow: visible !important; isolation: isolate; }
  .search-results {
    z-index: 2400 !important;
    max-height: min(430px, calc(100dvh - 170px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .quick-nav {
    z-index: 1 !important;
    box-sizing: border-box;
    width: 100%;
    height: 104px !important;
    min-height: 0 !important;
    max-height: 104px !important;
    overflow: hidden !important;
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    transform-origin: top center;
    will-change: height, opacity, transform;
    transition:
      height 360ms cubic-bezier(.22, 1, .36, 1),
      max-height 360ms cubic-bezier(.22, 1, .36, 1),
      padding 360ms cubic-bezier(.22, 1, .36, 1),
      opacity 220ms ease,
      transform 360ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear 0s !important;
  }

  body.is-scrolled-down .quick-nav {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -14px, 0);
    transition:
      height 360ms cubic-bezier(.22, 1, .36, 1),
      max-height 360ms cubic-bezier(.22, 1, .36, 1),
      padding 360ms cubic-bezier(.22, 1, .36, 1),
      opacity 180ms ease,
      transform 360ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear 360ms !important;
  }

  .catalog-hub-card--hero .catalog-hub-photo {
    inset: 4px 20px auto 20px !important;
    width: calc(100% - 40px) !important;
    height: 320px !important;
    overflow: hidden !important;
  }

  .catalog-hub-card--hero .catalog-hub-photo img {
    position: absolute !important;
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    width: 88% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1;
    object-fit: contain !important;
    object-position: center !important;
    transform: translate3d(-50%, -50%, 0) scale(1) !important;
    transform-origin: center;
  }

  .catalog-hub-card--hero:is(:hover, :focus-visible) .catalog-hub-photo img {
    transform: translate3d(-50%, -50%, 0) scale(1.018) !important;
  }

  .promo-showcase,
  .promo-lookbook { align-items: start !important; }

  .lookbook-card,
  .lookbook-card.is-featured {
    position: relative;
    height: 370px !important;
    min-height: 370px !important;
    max-height: 370px !important;
    grid-template-rows: 210px 160px !important;
  }

  .lookbook-media,
  .lookbook-media .product-placeholder {
    height: 210px !important;
    min-height: 210px !important;
  }

  .lookbook-media .product-placeholder.has-image img {
    width: 100%;
    height: 100%;
    padding: 4px 8px !important;
    object-fit: contain !important;
  }

  .lookbook-copy,
  .lookbook-card.is-featured .lookbook-copy {
    min-height: 0 !important;
    grid-template-rows: auto auto auto minmax(0, 1fr) !important;
    gap: 7px !important;
    padding: 11px 13px 12px !important;
  }

  .lookbook-copy h3,
  .lookbook-card.is-featured h3 { min-height: 2.1em !important; font-size: 1rem !important; }
  .lookbook-meta { max-height: 50px; overflow: hidden; }
  .lookbook-actions { min-height: 0 !important; margin: 0 !important; }
  .lookbook-link { display: none !important; }

  .lookbook-favorite,
  .lookbook-cart,
  :is(.favorites-grid, .favorites-hits-grid) :is(.favorite-button, .product-cart-button),
  .cart-recommendation-actions :is(.product-cart-button, .favorite-button),
  .detail-similar .similar-card-actions :is(.product-cart-button, .favorite-button) {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid rgba(200, 216, 231, .9) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .96) !important;
    color: #102844 !important;
    box-shadow: 0 9px 20px rgba(20, 45, 78, .13) !important;
    font-size: 0 !important;
  }

  .lookbook-favorite,
  .lookbook-cart {
    position: absolute !important;
    top: 12px !important;
    z-index: 9 !important;
  }

  .lookbook-favorite { right: 12px !important; }
  .lookbook-cart { right: 60px !important; }

  :is(.lookbook-card, .favorites-grid, .favorites-hits-grid, .cart-recommendations, .detail-similar) .product-cart-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    fill: none;
    stroke: currentColor;
  }

  :is(.lookbook-cart, .product-cart-button).is-in-cart {
    border-color: #102844 !important;
    background: #102844 !important;
    color: #fff !important;
  }

  .home-picks-layout { align-items: start !important; }
  .home-picks-group { align-self: start !important; grid-template-rows: auto auto !important; }
  .home-picks-group .home-product-grid { align-items: start !important; grid-auto-rows: 350px !important; }

  .home-picks-group .product-card,
  .home-product-grid .product-card {
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;
    grid-template-rows: 224px 126px !important;
  }

  .home-picks-group .product-media,
  .home-picks-group .product-placeholder { height: 224px !important; min-height: 224px !important; }
  .home-picks-group .product-placeholder.has-image img { padding: 2px 4px !important; object-fit: contain !important; }

  .home-picks-group .product-body {
    min-height: 0 !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 4px !important;
    padding: 9px 11px 10px !important;
  }

  .home-picks-group .product-title-row h3,
  .home-picks-group .product-card h3 {
    min-height: 1.2em !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-picks-group .product-tags .discount-tag {
    display: none !important;
  }

  .home-picks-group .product-footer { align-self: end !important; gap: 5px !important; }
  .home-picks-group .primary-button { min-height: 36px !important; }

  .favorites-grid,
  .favorites-hits-grid,
  .cart-recommendation-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: start !important;
  }

  :is(.favorites-grid, .favorites-hits-grid) .product-card,
  .cart-recommendation-card {
    position: relative;
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;
    grid-template-rows: 238px 112px !important;
  }

  :is(.favorites-grid, .favorites-hits-grid) :is(.product-media, .product-placeholder),
  .cart-recommendation-photo { height: 238px !important; min-height: 238px !important; }

  :is(.favorites-grid, .favorites-hits-grid) .product-placeholder.has-image img,
  .cart-recommendation-photo img { padding: 5px 7px !important; object-fit: contain !important; }

  :is(.favorites-grid, .favorites-hits-grid) .product-body {
    min-height: 0 !important;
    grid-template-rows: 18px 24px 32px !important;
    align-content: center !important;
    gap: 4px !important;
    padding: 10px 13px 12px !important;
  }

  :is(.favorites-grid, .favorites-hits-grid) :is(.product-category-copy, .product-meta, .swatches, .service-note, .delivery-note, .economy),
  :is(.favorites-grid, .favorites-hits-grid) .product-tags .discount-tag { display: none !important; }

  :is(.favorites-grid, .favorites-hits-grid) .product-title-row h3 {
    min-height: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  :is(.favorites-grid, .favorites-hits-grid) .product-footer { display: block !important; align-self: center !important; justify-self: end !important; }

  :is(.favorites-grid, .favorites-hits-grid) :is(.favorite-button, .product-cart-button) {
    position: absolute !important;
    top: 12px !important;
    z-index: 9 !important;
  }

  :is(.favorites-grid, .favorites-hits-grid) .favorite-button { right: 12px !important; }
  :is(.favorites-grid, .favorites-hits-grid) .product-cart-button { right: 60px !important; }

  :is(.favorites-grid, .favorites-hits-grid) .rating,
  .cart-recommendation-rating,
  .similar-card-rating { color: #f2a000 !important; font-weight: 900 !important; }

  .cart-recommendation-photo { width: 100% !important; padding: 0 !important; }
  .cart-recommendation-photo img { width: 100%; height: 100%; }
  .cart-recommendation-body { min-height: 0 !important; align-content: center; gap: 6px !important; padding: 11px 13px !important; }
  .cart-recommendation-actions { position: absolute !important; top: 12px; right: 12px; z-index: 9; display: flex !important; gap: 8px; }

  .cart-recommendation-actions :is(.product-cart-button, .favorite-button),
  .detail-similar .similar-card-actions :is(.product-cart-button, .favorite-button) {
    position: static !important;
    inset: auto !important;
    transform: none;
  }

  .product-modal,
  .product-modal.is-open { z-index: 5000 !important; }
  .product-detail { border-radius: 0 !important; }
  .detail-main { min-height: 0 !important; grid-template-columns: minmax(430px, .92fr) minmax(520px, 1.08fr) !important; }
  .detail-gallery { min-height: 620px !important; padding: 24px !important; }
  .detail-info { min-height: 0 !important; gap: 13px !important; padding: 26px 30px 30px !important; }
  .detail-stage,
  .detail-stage .product-placeholder { min-height: 500px !important; }
  .detail-description,
  .detail-characteristics { padding: 14px !important; }
  .detail-delivery { padding-top: 4px !important; }
  .detail-reviews,
  .detail-similar { padding-block: 24px !important; }

  .detail-similar .similar-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    overflow: visible !important;
    padding: 2px !important;
  }

  .detail-similar .similar-card {
    min-width: 0 !important;
    min-height: 350px !important;
    height: 350px !important;
    position: relative;
    display: grid !important;
    grid-template-rows: 238px 112px !important;
    overflow: hidden;
    border-radius: 22px !important;
  }

  .detail-similar .similar-card > .product-placeholder { width: 100%; height: 238px !important; min-height: 238px !important; padding: 0 !important; }
  .detail-similar .similar-card > .product-placeholder img { width: 100%; height: 100%; padding: 5px 7px !important; object-fit: contain !important; }

  .detail-similar .similar-card-body {
    min-height: 0 !important;
    grid-template-rows: 18px 22px 16px 30px !important;
    align-content: center;
    gap: 3px !important;
    padding: 9px 12px 11px !important;
  }

  .detail-similar .similar-card-body strong { min-height: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail-similar .similar-card-actions[hidden] {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: auto !important;
    display: flex !important;
    gap: 8px;
  }

  :is(.lookbook-card, .favorites-page-grid, .cart-recommendations, .detail-similar) .product-cart-button.is-added .product-cart-icon {
    animation: desktopCartIconAdd 680ms cubic-bezier(.22, 1, .36, 1) both;
  }

  :is(.lookbook-card, .favorites-page-grid, .cart-recommendations, .detail-similar) .product-cart-button.is-removed .product-cart-icon {
    animation: desktopCartIconRemove 680ms cubic-bezier(.22, 1, .36, 1) both;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .favorites-grid,
  .favorites-hits-grid,
  .cart-recommendation-grid,
  .detail-similar .similar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Requested desktop corrections. This layer intentionally never applies to <= 760px. */
@media (min-width: 761px) {
  /* The category rail is taken out of document flow so hiding it cannot move the page. */
  .site-header {
    isolation: isolate;
  }

  .quick-nav {
    position: absolute !important;
    top: 100%;
    left: 50%;
    width: min(1770px, calc(100vw - 64px)) !important;
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    padding-block: 0 !important;
    opacity: 1 !important;
    visibility: visible;
    transform: translate3d(-50%, 0, 0) !important;
    will-change: transform, opacity;
    transition:
      opacity 180ms ease,
      transform 280ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear 0s !important;
    border: 1px solid rgba(204, 219, 234, .94) !important;
    border-radius: 0 0 24px 24px !important;
    background: rgba(248, 251, 255, .98) !important;
    box-shadow: 0 18px 34px rgba(16, 40, 68, .12) !important;
    backdrop-filter: blur(16px);
  }

  body.is-scrolled-down .quick-nav {
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    padding-block: 0 !important;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, calc(-100% - 10px), 0) !important;
    transition:
      opacity 160ms ease,
      transform 260ms cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear 260ms !important;
  }

  .marketplace,
  .cart-page,
  .account-page {
    margin-top: 104px !important;
  }

  /* Keep the main header at one stable height; only the category rail moves. */
  .site-header.is-compact .header-grid {
    min-height: 78px !important;
  }

  /* Icon-only cart buttons have one explicit label node, so the SVG stays truly centered. */
  :is(
    .lookbook-cart,
    #productGrid .product-cart-button,
    .category-product-grid .product-cart-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__favorite,
    .sona-profile-showcase-card__cart
  ) > .product-cart-label {
    display: none !important;
  }

  :is(
    .lookbook-cart,
    #productGrid .product-cart-button,
    .category-product-grid .product-cart-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__cart
  ) {
    grid-template: 1fr / 1fr !important;
    place-items: center !important;
    line-height: 0 !important;
  }

  :is(
    .lookbook-cart,
    #productGrid .product-cart-button,
    .category-product-grid .product-cart-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__cart
  ) .product-cart-icon {
    display: block !important;
    grid-area: 1 / 1 !important;
    width: 23px !important;
    height: 23px !important;
    margin: 0 !important;
    transform: none;
    fill: none !important;
    stroke: currentColor !important;
  }

  /* Hits and ready-made solutions use the same two icon actions as every other card. */
  .home-picks-group .product-card {
    position: relative;
  }

  .home-picks-group .product-footer .product-cart-button {
    position: absolute !important;
    top: 12px !important;
    right: 60px !important;
    z-index: 9 !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid rgba(200, 216, 231, .9) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .96) !important;
    color: #102844 !important;
    box-shadow: 0 9px 20px rgba(20, 45, 78, .13) !important;
    font-size: 0 !important;
  }

  .home-picks-group .product-footer .product-cart-button.is-in-cart {
    border-color: #7b8794 !important;
    background: #7b8794 !important;
    color: #fff !important;
  }

  .home-picks-group .product-footer .product-cart-label {
    display: none !important;
  }

  .home-picks-group .product-footer .product-cart-icon {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
  }

  :is(
    .lookbook-card,
    #productGrid,
    .category-product-grid,
    .home-picks-group,
    .favorites-grid,
    .favorites-hits-grid,
    .cart-recommendations,
    .detail-similar
  ) .product-cart-button.is-added .product-cart-icon {
    animation: desktopCartIconAdd 680ms cubic-bezier(.22, 1, .36, 1) both !important;
  }

  :is(
    .lookbook-card,
    #productGrid,
    .category-product-grid,
    .home-picks-group,
    .favorites-grid,
    .favorites-hits-grid,
    .cart-recommendations,
    .detail-similar
  ) .product-cart-button.is-removed .product-cart-icon {
    animation: desktopCartIconRemove 680ms cubic-bezier(.22, 1, .36, 1) both !important;
  }

  /* The old red discount badge above media is removed; price, old price and discount remain below. */
  .product-tags .discount-tag {
    display: none !important;
  }

  /* One heart interaction and one ring/burst animation everywhere. */
  .favorite-button.is-active {
    animation: none !important;
  }

  .favorite-button.is-favorite-animating,
  .favorite-button.is-favorite-removing {
    animation: desktopFavoritePop 520ms cubic-bezier(.22, 1.55, .36, 1) both !important;
  }

  .favorite-button.is-favorite-animating::before,
  .favorite-button.is-favorite-removing::before {
    animation: favoriteBurst 520ms ease-out !important;
  }

  .favorite-button.is-favorite-animating::after,
  .favorite-button.is-favorite-removing::after {
    animation: favoriteRing 520ms ease-out !important;
  }

  .favorite-button:is(.is-favorite-animating, .is-favorite-removing) .favorite-icon {
    animation: desktopFavoriteHeart 500ms ease-out !important;
  }

  /* Weekly deals: no card numbers or clipped specification chips. */
  .lookbook-copy,
  .lookbook-card.is-featured .lookbook-copy {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    align-content: stretch !important;
    gap: 6px !important;
    padding: 10px 13px 13px !important;
  }

  .lookbook-topline {
    justify-content: flex-end !important;
    min-height: 16px;
  }

  .lookbook-number,
  .lookbook-meta {
    display: none !important;
  }

  .lookbook-copy h3,
  .lookbook-card.is-featured h3 {
    min-height: 0 !important;
    align-self: start;
    margin-top: 0 !important;
  }

  .lookbook-price {
    align-self: end;
    min-height: 28px;
    margin-top: auto;
  }

  .lookbook-actions {
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none;
  }

  .lookbook-actions .lookbook-cart {
    pointer-events: auto;
  }

  /* Reviews use one yellow accent in all desktop card families. */
  :is(
    .rating,
    .detail-rating,
    .similar-card-rating,
    .cart-recommendation-rating,
    .cart-item-rating,
    .sona-profile-showcase-card__meta
  ) {
    color: #f2a000 !important;
    font-weight: 900 !important;
  }

  /* Product detail controls are large enough to read at desktop scale. */
  .detail-share-button {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
  }

  .detail-favorite-button {
    right: 80px !important;
  }

  .detail-share-button .share-icon {
    width: 25px !important;
    height: 25px !important;
    stroke-width: 2.2;
  }

  /* Gallery thumbnails preserve the whole photo inside the rounded plate. */
  .detail-thumb {
    overflow: hidden !important;
    padding: 5px !important;
    background: #fff !important;
  }

  .detail-thumb img,
  .detail-thumb.is-sofa-interior-photo img,
  .detail-thumb.is-sofa-layout-photo img,
  .detail-thumb.is-attached-sofa-photo img {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f7f9fc !important;
  }

  /* The primary detail action visibly morphs from blue into the gray in-cart state. */
  .detail-actions .product-cart-button {
    transition:
      background 420ms cubic-bezier(.22, 1, .36, 1),
      border-color 420ms ease,
      color 260ms ease,
      box-shadow 420ms ease,
      transform 220ms cubic-bezier(.22, 1.35, .36, 1) !important;
  }

  .detail-actions .product-cart-button.is-in-cart {
    border-color: #87919d !important;
    background: linear-gradient(145deg, #89939f, #717d8b) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(61, 75, 91, .2) !important;
  }

  .detail-actions .product-cart-button.is-added {
    animation: detailCartStateIn 620ms cubic-bezier(.22, 1.25, .36, 1) both !important;
  }

  /* Cart rows: larger media, product name, review line and remove control. */
  .cart-item {
    min-height: 196px;
    grid-template-columns: 190px minmax(0, 1fr) !important;
    align-items: center;
    gap: 24px !important;
    padding: 20px !important;
    transform-origin: center;
    transition:
      transform 300ms cubic-bezier(.22, 1, .36, 1),
      border-color 260ms ease,
      box-shadow 300ms ease,
      opacity 260ms ease !important;
  }

  .cart-item:not(.is-removing):hover {
    transform: translateY(-5px) scale(1.006) !important;
    border-color: rgba(40, 91, 137, .34) !important;
    box-shadow: 0 22px 42px rgba(16, 40, 68, .15) !important;
  }

  .cart-item:not(.is-removing):hover .cart-placeholder img {
    transform: scale(1.045) !important;
  }

  .cart-item .cart-placeholder img {
    transition: transform 360ms cubic-bezier(.22, 1, .36, 1) !important;
  }

  .cart-item.is-removing {
    pointer-events: none;
    animation: desktopCartItemRemove 480ms cubic-bezier(.4, 0, .2, 1) forwards !important;
  }

  .cart-item .cart-placeholder,
  .cart-item .cart-placeholder.has-image {
    width: 190px !important;
    height: 154px !important;
    min-height: 154px !important;
    padding: 4px !important;
  }

  .cart-item .cart-placeholder.has-image img {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    object-fit: contain !important;
  }

  .cart-item-body {
    align-self: stretch;
    align-content: center;
    gap: 12px !important;
  }

  .cart-item-title strong {
    font-size: 1.2rem !important;
    line-height: 1.2 !important;
  }

  .cart-item-rating {
    font-size: .94rem;
  }

  .remove-button {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    font-size: 1.45rem !important;
    line-height: 1 !important;
  }

  .cart-item-price {
    font-family: inherit;
    font-size: 1.12rem;
    font-weight: 900;
  }

  /* Recommendation cards keep their last row visible and use the same price typography. */
  .cart-recommendation-card {
    height: 386px !important;
    min-height: 386px !important;
    max-height: 386px !important;
    grid-template-rows: 238px 148px !important;
    cursor: pointer;
  }

  .cart-recommendation-body {
    min-height: 148px !important;
    align-content: center !important;
    padding: 12px 14px 20px !important;
  }

  .cart-recommendation-price {
    color: #102844 !important;
    font-family: inherit !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    line-height: 1.2;
  }

  .cart-recommendation-card:is(:hover, :focus-visible) {
    transform: translateY(-4px) !important;
    border-color: rgba(40, 91, 137, .3) !important;
    box-shadow: 0 20px 38px rgba(16, 40, 68, .14) !important;
  }

  /* Similar cards show only reviews, name and pricing; dimensions stay in details. */
  .detail-similar .similar-card-body {
    grid-template-rows: 18px 24px 30px !important;
  }

  .detail-similar .similar-card-meta {
    display: none !important;
  }

  /* One shared geometry for every icon-only cart/favorite pair. */
  :is(
    .lookbook-favorite,
    .lookbook-cart,
    #productGrid .favorite-button,
    #productGrid .product-cart-button,
    .category-product-grid .favorite-button,
    .category-product-grid .product-cart-button,
    .home-picks-group .favorite-button,
    .home-picks-group .product-cart-button,
    .favorites-grid .favorite-button,
    .favorites-grid .product-cart-button,
    .favorites-hits-grid .favorite-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .favorite-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .favorite-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__favorite,
    .sona-profile-showcase-card__cart
  ) {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid rgba(200, 216, 231, .9) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, .97) !important;
    color: #102844 !important;
    box-shadow: 0 9px 20px rgba(20, 45, 78, .13) !important;
    line-height: 0 !important;
  }

  :is(
    .lookbook-cart,
    #productGrid .product-cart-button,
    .category-product-grid .product-cart-button,
    .home-picks-group .product-cart-button,
    .favorites-grid .product-cart-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__cart
  ).is-in-cart {
    border-color: #15598f !important;
    background: linear-gradient(145deg, #2478b8, #15558e) !important;
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(20, 91, 148, .3) !important;
  }

  :is(
    .lookbook-cart,
    #productGrid .product-cart-button,
    .category-product-grid .product-cart-button,
    .home-picks-group .product-cart-button,
    .favorites-grid .product-cart-button,
    .favorites-hits-grid .product-cart-button,
    .cart-recommendation-actions .product-cart-button,
    .similar-card-actions .product-cart-button,
    .sona-profile-showcase-card__cart
  ) .product-cart-icon,
  :is(
    .lookbook-favorite,
    #productGrid .favorite-button,
    .category-product-grid .favorite-button,
    .home-picks-group .favorite-button,
    .favorites-grid .favorite-button,
    .favorites-hits-grid .favorite-button,
    .cart-recommendation-actions .favorite-button,
    .similar-card-actions .favorite-button,
    .sona-profile-showcase-card__favorite
  ) .favorite-icon {
    display: block !important;
    width: 23px !important;
    height: 23px !important;
    margin: 0 !important;
  }

  .lookbook-favorite,
  .home-picks-group .favorite-button,
  :is(.favorites-grid, .favorites-hits-grid) .favorite-button,
  #productGrid .favorite-button,
  .category-product-grid .favorite-button {
    right: 12px !important;
  }

  .lookbook-cart,
  .home-picks-group .product-cart-button,
  :is(.favorites-grid, .favorites-hits-grid) .product-cart-button,
  #productGrid .product-cart-button,
  .category-product-grid .product-cart-button {
    right: 64px !important;
  }

  /* The weekly cart is a direct child, guaranteed to sit left of the heart. */
  .lookbook-card > .lookbook-cart {
    position: absolute !important;
    top: 12px !important;
    right: 64px !important;
    z-index: 12 !important;
  }

  /* One reference animation, based on the Hits/New arrivals cards, everywhere. */
  :is(
    .lookbook-card,
    #productGrid,
    .category-product-grid,
    .home-picks-group,
    .favorites-grid,
    .favorites-hits-grid,
    .cart-recommendations,
    .detail-similar,
    .detail-actions,
    .sona-profile-showcase-card
  ) .product-cart-button.is-added {
    animation: desktopCartStandardAdd 680ms cubic-bezier(.22, 1.45, .36, 1) both !important;
  }

  :is(
    .lookbook-card,
    #productGrid,
    .category-product-grid,
    .home-picks-group,
    .favorites-grid,
    .favorites-hits-grid,
    .cart-recommendations,
    .detail-similar,
    .detail-actions,
    .sona-profile-showcase-card
  ) .product-cart-button.is-removed {
    animation: desktopCartStandardRemove 680ms cubic-bezier(.22, 1.25, .36, 1) both !important;
  }

  :is(
    .lookbook-card,
    #productGrid,
    .category-product-grid,
    .home-picks-group,
    .favorites-grid,
    .favorites-hits-grid,
    .cart-recommendations,
    .detail-similar,
    .sona-profile-showcase-card
  ) .product-cart-button:is(.is-added, .is-removed) .product-cart-icon {
    animation: desktopCartStandardIcon 680ms cubic-bezier(.22, 1.5, .36, 1) both !important;
  }

  /* Full enter/exit choreography for cart rows. */
  .cart-item {
    position: relative;
    overflow: hidden;
    animation: desktopCartItemEnter 620ms cubic-bezier(.22, 1, .36, 1) both !important;
    animation-delay: calc(var(--cart-index, 0) * 55ms) !important;
  }

  .cart-item::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .76) 48%, transparent 64%);
    transform: translateX(-130%);
    animation: desktopCartItemSheen 760ms ease-out calc(var(--cart-index, 0) * 55ms + 90ms) both;
  }

  .cart-item.is-removing {
    animation: desktopCartItemRemove 560ms cubic-bezier(.4, 0, .2, 1) forwards !important;
    animation-delay: 0ms !important;
  }

  .cart-item.is-removing .cart-placeholder {
    animation: desktopCartMediaExit 460ms cubic-bezier(.4, 0, .2, 1) forwards;
  }

  .cart-item.is-removing .cart-item-body {
    animation: desktopCartBodyExit 420ms cubic-bezier(.4, 0, .2, 1) forwards;
  }

  /* Final universal action state: every current and future card gets the same motion. */
  body .product-cart-button.is-in-cart,
  body .detail-actions .product-cart-button.is-in-cart {
    border-color: #15598f !important;
    background: linear-gradient(145deg, #2478b8, #15558e) !important;
    color: #fff !important;
    box-shadow: 0 12px 26px rgba(20, 91, 148, .3) !important;
  }

  body .product-cart-button.is-added {
    animation: desktopCartStandardAdd 680ms cubic-bezier(.22, 1.45, .36, 1) both !important;
  }

  body .product-cart-button.is-removed {
    animation: desktopCartStandardRemove 680ms cubic-bezier(.22, 1.25, .36, 1) both !important;
  }

  body .product-cart-button:is(.is-added, .is-removed) .product-cart-icon {
    animation: desktopCartStandardIcon 680ms cubic-bezier(.22, 1.5, .36, 1) both !important;
  }

  body .favorite-button:is(.is-favorite-animating, .is-favorite-removing) {
    animation: desktopFavoriteReference 560ms cubic-bezier(.22, 1.55, .36, 1) both !important;
  }

  body .favorite-button:is(.is-favorite-animating, .is-favorite-removing)::before {
    animation: favoriteBurst 560ms ease-out !important;
  }

  body .favorite-button:is(.is-favorite-animating, .is-favorite-removing)::after {
    animation: favoriteRing 560ms ease-out !important;
  }

  body .favorite-button:is(.is-favorite-animating, .is-favorite-removing) .favorite-icon {
    animation: desktopFavoriteReferenceIcon 560ms cubic-bezier(.22, 1.5, .36, 1) both !important;
  }

  /* Full-bleed, compact, solid footer without radial background shimmer. */
  .site-footer.app-shell {
    box-sizing: border-box;
    width: 100vw !important;
    max-width: none !important;
    min-height: 0 !important;
    grid-template-columns: minmax(320px, 1.15fr) minmax(250px, .85fr) minmax(250px, .72fr);
    gap: clamp(22px, 3vw, 48px) !important;
    margin: 34px calc(50% - 50vw) 0 !important;
    padding: 30px max(34px, calc((100vw - 1770px) / 2 + 34px)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #10233b !important;
    box-shadow: none !important;
  }

  .site-footer.app-shell::before {
    inset: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .site-footer.app-shell::after {
    content: none !important;
    display: none !important;
  }

  .site-footer .footer-brand-panel {
    min-height: 0 !important;
    align-content: start !important;
    gap: 14px !important;
  }

  .site-footer .footer-brand {
    font-size: clamp(1.55rem, 2vw, 2.25rem) !important;
  }

  .site-footer .footer-brand img {
    width: 52px !important;
    height: 52px !important;
    border-radius: 13px !important;
  }

  .site-footer .footer-brand-panel h2 {
    max-width: 650px !important;
    font-size: clamp(2.35rem, 3.6vw, 4.25rem) !important;
    line-height: .96 !important;
  }

  .site-footer .footer-brand-panel p {
    max-width: 560px !important;
    font-size: .94rem !important;
    line-height: 1.5 !important;
  }

  .site-footer .footer-contact-card,
  .site-footer .footer-payment {
    padding: 12px 14px !important;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .site-footer.app-shell {
    grid-template-columns: minmax(300px, 1.1fr) minmax(300px, .9fr) !important;
    padding-inline: 28px !important;
  }

  .site-footer .footer-brand-panel {
    grid-column: auto !important;
  }

  .site-footer .footer-contact-panel {
    grid-column: 2;
  }
}

@keyframes desktopFavoritePop {
  0% { transform: scale(.82); }
  52% { transform: scale(1.17); }
  100% { transform: scale(1); }
}

@keyframes desktopFavoriteHeart {
  0% { transform: scale(.68) rotate(-7deg); }
  48% { transform: scale(1.24) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes desktopFavoriteReference {
  0% { transform: scale(1); }
  32% { transform: scale(.82) rotate(-5deg); }
  66% { transform: scale(1.16) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes desktopFavoriteReferenceIcon {
  0% { transform: scale(1); }
  34% { transform: scale(.68) rotate(-8deg); }
  68% { transform: scale(1.28) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes detailCartStateIn {
  0% { transform: scale(1); }
  38% { transform: scale(.96); }
  72% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes desktopCartItemRemove {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    max-height: 260px;
  }
  46% {
    opacity: .72;
    transform: translate3d(22px, 0, 0) scale(.985);
  }
  100% {
    opacity: 0;
    transform: translate3d(90px, 0, 0) scale(.94);
    max-height: 0;
    margin-block: -8px;
    padding-block: 0;
    border-width: 0;
  }
}

@keyframes desktopCartStandardAdd {
  0% { transform: scale(1); }
  30% { transform: scale(.88); }
  64% { transform: scale(1.12); box-shadow: 0 0 0 9px rgba(66, 133, 190, .14), 0 14px 28px rgba(16, 40, 68, .2); }
  100% { transform: scale(1); }
}

@keyframes desktopCartStandardRemove {
  0% { transform: scale(1); }
  34% { transform: scale(.9) rotate(-4deg); }
  68% { transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes desktopCartStandardIcon {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  32% { transform: translate3d(4px, -3px, 0) scale(.78) rotate(-8deg); }
  68% { transform: translate3d(-2px, 1px, 0) scale(1.24) rotate(5deg); }
  100% { transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}

@keyframes desktopCartItemEnter {
  0% { opacity: 0; transform: translate3d(-36px, 18px, 0) scale(.965); }
  62% { opacity: 1; transform: translate3d(5px, -2px, 0) scale(1.008); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes desktopCartItemSheen {
  0% { transform: translateX(-130%); opacity: 0; }
  28% { opacity: .75; }
  100% { transform: translateX(130%); opacity: 0; }
}

@keyframes desktopCartMediaExit {
  to { opacity: 0; transform: translate3d(32px, -5px, 0) scale(.82) rotate(3deg); }
}

@keyframes desktopCartBodyExit {
  to { opacity: 0; transform: translate3d(26px, 0, 0); filter: blur(2px); }
}

/* Final desktop-only polish: stable cart collapse and clean white product media. */
@media (min-width: 761px) {
  .cart-item.is-removing {
    box-sizing: border-box !important;
    height: var(--cart-item-height, 196px) !important;
    min-height: 0 !important;
    max-height: var(--cart-item-height, 196px) !important;
    overflow: hidden !important;
    transform-origin: center right !important;
    animation: desktopCartItemRemoveSmooth 650ms cubic-bezier(.4, 0, .2, 1) forwards !important;
  }

  :is(
    .product-card .product-media,
    .product-card .product-placeholder,
    .cart-recommendation-card .cart-recommendation-photo,
    .sofa-collection-card,
    .sofa-collection-card .sofa-collection-photo,
    .catalog-hub-card--hero,
    .catalog-hub-card--hero .catalog-hub-photo,
    .catalog-hub-card--product-tile,
    .catalog-hub-card--product-tile .catalog-hub-photo
  ) {
    background-color: #fff !important;
    background-image: none !important;
  }

  :is(
    .product-card .product-media,
    .product-card .product-placeholder,
    .cart-recommendation-card .cart-recommendation-photo,
    .sofa-collection-card .sofa-collection-photo,
    .catalog-hub-card--hero .catalog-hub-photo,
    .catalog-hub-card--product-tile .catalog-hub-photo
  )::before,
  .catalog-hub-card--hero .catalog-hub-photo::before {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  :is(
    .product-card .product-media img,
    .product-card .product-placeholder img,
    .cart-recommendation-card .cart-recommendation-photo img,
    .sofa-collection-card .sofa-collection-photo img,
    .catalog-hub-card--hero .catalog-hub-photo img,
    .catalog-hub-card--product-tile .catalog-hub-photo img
  ) {
    background: #fff !important;
    filter: none !important;
  }

  .catalog-sale-banner::before,
  .catalog-sale-banner:hover::before,
  .catalog-sale-banner:focus-visible::before {
    inset: 0 !important;
    z-index: 1 !important;
    opacity: 1 !important;
    transform: none !important;
    background: linear-gradient(90deg, rgba(6, 18, 34, .96) 0%, rgba(6, 18, 34, .82) 36%, rgba(6, 18, 34, .28) 70%, rgba(6, 18, 34, .1) 100%) !important;
    transition: background 320ms ease, opacity 320ms ease !important;
  }

  .catalog-sale-banner:hover::before,
  .catalog-sale-banner:focus-visible::before {
    background: linear-gradient(90deg, rgba(6, 18, 34, .98) 0%, rgba(6, 18, 34, .88) 40%, rgba(6, 18, 34, .36) 74%, rgba(6, 18, 34, .16) 100%) !important;
  }

  .catalog-hub-card--service {
    margin-top: 10px !important;
  }
}

@keyframes desktopCartItemRemoveSmooth {
  0% {
    height: var(--cart-item-height, 196px);
    max-height: var(--cart-item-height, 196px);
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  48% {
    height: var(--cart-item-height, 196px);
    max-height: var(--cart-item-height, 196px);
    opacity: .56;
    transform: translate3d(28px, 0, 0) scale(.975);
  }
  100% {
    height: 0;
    min-height: 0;
    max-height: 0;
    margin-block: 0;
    padding-block: 0;
    border-width: 0;
    opacity: 0;
    transform: translate3d(54px, -6px, 0) scale(.95);
  }
}

/* Category catalog: the header rail is removed here and replaced by an inline animated filter. */
@media (min-width: 761px) {
  body.category-view .site-header .quick-nav {
    display: none !important;
  }

  body.category-view .category-page {
    padding-top: 20px !important;
  }

  .category-filter-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(198, 218, 236, .9);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 46px rgba(16, 40, 68, .08);
  }

  .category-filter-toolbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
  }

  .category-filter-toggle {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 17px;
    border: 1px solid rgba(165, 194, 220, .72);
    border-radius: 15px;
    background: #fff;
    color: #102844;
    font-size: .98rem;
    font-weight: 950;
    box-shadow: 0 9px 22px rgba(16, 40, 68, .08);
    transition: color 260ms ease, background 260ms ease, border-color 260ms ease, box-shadow 260ms ease, transform 260ms cubic-bezier(.22, 1, .36, 1);
  }

  .category-filter-toggle:hover,
  .category-filter-toggle.is-active {
    border-color: #15598f;
    background: #12345b;
    color: #fff;
    box-shadow: 0 14px 30px rgba(18, 52, 91, .22);
    transform: translateY(-1px);
  }

  .category-filter-toggle:active {
    transform: translateY(0) scale(.96);
  }

  .category-filter-icon {
    width: 21px;
    height: 21px;
    transition: transform 420ms cubic-bezier(.22, 1.45, .36, 1);
  }

  .category-filter-toggle.is-active .category-filter-icon {
    transform: rotate(180deg) scale(1.08);
  }

  .category-filter-count {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #dff3ff;
    color: #0e4c7c;
    font-size: .75rem;
    box-shadow: inset 0 0 0 1px rgba(67, 137, 188, .18);
    animation: categoryFilterCountIn 360ms cubic-bezier(.22, 1.5, .36, 1) both;
  }

  .category-filter-result {
    color: #667995;
    font-size: .9rem;
    font-weight: 850;
  }

  .category-filter-reset {
    min-height: 40px;
    margin-left: auto;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: #eef5fb;
    color: #3e5874;
    font-size: .86rem;
    font-weight: 900;
    transition: background 200ms ease, color 200ms ease, transform 200ms ease;
  }

  .category-filter-reset:hover {
    background: #dfeefa;
    color: #12345b;
    transform: translateY(-1px);
  }

  .category-filter-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    border-top: 1px solid transparent;
    transition: grid-template-rows 430ms cubic-bezier(.22, 1, .36, 1), opacity 260ms ease, border-color 300ms ease;
  }

  .category-filter-panel.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    border-top-color: rgba(205, 222, 238, .84);
  }

  .category-filter-panel-inner {
    min-height: 0;
    overflow: hidden;
  }

  .category-filter-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    transform: translateY(-12px);
    transition: transform 430ms cubic-bezier(.22, 1, .36, 1);
  }

  .category-filter-panel.is-open .category-filter-controls {
    transform: translateY(0);
  }

  .category-filter-field {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: #546a84;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .01em;
  }

  .category-filter-field select,
  .category-filter-field input[type="number"] {
    width: 100%;
    min-height: 45px;
    box-sizing: border-box;
    padding: 0 13px;
    border: 1px solid rgba(190, 213, 233, .92);
    border-radius: 13px;
    outline: 0;
    background: #f9fcff;
    color: #102844;
    font: inherit;
    font-size: .9rem;
    font-weight: 850;
    transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }

  .category-filter-field select:hover,
  .category-filter-field input[type="number"]:hover {
    border-color: rgba(88, 151, 202, .78);
    background: #fff;
  }

  .category-filter-field select:focus,
  .category-filter-field input[type="number"]:focus {
    border-color: #287bb8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(40, 123, 184, .12);
    transform: translateY(-1px);
  }

  .category-filter-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .category-filter-check {
    min-height: 45px;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid rgba(190, 213, 233, .92);
    border-radius: 13px;
    background: #f9fcff;
    color: #102844;
    font-size: .86rem;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
  }

  .category-filter-check:hover {
    border-color: rgba(88, 151, 202, .78);
    background: #fff;
    transform: translateY(-1px);
  }

  .category-filter-check input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #15598f;
  }

  .category-product-grid {
    transition: opacity 150ms ease, transform 260ms cubic-bezier(.22, 1, .36, 1), filter 150ms ease;
  }

  .category-product-grid.is-filter-leaving {
    opacity: .18;
    filter: blur(2px);
    transform: translateY(7px) scale(.995);
  }

  .category-product-grid.is-filter-entering > * {
    animation: categoryFilterCardIn 430ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .category-product-grid.is-filter-entering > :nth-child(2) { animation-delay: 35ms; }
  .category-product-grid.is-filter-entering > :nth-child(3) { animation-delay: 70ms; }
  .category-product-grid.is-filter-entering > :nth-child(4) { animation-delay: 105ms; }
  .category-product-grid.is-filter-entering > :nth-child(n + 5) { animation-delay: 125ms; }
}

@keyframes categoryFilterCardIn {
  0% { opacity: 0; transform: translate3d(0, 18px, 0) scale(.975); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes categoryFilterCountIn {
  0% { opacity: 0; transform: scale(.55); }
  100% { opacity: 1; transform: scale(1); }
}
