/* ==========================================================================
   ZHR Product UI  v1.1.0
   Single product option layout + "Your Selection" summary card.

   Design intent: refined depth, not skeuomorphism. Elevation comes from
   layered shadows, a 1px top light line, and gradients that all run with a
   single light source at the top. Every raised surface uses the same three
   ingredients: an inset highlight, a body gradient, and an ambient shadow
   tinted with the brand blue rather than pure black.

   All colours are var(--zhr-*), injected from the settings screen.
   The CTA carries a repeated class (.zhr-cta.zhr-cta.zhr-cta) so it beats
   themes that style .single_add_to_cart_button with their own !important.
   ========================================================================== */

:root {
  --zhr-ink:          #1B4BA5;
  --zhr-ink-soft:     #2C63C4;
  --zhr-gold:         #A36801;
  --zhr-gold-soft:    #FBF2E1;
  --zhr-gold-bright:  #FEB83E;
  --zhr-green:        #09864C;
  --zhr-green-dark:   #076B3D;
  --zhr-muted:        #66768C;

  --zhr-line:         rgba(18, 42, 88, .12);
  --zhr-line-soft:    rgba(18, 42, 88, .07);
  --zhr-surface:      #FFFFFF;
  --zhr-surface-2:    #F7F9FC;

  --zhr-radius:       20px;
  --zhr-radius-md:    14px;
  --zhr-radius-sm:    11px;

  --zhr-lift-1: 0 1px 1px rgba(16, 38, 84, .04), 0 2px 4px rgba(16, 38, 84, .04);
  --zhr-lift-2: 0 1px 1px rgba(16, 38, 84, .05), 0 4px 10px rgba(16, 38, 84, .06),
                0 18px 38px -14px rgba(16, 38, 84, .20);
}

/* ---------- variation table shell -------------------------------------- */

div.product form.cart.variations_form { margin-top: 8px; }

div.product form.cart table.variations,
div.product form.cart table.variations tbody,
div.product form.cart table.variations tr,
div.product form.cart table.variations th,
div.product form.cart table.variations td {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
}

div.product form.cart table.variations { counter-reset: zhr-attr; }

div.product form.cart table.variations tr {
  padding: 17px 0 !important;
  border-bottom: 1px solid var(--zhr-line-soft) !important;
  counter-increment: zhr-attr;
}
div.product form.cart table.variations tr:last-child { border-bottom: 0 !important; }

div.product form.cart table.variations th.label,
div.product form.cart table.variations td.label { margin-bottom: 12px !important; }

div.product form.cart table.variations .label label {
  display: flex !important;
  align-items: baseline;
  gap: 9px;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  color: #14203A !important;
  letter-spacing: -0.011em;
  margin: 0 !important;
  text-transform: none !important;
}

body.zhr-number-attrs div.product form.cart table.variations .label label::before {
  content: counter(zhr-attr);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--zhr-surface-2);
  box-shadow: inset 0 0 0 1px var(--zhr-line), inset 0 1px 0 #fff;
  color: var(--zhr-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(1px);
}

.zhr-current-value {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--zhr-ink);
  text-align: right;
  letter-spacing: -0.005em;
}

/* ---------- option pills ------------------------------------------------ */

div.product form.cart ul.variable-items-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

div.product form.cart ul.variable-items-wrapper li.variable-item {
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: var(--zhr-radius-sm) !important;
}

div.product form.cart ul.variable-items-wrapper li.button-variable-item {
  min-width: auto !important;
  width: auto !important;
  height: auto !important;
}

div.product form.cart ul.variable-items-wrapper li.button-variable-item .variable-item-span {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 47px !important;
  padding: 12px 18px !important;
  border: 0 !important;
  border-radius: var(--zhr-radius-sm) !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FC 100%) !important;
  box-shadow: inset 0 0 0 1px var(--zhr-line), inset 0 1px 0 #fff, var(--zhr-lift-1) !important;
  color: #22304C !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  text-align: center;
  cursor: pointer;
  transition: box-shadow .18s ease, transform .12s ease, background .18s ease, color .18s ease;
}

