/* Tour list cards (OVA BRW search results on the tour-list page).
 *
 * Grid view  : .ovabrw-products-result-grid  > .ova-product
 *              (child template woocommerce/rental/content-item-product.php)
 * List view  : .ovabrw-products-result-list  > .ovabrw-single-product
 *              (child template woocommerce/rental/content-item-product-list.php)
 *
 * Every rule is scoped to those wrappers so no unrelated theme buttons or
 * cards are affected. Logical properties keep RTL (Arabic) correct.
 */

/* =========================================================================
   GRID VIEW — equal-height cards, actions pinned to the same bottom line
   ========================================================================= */

.ovabrw-products-result-grid .ova-product {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ovabrw-products-result-grid .ova-product:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.ovabrw-products-result-grid .ova-product .ova_head_product {
  position: relative;
  flex: 0 0 auto;
}

/* Content area grows; the review/price/action block is pushed to the bottom
   so buttons align across cards even when titles wrap to different lengths */
.ovabrw-products-result-grid .ova-product .ova_foot_product {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 18px 18px;
}

.ovabrw-products-result-grid .ova-product .ova-product-day-title-location {
  flex: 1 1 auto;
}

/* Keep long titles tidy: max 2 lines, no fixed heights */
.ovabrw-products-result-grid .ova-product .ova-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ovabrw-products-result-grid .ova-product .ova-product-review-and-price {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eef0f2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Short description: muted, clamped to 2 lines */
.ovabrw-products-result-grid .ova-product .ova-product-short-desc {
  color: #777e90;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price + main action always on ONE row (discounted or regular price):
   the price stacks vertically (sale price on top, old crossed-out price
   under it) so it never pushes the button to a second line */
.ovabrw-products-result-grid .ova-product .ova-product-wrapper-price {
  display: flex;
  align-items: flex-end; /* button bottoms align across cards whether or not an old price adds a second line */
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.ovabrw-products-result-grid .ova-product .ova-product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.ovabrw-products-result-grid .ova-product .ova-product-price .old-product-price {
  font-size: 13px;
  opacity: 0.65;
  text-decoration: line-through;
}

/* Featured badge: keep above image, never under the wishlist button */
.ovabrw-products-result-grid .ova-product .ova-is-featured {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
}

/* =========================================================================
   MAIN ACTION BUTTON (grid + list) — consistent size, centered content,
   full state set. Scoped to the two result wrappers only.
   ========================================================================= */

.ovabrw-products-result-grid .ova-product .product-btn-book-now,
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--color-primary, #c94a30);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  /* long translated labels wrap instead of overflowing, but never mid-word */
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.ovabrw-products-result-grid .ova-product .product-btn-book-now:hover,
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now:hover {
  background: var(--color-primary-hover, #b84329);
  color: #fff;
  box-shadow: 0 6px 14px rgba(201, 74, 48, 0.3);
}

.ovabrw-products-result-grid .ova-product .product-btn-book-now:focus-visible,
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now:focus-visible {
  outline: 2px solid var(--color-secondary, #007fad);
  outline-offset: 2px;
}

.ovabrw-products-result-grid .ova-product .product-btn-book-now:active,
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now:active {
  transform: scale(0.97);
  box-shadow: none;
}

.ovabrw-products-result-grid .ova-product .product-btn-book-now:disabled,
.ovabrw-products-result-grid .ova-product .product-btn-book-now[aria-disabled="true"],
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now:disabled,
.ovabrw-products-result-list .ovabrw-single-product .product-btn-book-now[aria-disabled="true"] {
  background: #c8cdd3;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================================================
   SECONDARY ACTION — wishlist heart over the image (less prominent circle)
   ========================================================================= */

.ovabrw-products-result-grid .ova-product .ova-product-wishlist,
.ovabrw-products-result-list .ovabrw-single-product .ova-product-wishlist {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 3;
}

.ovabrw-products-result-grid .ova-product .ova-product-wishlist .tinvwl_add_to_wishlist_button,
.ovabrw-products-result-list .ovabrw-single-product .ova-product-wishlist .tinvwl_add_to_wishlist_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.ovabrw-products-result-grid .ova-product .ova-product-wishlist .tinvwl_add_to_wishlist_button:hover,
.ovabrw-products-result-list .ovabrw-single-product .ova-product-wishlist .tinvwl_add_to_wishlist_button:hover {
  transform: scale(1.08);
  background: #fff;
}

.ovabrw-products-result-grid .ova-product .ova-product-wishlist .tinvwl_add_to_wishlist_button:focus-visible,
.ovabrw-products-result-list .ovabrw-single-product .ova-product-wishlist .tinvwl_add_to_wishlist_button:focus-visible {
  outline: 2px solid var(--color-secondary, #007fad);
  outline-offset: 2px;
}

/* =========================================================================
   LIST VIEW — pin the price/action block to the bottom of the right column
   ========================================================================= */

.ovabrw-products-result-list .ovabrw-single-product .product-container-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.ovabrw-products-result-list .ovabrw-single-product .product-container-right .ova-product-wrapper-price {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ovabrw-products-result-list .ovabrw-single-product .product-img {
  position: relative;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 576px) {
  /* Full-width action button on phones for an easy touch target */
  .ovabrw-products-result-grid .ova-product .product-btn-book-now {
    flex: 1 1 100%;
  }

  .ovabrw-products-result-list .ovabrw-single-product .product-container-right {
    align-items: stretch;
  }

  .ovabrw-products-result-list .ovabrw-single-product .product-container-right .ova-product-wrapper-price {
    justify-content: space-between;
  }
}
