/**
 * Anantaya Luxe — WooCommerce layout styles.
 *
 * Enqueued conditionally (shop/product/cart/checkout/account only, see
 * inc/enqueue.php). Covers the shop grid, product card hover actions,
 * quick-view modal, and sticky add-to-cart bar rendered by
 * inc/woocommerce.php. Shop archive grid columns and single-product
 * gallery layout land alongside woocommerce/archive-product.php and
 * woocommerce/single-product.php.
 *
 * @package Anantaya_Luxe
 */

/* -----------------------------------------------------------------------
   PRODUCT CARD
----------------------------------------------------------------------- */
.anantaya-product-card {
  position: relative;
}

.anantaya-product-actions {
  /* Base positioning/hover-reveal already defined in style.css; this
     file only adds the two icon buttons' own appearance. */
}
.anantaya-quick-view-btn,
.anantaya-wishlist-btn {
  box-shadow: 0 1px 4px rgba(33, 29, 29, 0.15);
}
.anantaya-wishlist-btn[aria-pressed="true"] .anantaya-icon--heart {
  background-color: var(--anantaya-color-maroon);
}

/* -----------------------------------------------------------------------
   QUICK VIEW MODAL
----------------------------------------------------------------------- */
.anantaya-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--anantaya-space-md);
}

.anantaya-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 38, 69, 0.55);
  opacity: 0;
  transition: opacity var(--anantaya-speed) var(--anantaya-ease);
}

.anantaya-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--anantaya-color-ivory);
  border-radius: var(--anantaya-radius);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity var(--anantaya-speed) var(--anantaya-ease),
              transform var(--anantaya-speed) var(--anantaya-ease);
}

.anantaya-modal.is-open .anantaya-modal__backdrop {
  opacity: 1;
}
.anantaya-modal.is-open .anantaya-modal__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.anantaya-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--anantaya-color-ivory);
  box-shadow: 0 1px 4px rgba(33, 29, 29, 0.2);
  cursor: pointer;
}

.anantaya-modal__loading,
.anantaya-modal__error {
  padding: var(--anantaya-space-xl);
  text-align: center;
  color: var(--anantaya-color-muted);
}

.anantaya-quick-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.anantaya-quick-view__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.anantaya-quick-view__summary {
  padding: var(--anantaya-space-lg);
}
.anantaya-quick-view__title {
  font-size: 26px;
  margin-bottom: 8px;
}
.anantaya-quick-view__price {
  font-size: 18px;
  color: var(--anantaya-color-maroon);
  margin-bottom: var(--anantaya-space-sm);
}
.anantaya-quick-view__excerpt {
  font-size: 14px;
  color: var(--anantaya-color-charcoal);
  line-height: 1.7;
  margin-bottom: var(--anantaya-space-sm);
}
.anantaya-quick-view__form .quantity {
  margin-right: 10px;
}
.anantaya-quick-view__full-link {
  display: inline-block;
  margin-top: var(--anantaya-space-sm);
  font-size: 13px;
  text-decoration: underline;
  color: var(--anantaya-color-ink);
}

@media (max-width: 700px) {
  .anantaya-quick-view {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------------------
   STICKY ADD-TO-CART BAR
   (positioning + show/hide already defined in style.css — this covers
   the internal layout: thumbnail, title/price, CTA)
----------------------------------------------------------------------- */
.anantaya-sticky-atc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--anantaya-space-sm);
}
.anantaya-sticky-atc__product {
  display: flex;
  align-items: center;
  gap: var(--anantaya-space-sm);
}
.anantaya-sticky-atc__product img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--anantaya-radius);
}
.anantaya-sticky-atc__title {
  font-family: var(--anantaya-font-display);
  font-size: 15px;
  margin: 0;
}
.anantaya-sticky-atc__price {
  font-size: 13px;
  color: var(--anantaya-color-maroon);
  margin: 0;
}
.anantaya-sticky-atc__cta {
  flex-shrink: 0;
  background: var(--anantaya-color-maroon);
  color: var(--anantaya-color-ivory);
  border: none;
  padding: 12px 24px;
  border-radius: var(--anantaya-radius);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .anantaya-sticky-atc__product img {
    display: none;
  }
}

/* -----------------------------------------------------------------------
   MISC
----------------------------------------------------------------------- */
body.anantaya-no-scroll {
  overflow: hidden;
}