div.product form.cart ul.variable-items-wrapper li.button-variable-item:hover .variable-item-span {
  background: linear-gradient(180deg, #FFFFFF 0%, #EEF3FC 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(27, 75, 165, .32), inset 0 1px 0 #fff,
              0 3px 8px rgba(16, 38, 84, .10) !important;
  transform: translateY(-1px);
}

div.product form.cart ul.variable-items-wrapper li.variable-item.selected .variable-item-span {
  background: linear-gradient(180deg, var(--zhr-ink-soft) 0%, var(--zhr-ink) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28),
              inset 0 0 0 1px rgba(255, 255, 255, .10),
              0 4px 12px -2px rgba(16, 38, 84, .38) !important;
  color: #fff !important;
  transform: translateY(0);
}

div.product form.cart ul.variable-items-wrapper li.variable-item:active .variable-item-span {
  transform: translateY(1px);
}

div.product form.cart ul.variable-items-wrapper li.variable-item:focus-within .variable-item-span {
  outline: 3px solid rgba(27, 75, 165, .38) !important;
  outline-offset: 2px;
}

div.product form.cart ul.variable-items-wrapper li.variable-item.disabled,
div.product form.cart ul.variable-items-wrapper li.variable-item[disabled] {
  opacity: .35 !important;
  cursor: not-allowed !important;
}

.zhr-bump {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--zhr-gold) !important;
  background: var(--zhr-gold-soft);
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
li.variable-item.selected .zhr-bump,
div.product form.cart li.variable-item.selected .zhr-bump {
  color: var(--zhr-gold-bright) !important;
  background: rgba(255, 255, 255, .13);
}

/* ---------- colour + image swatches ------------------------------------ */

div.product form.cart ul.variable-items-wrapper li.color-variable-item,
div.product form.cart ul.variable-items-wrapper li.image-variable-item {
  width: 56px !important;
  height: 56px !important;
  border-radius: 13px !important;
  overflow: hidden;
  border: 0 !important;
  padding: 3px !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 1px var(--zhr-line), var(--zhr-lift-1) !important;
  transition: box-shadow .18s ease, transform .12s ease;
}
div.product form.cart ul.variable-items-wrapper li.color-variable-item:hover,
div.product form.cart ul.variable-items-wrapper li.image-variable-item:hover {
  transform: translateY(-1px);
}
div.product form.cart ul.variable-items-wrapper li.color-variable-item .variable-item-span,
div.product form.cart ul.variable-items-wrapper li.image-variable-item .variable-item-span {
  border-radius: 9px !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18) !important;
}
div.product form.cart ul.variable-items-wrapper li.color-variable-item.selected,
div.product form.cart ul.variable-items-wrapper li.image-variable-item.selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--zhr-ink),
              0 6px 14px -4px rgba(16, 38, 84, .40) !important;
}

div.product form.cart td.value:has(ul.variable-items-wrapper) > select,
div.product form.cart td.value:has(ul.variable-items-wrapper) > .wvs-selected-label { display: none !important; }

/* ---------- plain select fallback -------------------------------------- */

div.product form.cart table.variations select {
  width: 100% !important;
  min-height: 51px !important;
  padding: 13px 44px 13px 16px !important;
  border: 0 !important;
  border-radius: var(--zhr-radius-sm) !important;
  background-color: #fff !important;
  box-shadow: inset 0 0 0 1px var(--zhr-line), inset 0 1px 0 #fff, var(--zhr-lift-1) !important;
  color: #22304C !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%2322304C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
}
div.product form.cart table.variations select:focus {
  outline: 3px solid rgba(27, 75, 165, .35) !important;
  outline-offset: 1px;
}

div.product form.cart .reset_variations {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--zhr-muted) !important;
  text-decoration: underline !important;
}

div.product .woocommerce-variation-price { display: none !important; }
div.product .woocommerce-variation-availability { margin-bottom: 10px; }

