.epv-section { margin: 0 0 10px; }
.epv-section__title { font-weight: 600; margin: 0 0 8px; }
.epv-section--unlimited {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.epv-section__separator {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.epv-section__separator::before,
.epv-section__separator::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.05), rgba(148, 163, 184, 0.5), rgba(148, 163, 184, 0.05));
}

.epv-section__list { display: grid; gap: 10px; }

.epv-tile {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255,255,255,0.9) inset;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.epv-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.0) 20%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.0) 80%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.epv-tile:hover,
.epv-tile:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.10),
    0 1px 0 rgba(255,255,255,0.95) inset;
}

.epv-tile:hover::before,
.epv-tile:focus-visible::before {
  opacity: 1;
}

.epv-tile.is-active {
  border-color: rgba(194, 151, 66, 0.55);
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(255,249,235,0.96));
  box-shadow:
    0 18px 38px rgba(148, 116, 48, 0.18),
    0 1px 0 rgba(255,255,255,0.95) inset;
}

.epv-tile__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.epv-tile__meta { display: inline-flex; align-items: baseline; gap: 10px; min-width: 0; }
.epv-tile__badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  color: rgba(122, 90, 28, 0.82);
  text-shadow: 0 1px 0 rgba(255,255,255,0.72);
}
.epv-tile__gb { white-space: nowrap; font-weight: 700; }
.epv-tile__days { white-space: nowrap; opacity: .9; }
.epv-tile__right { display: inline-flex !important; align-items: center; gap: 12px; white-space: nowrap; margin-left: auto !important; justify-content: flex-end; flex: 0 0 auto; }

.epv-tile__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,249,0.96));
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}


/*
 * Critical tile layout: high-specificity selectors because many Woo themes
 * ship `button` rules with `!important` that can neutralize `margin-left:auto`
 * on `.epv-tile__right` by forcing `.epv-tile` back to block/inline-block.
 */
.epv-wrapper .epv-section__list > button.epv-tile {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 12px !important;
}

.epv-wrapper .epv-section__list > button.epv-tile .epv-tile__right {
  justify-self: end !important;
  margin-left: 0 !important;
}

@media (min-width: 601px) {
  .epv-tile__btn {
    display: none !important;
  }

  .epv-tile__right {
    gap: 0;
  }

  .epv-tile[data-default-selected="1"] {
    border-color: rgba(194, 151, 66, 0.62);
    background:
      radial-gradient(circle at top left, rgba(255, 244, 214, 0.55), rgba(255, 244, 214, 0) 34%),
      linear-gradient(180deg, rgba(255,255,255,1), rgba(255,249,235,0.96));
    box-shadow:
      0 20px 40px rgba(148, 116, 48, 0.16),
      0 1px 0 rgba(255,255,255,0.95) inset;
  }

  .epv-tile[data-default-selected="1"] .epv-tile__btn {
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(250,244,230,0.96));
    border-color: rgba(194, 151, 66, 0.28);
    box-shadow: 0 10px 22px rgba(148, 116, 48, 0.10);
  }

  .epv-tile[data-default-selected="1"] .epv-tile__badge {
    color: rgba(122, 90, 28, 0.78);
  }
}

/* Sticky bar */
.epv-sticky{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 9999;
  pointer-events: none;
}

.epv-sticky__bar{
  pointer-events: auto;
  position: relative;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 14px 16px;
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 10px 30px rgba(0,0,0,0.10),
    0 1px 0 rgba(255,255,255,0.45) inset;
}

/* Desktop: variant on the left */
.epv-sticky__left{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.epv-sticky__line{
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.epv-sticky__product{
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epv-sticky__variant{
  flex: 0 0 auto;
  white-space: nowrap;
  opacity: .8;
}

/* right side (desktop) */
.epv-sticky__right{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.epv-sticky__variant-mobile{
  display: none;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epv-sticky__pay{
  display: grid;
  gap: 2px;
  text-align: right;
}

.epv-sticky__label{
  font-size: 12px;
  opacity: .7;
  line-height: 1;
}

.epv-sticky__price{
  font-weight: 700;
  line-height: 1.1;
}

.epv-sticky__btn{
  cursor: pointer;
  white-space: nowrap;
  border-radius: 14px;
  padding: 12px 16px;
  border: 0;
  box-shadow: 0 10px 18px rgba(0,0,0,0.10);
}

.epv-sticky__status{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity 150ms ease;
}

.epv-sticky__status::before{
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: epv-spin .75s linear infinite;
}

@keyframes epv-spin{
  to { transform: rotate(360deg); }
}

.epv-sticky__bar.is-processing .epv-sticky__left,
.epv-sticky__bar.is-processing .epv-sticky__right,
.epv-sticky__bar.is-processing .epv-sticky__product,
.epv-sticky__bar.is-processing .epv-sticky__variant,
.epv-sticky__bar.is-processing .epv-sticky__variant-mobile,
.epv-sticky__bar.is-processing .epv-sticky__pay,
.epv-sticky__bar.is-processing .epv-sticky__btn{
  visibility: hidden !important;
  opacity: 0 !important;
}

.epv-sticky__bar.is-processing.is-processing-visible .epv-sticky__status{
  opacity: 1;
}

/* MOBILE: exactly 2 rows */
@media (max-width: 600px){
  .epv-tile {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .epv-tile__left {
    gap: 4px;
  }

  .epv-tile__badge {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .epv-tile__btn {
    display: none !important;
  }

  .epv-tile__right {
    gap: 0;
  }

  .epv-sticky{
    bottom: 10px;
  }

  .epv-sticky__bar{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "product variant"
      "pay     btn";
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
  }

  .epv-sticky__variant{
    display: none !important;
  }

  .epv-sticky__left{
    grid-area: product;
    min-width: 0;
  }

  .epv-sticky__line{
    display: block;
    min-width: 0;
  }

  .epv-sticky__right{
    display: contents;
  }

  .epv-sticky__variant-mobile{
    display: block;
    grid-area: variant;
    justify-self: end;
    text-align: right;
    max-width: 100%;
    opacity: .8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .epv-sticky__pay{
    grid-area: pay;
    text-align: left;
    gap: 1px;
  }

  .epv-sticky__btn{
    grid-area: btn;
    justify-self: end;
  }
}
