/* =====================================================================
   AMA Shop custom Divi modules
   ---------------------------------------------------------------------
   Layout/structure that the modules' PHP render() emits. Colours and
   type come from the --ama-* design tokens defined by the Divi child
   theme (assets/css/custom.css), which mirror design/index.html.
   ===================================================================== */

/* =====================================================================
   HERO VISUAL  (ama_shop_hero_visual)
   Overlapping photo collage + floating trust pill.
   ===================================================================== */
.ama_shop_hero_visual .ama-hv-stage {
  position: relative;
  height: 520px;
}

.ama_shop_hero_visual .ama-hv-blob {
  position: absolute;
  inset: 0;
  top: 6%;
  margin: auto;
  width: 88%;
  height: 88%;
  background: radial-gradient(circle at 50% 40%, #efe7d8, #e3d8c4);
  border-radius: var(--ama-radius);
}

.ama_shop_hero_visual .ama-hv-card {
  position: absolute;
  background: #fff;
  border-radius: var(--ama-radius);
  box-shadow: var(--ama-shadow);
  overflow: hidden;
  border: 1px solid var(--ama-line);
}

.ama_shop_hero_visual .ama-hv-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ama_shop_hero_visual .ama-hv-card-1 {
  width: 52%;
  height: 64%;
  left: 6%;
  top: 8%;
  z-index: 2;
}

.ama_shop_hero_visual .ama-hv-card-2 {
  width: 44%;
  height: 54%;
  right: 4%;
  top: 2%;
  z-index: 3;
}

.ama_shop_hero_visual .ama-hv-card-3 {
  width: 40%;
  height: 44%;
  right: 10%;
  bottom: 2%;
  z-index: 4;
}

.ama_shop_hero_visual .ama-hv-pill {
  position: absolute;
  left: 2%;
  bottom: 10%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--ama-line);
  border-radius: var(--ama-pill);
  box-shadow: var(--ama-shadow);
}

.ama_shop_hero_visual .ama-hv-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ama-sand);
  color: var(--ama-gold-d);
}

.ama_shop_hero_visual .ama-hv-pill b {
  display: block;
  font-family: var(--ama-serif);
  color: var(--ama-heading);
  font-size: 17px;
  line-height: 1.3;
}

.ama_shop_hero_visual .ama-hv-pill small {
  color: var(--ama-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* =====================================================================
   PRODUCT BOX  (ama_shop_product_box)
   One WooCommerce product as the design's treatment card. Scoped to `.ama-pb`
   rather than the module slug because the single product page's Related
   Treatments grid renders the same card outside any Divi module.
   ===================================================================== */
.ama-pb {
  height: 100%;
}

.ama-pb .ama-pb-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--ama-line);
  border-radius: var(--ama-radius);
  overflow: hidden;
  transition: .28s;
}

.ama-pb .ama-pb-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ama-shadow);
  border-color: var(--ama-sand-2);
}

.ama-pb .ama-pb-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #f6f1e8, #ece3d5);
  overflow: hidden;
}

.ama-pb .ama-pb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s;
}

.ama-pb .ama-pb-card:hover .ama-pb-thumb img {
  transform: scale(1.05);
}

.ama-pb .ama-pb-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .92);
  color: var(--ama-gold-d);
  font-family: var(--ama-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--ama-pill);
}

.ama-pb .ama-pb-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.ama-pb .ama-pb-kicker {
  margin-bottom: 8px;
  font-family: var(--ama-sans);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ama-muted);
}

.ama-pb .ama-pb-title {
  margin: 0 0 6px;
  padding: 0;
  font-size: 1.28rem;
  line-height: 1.25;
}

.ama-pb .ama-pb-title a {
  color: var(--ama-heading);
}

.ama-pb .ama-pb-stars {
  margin-bottom: 14px;
  color: var(--ama-gold);
  font-size: 13px;
  letter-spacing: 1px;
}

.ama-pb .ama-pb-stars small {
  margin-left: 6px;
  color: var(--ama-muted);
  letter-spacing: 0;
}

.ama-pb .ama-pb-desc {
  flex: 1;
  margin-bottom: 16px;
  color: var(--ama-body);
  font-size: 14px;
}