/* ==========================================================================
   Your Selection card
   ========================================================================== */

.zhr-summary {
  position: relative;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--zhr-radius);
  background: linear-gradient(180deg, #FFFFFF 0%, var(--zhr-surface-2) 100%);
  box-shadow: inset 0 0 0 1px var(--zhr-line), inset 0 1px 0 #fff, var(--zhr-lift-2);
  overflow: hidden;
  isolation: isolate;
}

/* cobalt hairline across the very top, the card's signature */
.zhr-summary::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--zhr-ink) 0%, var(--zhr-ink-soft) 45%, var(--zhr-gold) 100%);
  z-index: 2;
}

.zhr-summary__title {
  margin: 0 !important;
  padding: 22px 26px 15px;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #14203A !important;
  letter-spacing: -0.02em;
}

.zhr-summary__rows { padding: 0 26px; }

.zhr-summary__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 10px;
  margin: 0 -10px;
  border-radius: 9px;
  transition: background .18s ease;
}
.zhr-summary__row + .zhr-summary__row { box-shadow: inset 0 1px 0 var(--zhr-line-soft); }
.zhr-summary__row:hover { background: rgba(27, 75, 165, .045); }

.zhr-summary__k {
  color: var(--zhr-muted);
  font-size: 14.5px;
  font-weight: 500;
  flex: 0 0 auto;
}
.zhr-summary__v {
  color: #16233D;
  font-size: 14.5px;
  font-weight: 700;
  text-align: right;
  letter-spacing: -0.006em;
}
.zhr-summary__row--empty .zhr-summary__v { color: #A9B3C4; font-weight: 500; }

.zhr-summary__divider { display: none; }

/* ---- total panel, the hero of the card -------------------------------- */

.zhr-summary__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 20px 0;
  padding: 18px 20px;
  border-radius: var(--zhr-radius-md);
  background: linear-gradient(145deg, var(--zhr-ink-soft) 0%, var(--zhr-ink) 62%, var(--zhr-ink) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26),
              inset 0 0 0 1px rgba(255, 255, 255, .09),
              0 10px 24px -8px rgba(16, 38, 84, .45);
  overflow: hidden;
}

.zhr-summary__foot::after {
  content: "";
  position: absolute;
  inset: -60% -20% auto -20%;
  height: 150%;
  background: linear-gradient(102deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 46%);
  pointer-events: none;
}

.zhr-summary__total { text-align: right; margin-left: auto; position: relative; z-index: 1; }

.zhr-summary__total-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin-bottom: 3px;
}
.zhr-summary__total-value {
  display: block;
  font-size: 38px;
  font-weight: 800;
  line-height: .96;
  color: #fff;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}
.zhr-summary__total-was {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .58);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* ---- quantity ---------------------------------------------------------- */

.zhr-summary .quantity {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center;
  border: 0 !important;
  border-radius: 999px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, .12) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22),
              inset 0 1px 0 rgba(255, 255, 255, .16);
  float: none !important;
  margin: 0 !important;
}
.zhr-summary .quantity input.qty,
.zhr-summary .quantity input[type="number"] {
  width: 46px !important;
  min-height: 42px !important;
  border: 0 !important;
  text-align: center !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  -moz-appearance: textfield;
  padding: 0 !important;
  font-variant-numeric: tabular-nums;
}
.zhr-summary .quantity input.qty::-webkit-outer-spin-button,
.zhr-summary .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* our stepper, plus any the theme supplies, share one look */
.zhr-summary .zhr-step,
.zhr-summary .quantity .plus,
.zhr-summary .quantity .minus,
.zhr-summary .quantity a.plus,
.zhr-summary .quantity a.minus,
.zhr-summary .quantity input.plus,
.zhr-summary .quantity input.minus {
  width: 40px !important;
  height: 42px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #fff !important;
  cursor: pointer;
  transition: background .16s ease;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  min-width: 0 !important;
}
.zhr-summary .zhr-step:hover,
.zhr-summary .quantity .plus:hover,
.zhr-summary .quantity .minus:hover { background: rgba(255, 255, 255, .16) !important; }
.zhr-summary .zhr-step:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

