/*
 * Makerique Boutique theme for OpenCart 4
 * Copyright (c) 2026 Heliopsy. All Rights Reserved.
 * https://makerique.com
 * SPDX-License-Identifier: LicenseRef-Proprietary
 * Proprietary and confidential. Unauthorized copying, distribution, or
 * modification of this file, by any means, is strictly prohibited.
 */

/* =========================================================================
   Makerique Boutique — Product Page extras (Journal-style)
   Auto-globbed component. Styles the admin-managed extra tabs, the optional
   extra button and the mobile sticky add-to-cart bar. All colours/tokens off
   the --mr-* system; motion respects prefers-reduced-motion.
   ========================================================================= */

/* --- Extra product tabs -------------------------------------------------- */
/* The extra nav-items / panes live inside the existing .mr-product-tabs, so
   they already inherit the base tab styling. Only small extras here. */
.mr-product-tabs .mr-pp-tab .nav-link { font-weight: 600; }

.mr-product-tabs .mr-pp-pane { line-height: var(--mr-lh-base); }

.mr-product-tabs .mr-pp-pane img {
  max-width: 100%;
  height: auto;
  border-radius: var(--mr-radius);
}

.mr-product-tabs .mr-pp-pane table {
  width: 100%;
  color: var(--mr-text);
  border-collapse: collapse;
}

.mr-product-tabs .mr-pp-pane table td,
.mr-product-tabs .mr-pp-pane table th {
  border: 1px solid var(--mr-border);
  padding: .5rem .75rem;
}

/* --- Extra button -------------------------------------------------------- */
.mr-pp-extra-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.mr-pp-extra-btn i { font-size: .95em; }

/* --- Sticky add-to-cart bar (mobile) ------------------------------------- */
.mr-sticky-atc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: none;
  align-items: center;
  gap: .75rem;
  padding: .6rem clamp(.75rem, 4vw, 1.25rem);
  background: var(--mr-surface);
  border-top: 1px solid var(--mr-border);
  box-shadow: var(--mr-shadow);
  transform: translateY(100%);
  transition: transform var(--mr-transition, .25s ease);
  padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
}

/* Shown only on mobile, and only once the real button scrolls out of view. */
@media (max-width: 767.98px) {
  .mr-sticky-atc.is-active { display: flex; }

  .mr-sticky-atc.is-active.is-visible { transform: translateY(0); }
}

.mr-sticky-atc__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.mr-sticky-atc__title {
  font-weight: 600;
  color: var(--mr-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mr-sticky-atc__price {
  font-family: var(--mr-font-price, inherit);
  color: var(--mr-text);
  font-size: .95em;
}

.mr-sticky-atc__price .price-old {
  color: var(--mr-muted);
  text-decoration: line-through;
  margin-left: .4rem;
  font-size: .85em;
}

.mr-sticky-atc__btn {
  flex: 0 0 auto;
  font-weight: 600;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  max-width: 55%;
}

@media (prefers-reduced-motion: reduce) {
  .mr-sticky-atc { transition: none; }
}

/* Coming soon (per-product): replaces Add to Cart, see event/comingsoon.php */
.mr-soon {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1rem;
  border: 1px solid var(--mr-border, currentColor);
  border-radius: var(--mr-radius, 8px);
  background: var(--mr-surface-2, transparent);
  font-weight: 600;
}
.mr-soon-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .7rem;
  border: 1px solid var(--mr-border, currentColor);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}

/* Phones: wishlist and compare share one 40px row with centred one-line labels
   (they wrap, never clip, on very narrow screens); the quantity row and the cart
   row keep an 8px gap. */
@media (max-width: 767.98px) {
  .mr-actions { gap: 8px; margin-top: .8rem; }
  .mr-actions:not(.mr-actions--extra) .btn {
    flex: 1 1 0; min-width: 0; min-height: 40px; padding: .3rem .4rem;
    justify-content: center; gap: .35rem; text-align: center; font-size: .8rem; line-height: 1.2;
  }
  .mr-cart-row .input-group { row-gap: 8px; }
  .mr-cart-row .input-group > .input-group-text,
  .mr-cart-row .input-group > #input-quantity { min-height: 44px; }
  .mr-cart-row #button-cart { min-height: 48px; }
}
