/* ==========================================================================
   PDP Hero — Product Detail Page hero card
   Tokens: css/tokens.css
   ========================================================================== */

body,
html {
  scroll-behavior: smooth;
}

/* ---------- Container ---------- */
.pdp-hero {
  display: flex;
  gap: var(--gap-md);
  align-items: flex-start;
  padding: var(--gap-md);
  border-radius: var(--radius-xl);
  background: var(--color-bg-secondary);
  font-family: 'Montserrat', sans-serif;
  margin-bottom: var(--gap-xl);

  @media screen and (max-width: 991px) {
    flex-direction: column;
    padding: var(--space-md);
  }

  @media screen and (max-width: 768px) {
    gap: var(--space-md);
    padding: var(--gap-sm);
    border-radius: var(--radius-lg);
  }
}

.pdp-hero #wc-stripe-express-checkout-element {
  display: none !important;
}

.pdp-hero--single {
  border-radius: var(--radius-xl);
}

/* ---------- Media (left column) ---------- */
.pdp-hero__media {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex-shrink: 0;
  width: 396px;

  @media screen and (max-width: 991px) {
    width: 100%;
  }
}

.pdp-hero__main-image {
  width: 396px;
  height: 396px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  background-image: url(https://myserviceanimal.org/wp-content/themes/USAPet/img/flag-bg.svg);
  background-size: contain;
  background-position: bottom;
  background-repeat: no-repeat;

  @media screen and (max-width: 991px) {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  @media screen and (max-width: 768px) {
    border-radius: var(--radius-md);
  }
}

.pdp-hero--single .pdp-hero__main-image {
  border: 1px solid var(--color-border);
}

.pdp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Thumbnails row */
.pdp-hero__thumbs {
  display: flex;
  gap: var(--gap-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  cursor: grab;

  @media screen and (max-width: 991px) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    padding-left: var(--gap-sm);
    padding-right: var(--gap-sm);
    margin: 0 calc(-1 * var(--gap-sm));
  }
}

.pdp-hero__thumbs.active {
  cursor: grabbing;
}

.pdp-hero__thumbs::-webkit-scrollbar {
  display: none;
}

.pdp-hero__thumb {
  width: 90px;
  height: 90px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-white);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s;
  user-select: none;

  @media screen and (max-width: 991px) {
    width: 72px;
    height: 72px;
  }

  @media screen and (max-width: 768px) {
    width: 60px;
    height: 60px;
  }
}

.pdp-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.pdp-hero__thumb--active,
.pdp-hero__thumb:hover {
  border-color: var(--color-border);
}

/* ---------- Body (right column) ---------- */
.pdp-hero__body {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.pdp-hero__top {
  display: flex;
  gap: var(--gap-sm);
  align-items: flex-start;

  @media screen and (max-width: 991px) {
    flex-direction: column;
  }
}

.pdp-hero__info {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ---------- Highlight ---------- */
.pdp-hero__highlight {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
}

.pdp-hero__highlight img,
.pdp-hero__highlight svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.pdp-hero__highlight span {
  font-size: var(--text-caption);
  font-weight: 500;
  line-height: var(--text-caption-lh);
  color: var(--color-error);
}

/* ---------- Title ---------- */
.pdp-hero__title {
  font-size: var(--text-title);
  font-weight: 600;
  line-height: var(--text-title-lh);
  color: var(--color-text);
  margin: 0;
  text-align: left;

  @media screen and (max-width: 768px) {
    font-size: 20px;
    line-height: 26px;
  }
}

/* ---------- Rating ---------- */
.pdp-hero__rating {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.pdp-hero__stars {
  display: flex;
  gap: 2px;
}

.pdp-hero__stars svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pdp-hero__reviews-link {
  font-size: var(--text-body-sm);
  font-weight: 500;
  line-height: var(--text-body-sm-lh);
  color: var(--color-accent);
  text-decoration: none;
}

.pdp-hero__reviews-link:hover {
  text-decoration: underline;
}

/* ---------- Bullets ---------- */
.pdp-hero__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.pdp-hero__bullet {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-xs);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--text-body-lh);
  color: var(--color-text);
}

.pdp-hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 5px;
  background: var(--color-error);
  flex-shrink: 0;
  margin-top: 9px;
}

/* ---------- Price ---------- */
.pdp-hero__price {
  display: flex;
  align-items: baseline;
  gap: var(--gap-sm);
  text-align: center;
}

.pdp-hero__price .screen-reader-text {
  display: none;
}

.pdp-hero__price del,
.pdp-hero__price del .woocommerce-Price-amount {
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--text-h2-lh);
  color: var(--color-text-tertiary);
}