/* ---- actions ----------------------------------------------------------- */

.zhr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 20px 22px;
}
.zhr-actions.zhr-actions--single { grid-template-columns: 1fr; }

/* Themes reliably set border-box on <button> but often not on <a>, so a
   100% wide anchor with padding overflowed the card. Pin it explicitly. */
.zhr-actions > *,
.zhr-cta.zhr-cta.zhr-cta,
.zhr-wa.zhr-wa.zhr-wa {
  box-sizing: border-box !important;
  min-width: 0;
  max-width: 100%;
}

/* Repeated class beats themes that use !important on their cart button. */
.zhr-cta.zhr-cta.zhr-cta {
  position: relative;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-radius: var(--zhr-radius-sm) !important;
  background: linear-gradient(180deg, var(--zhr-ink-soft) 0%, var(--zhr-ink) 100%) !important;
  background-color: var(--zhr-ink) !important;
  color: #fff !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  letter-spacing: .005em;
  line-height: 1.2 !important;
  text-transform: none !important;
  text-decoration: none !important;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26),
              0 2px 4px rgba(16, 38, 84, .18),
              0 10px 22px -8px rgba(16, 38, 84, .55) !important;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.zhr-cta.zhr-cta.zhr-cta:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3),
              0 3px 6px rgba(16, 38, 84, .2),
              0 16px 30px -10px rgba(16, 38, 84, .6) !important;
}
.zhr-cta.zhr-cta.zhr-cta:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .28) !important;
}
.zhr-cta.zhr-cta.zhr-cta:focus-visible { outline: 3px solid rgba(27, 75, 165, .5); outline-offset: 2px; }
.zhr-cta.zhr-cta.zhr-cta.disabled,
.zhr-cta.zhr-cta.zhr-cta:disabled {
  background: linear-gradient(180deg, #C3CAD6 0%, #AEB7C6 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35) !important;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.zhr-wa.zhr-wa.zhr-wa {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--zhr-radius-sm);
  background: linear-gradient(180deg, var(--zhr-green) 0%, var(--zhr-green-dark) 100%) !important;
  color: #fff !important;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24),
              0 2px 4px rgba(6, 70, 40, .18),
              0 10px 22px -8px rgba(6, 70, 40, .5);
  transition: transform .12s ease, filter .18s ease;
}
.zhr-wa.zhr-wa.zhr-wa:hover { filter: brightness(1.07); transform: translateY(-1px); color: #fff !important; }
.zhr-wa.zhr-wa.zhr-wa:active { transform: translateY(1px); }
.zhr-wa svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }

/* ---- entrance ---------------------------------------------------------- */

.zhr-summary { animation: zhr-rise .45s cubic-bezier(.22,.61,.36,1) both; }
@keyframes zhr-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 767px) {
  .zhr-summary__title { padding: 18px 18px 12px; font-size: 17px !important; }
  .zhr-summary__rows { padding: 0 18px; }
  .zhr-summary__foot { margin: 14px 14px 0; padding: 16px; }
  .zhr-summary__total-value { font-size: 32px; }
  .zhr-actions { grid-template-columns: 1fr; padding: 14px 14px 18px; }
  .zhr-summary__k, .zhr-summary__v { font-size: 13.5px; }
  div.product form.cart ul.variable-items-wrapper li.button-variable-item .variable-item-span {
    padding: 11px 14px !important;
    font-size: 13.5px !important;
    min-height: 44px !important;
  }
  div.product form.cart ul.variable-items-wrapper li.color-variable-item { width: 50px !important; height: 50px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .zhr-summary, .zhr-summary *, div.product form.cart .variable-item-span {
    animation: none !important;
    transition: none !important;
  }
  .zhr-cta.zhr-cta.zhr-cta:hover, .zhr-wa.zhr-wa.zhr-wa:hover { transform: none; }
}