.ama-pb .ama-pb-desc p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.ama-pb .ama-pb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.ama-pb .ama-pb-price {
  color: var(--ama-heading);
  font-family: var(--ama-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.ama-pb .ama-pb-price .woocommerce-Price-amount,
.ama-pb .ama-pb-price bdi {
  font-family: var(--ama-serif);
  font-weight: 600;
}

.ama-pb .ama-pb-price small {
  color: var(--ama-muted);
  font-family: var(--ama-sans);
  font-size: 12px;
  font-weight: 400;
}

/* Beats Divi's and WooCommerce's own `a.button` rules, which otherwise
   override colour, radius and padding here. */
.ama-pb .ama-pb-row .ama-pb-btn,
.woocommerce .ama-pb .ama-pb-row .ama-pb-btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 11px 22px !important;
  background: var(--ama-gold) !important;
  color: #2b2415 !important;
  border: 1.5px solid transparent !important;
  border-radius: var(--ama-pill) !important;
  font-family: var(--ama-sans);
  font-weight: 600;
  font-size: 14px;
  /* Divi's own `.woocommerce a.button` sets this to 1.7em with !important
     (its global button line-height), which otherwise wins over an
     unmarked declaration here despite this selector's higher specificity -
     !important only loses to !important. Left un-important, the button
     rendered ~48px tall instead of the design's ~36px. */
  line-height: 1 !important;
  white-space: nowrap;
  transition: .25s;
}

/* Divi also ships a `.woocommerce a.button:hover` rule with the same
   specificity as this one once :hover is counted in, tied by class count and
   won on an extra `a` type selector - notably
   `.et_button_no_icon.woocommerce a.button:hover { padding: .3em 1em
   !important; }` (this site runs Divi's "no icon" button style). Without its
   own !important padding/line-height, the button visibly shrank on hover,
   which could shift it out from under the pointer and make Add to Cart feel
   unresponsive. Repeating every dimension-affecting property here, all
   !important, is what keeps hover pixel-identical in size to rest. */
.ama-pb .ama-pb-row .ama-pb-btn:hover,
.woocommerce .ama-pb .ama-pb-row .ama-pb-btn:hover {
  padding: 11px 22px !important;
  background: var(--ama-gold-d) !important;
  color: #fff !important;
  border: 1.5px solid transparent !important;
  line-height: 1 !important;
  transform: translateY(-2px);
}

/* Divi's button styling injects a pseudo-element arrow on hover. */
.ama-pb .ama-pb-row .ama-pb-btn::after,
.ama-pb .ama-pb-row .ama-pb-btn::before {
  display: none !important;
}

.ama-pb .ama-pb-row .added_to_cart {
  display: none;
}

/* =====================================================================
   TESTIMONIAL BOX  (ama_shop_testimonial_box)
   ===================================================================== */
.ama_shop_testimonial_box {
  height: 100%;
}

/* Divi styles bare <blockquote> with a heavy left border and italics. */
.ama_shop_testimonial_box .ama-tb-card {
  height: 100%;
  margin: 0;
  padding: 30px;
  background: var(--ama-cream);
  border: 1px solid var(--ama-line);
  border-left: 1px solid var(--ama-line);
  border-radius: var(--ama-radius);
}

.ama_shop_testimonial_box .ama-tb-stars {
  margin-bottom: 14px;
  color: var(--ama-gold);
  letter-spacing: 2px;
}

.ama_shop_testimonial_box .ama-tb-quote {
  margin-bottom: 18px;
  color: var(--ama-heading);
  font-size: 15px;
  font-style: italic;
}

.ama_shop_testimonial_box .ama-tb-quote p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.ama_shop_testimonial_box .ama-tb-who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ama_shop_testimonial_box .ama-tb-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ama-sand-2);
  color: var(--ama-ink);
  font-family: var(--ama-serif);
  font-style: normal;
  font-weight: 600;
}

.ama_shop_testimonial_box .ama-tb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ama_shop_testimonial_box .ama-tb-name {
  display: block;
  color: var(--ama-heading);
  font-family: var(--ama-sans);
  font-size: 14.5px;
  font-weight: 700;
}

.ama_shop_testimonial_box .ama-tb-location {
  color: var(--ama-muted);
  font-size: 12.5px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .ama_shop_hero_visual .ama-hv-stage {
    height: 400px;
    margin-top: 20px;
  }
}

@media (max-width: 620px) {
  .ama_shop_hero_visual .ama-hv-stage {
    height: 330px;
  }

  .ama_shop_hero_visual .ama-hv-pill {
    left: 0;
    bottom: 0;
    padding: 9px 14px;
  }

  .ama_shop_hero_visual .ama-hv-pill b {
    font-size: 15px;
  }
}