.pdp-hero__price ins,
.pdp-hero__price .woocommerce-Price-amount {
  text-decoration: none;
}

.pdp-hero__price .woocommerce-Price-amount,
.pdp-hero__price ins .woocommerce-Price-amount {
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: var(--text-h1-lh);
  color: var(--color-text);
}

/* ---------- Dropdown / Variations ---------- */
.pdp-hero__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
}

.pdp-hero__dropdown {
  position: relative;
  width: 220px;

  @media screen and (max-width: 991px) {
    width: 100%;
  }
}

.pdp-hero__select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-white) !important;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 8px;
  padding-right: 36px;
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--text-body-sm-lh);
  color: var(--color-text);
  cursor: pointer;
}

.pdp-hero__dropdown-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 24px;
  height: 24px;
}

/* ---------- Quantity ---------- */
.wp_quantity_input_wrap {
  display: none !important;
}

.pdp-hero__quantity {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  width: 220px;

  @media screen and (max-width: 991px) {
    width: fit-content;
  }
}

.pdp-hero__qty-label {
  flex: 1;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--text-body-lh);
  color: var(--color-text);
}

.pdp-hero__qty-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pdp-hero__qty-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.pdp-hero__qty-btn:hover {
  background: var(--color-bg-secondary);
}

.pdp-hero__qty-btn svg {
  width: 24px;
  height: 24px;
}

.pdp-hero__qty-value {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: var(--text-body-lh);
  color: var(--color-text);
}

/* ---------- CTA Button ---------- */
.single_variation_wrap,
.single_add-to-cart_wrap {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.single_variation_wrap:has(.pdp-hero__cta[disabled])
  .wcpay-express-checkout-wrapper,
.single_add-to-cart_wrap:has(.pdp-hero__cta[disabled])
  .wcpay-express-checkout-wrapper {
  opacity: 0.5;
  pointer-events: none;
}

.wcpay-express-checkout-wrapper .blockUI.blockOverlay {
  display: none !important;
}

.wcpay-express-checkout-wrapper {
  display: none !important;
  margin: 0 !important;
  width: 220px !important;

  @media screen and (max-width: 991px) {
    width: 100% !important;
  }
}

[data-product-type='accessory'] .wcpay-express-checkout-wrapper {
  display: block !important;
}

.pdp-hero__cta-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);

  @media screen and (max-width: 768px) {
    flex-direction: row;
    align-items: center;
    gap: var(--gap-sm);
  }
}

.pdp-hero__cta-wrap .pdp-hero__qty-label {
  @media screen and (max-width: 768px) {
    display: none;
  }
}

.pdp-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-xs);
  width: 220px;
  height: 48px;
  padding: 0 8px 0 16px;
  background-color: var(--color-error);
  border: 1px solid var(--color-error);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: var(--text-btn-lh);
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s ease-in-out;

  @media screen and (max-width: 991px) {
    width: 100%;
  }
}

.product form.cart .pdp-hero__body .pdp-hero__cta {
  padding: 0 8px 0 16px !important;
  padding-right: 16px !important;
}

.pdp-hero__cta:hover,
.pdp-hero__cta:focus {
  background: var(--color-white);
  color: var(--color-error);
  font-weight: 700;
}

.pdp-hero__cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pdp-hero__cta svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.pdp-hero__cta svg path {
  transition: 0.3s ease-in-out;
}

.pdp-hero__cta:hover path,
.pdp-hero__cta:focus path {
  stroke: var(--color-error);
}

.pdp-hero__cta-wrap .added_to_cart {
  display: none !important;
}

/* ---------- Badges (right side) ---------- */
.pdp-hero__badges {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  align-items: flex-end;
  flex-shrink: 0;

  @media screen and (max-width: 991px) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

.pdp-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 10px;
  font-weight: 500;
  line-height: 12px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

.pdp-hero__badge img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
