
/*
 * La Femeia — Floating Offers V4
 * Bottom-right aligned launcher and compact offer popup.
 * Desktop and mobile responsive.
 */

.lf-floating-offers,
.lf-floating-offers *,
.lf-floating-offers *::before,
.lf-floating-offers *::after {
  box-sizing: border-box;
}

/* ==========================================
   MAIN FLOATING WRAPPER
   ========================================== */

.lf-floating-offers {
  --lff-ink: #29231f;
  --lff-gold: #a9844e;

  position: fixed !important;
  z-index: 99990;

  top: auto !important;
  left: auto !important;
  right: 10px !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;

  width: min(302px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  margin: 0 !important;

  color: var(--lff-ink);
  font-family: 'DM Sans', Arial, sans-serif;

  pointer-events: none;
}

/* Only the visible controls receive clicks */
.lf-floating-offers__panel,
.lf-floating-offers__restore {
  pointer-events: auto;
}

/* ==========================================
   EXPANDED OFFER PANEL
   ========================================== */

.lf-floating-offers__panel {
  width: 100%;
  border: 1px solid #e7d8c4;
  background: rgba(255, 251, 245, .98);
  box-shadow: 0 12px 38px rgba(53, 35, 22, .16);
  border-radius: 17px;
  padding: 11px;
  overflow: hidden;
}

.lf-floating-offers__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 2px;
}

.lf-floating-offers__eyebrow {
  font-size: 8px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .13em;
  color: #946d38;
}

.lf-floating-offers__eyebrow span {
  margin-right: 4px;
}

/* Close / minimize button */

.lf-floating-offers__minimize {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #e8dac8;
  border-radius: 50%;
  background: #fff;
  color: #6c5a48;
  cursor: pointer;
  font: 400 18px/1 Arial, sans-serif;
}

.lf-floating-offers__minimize:hover {
  background: #f5ede2;
  border-color: #c9ac87;
}

/* ==========================================
   OFFER CONTENT
   ========================================== */

.lf-floating-offers__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: inherit !important;
  min-width: 0;
}

.lf-floating-offers__media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 73px;
  width: 73px;
  height: 85px;
  border-radius: 10px;
  overflow: hidden;
  background: #eee3d5;
}

.lf-floating-offers__image,
.lf-floating-offer__image {
  display: block !important;
  position: relative;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover;
}

.lf-floating-offers__image-fallback {
  font: 500 28px 'Cormorant Garamond', Georgia, serif;
  color: #9a7854;
}

.lf-floating-offers__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.lf-floating-offers__reward {
  display: inline-flex;
  align-items: center;
  background: #eaf3e7;
  color: #426c39;
  border-radius: 100px;
  padding: 4px 8px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.lf-floating-offers__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 100%;
  margin: 5px 0 2px;
  font: 500 22px/1 'Cormorant Garamond', Georgia, serif;
  overflow-wrap: anywhere;
}

.lf-floating-offers__subtitle {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  max-width: 100%;
  font: 400 10px/1.3 'DM Sans', Arial, sans-serif;
  color: #75695e;
}

.lf-floating-offers__cta {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 700;
  color: #8f6b39;
}

.lf-floating-offers__link:hover
.lf-floating-offers__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================
   OFFER NAVIGATION
   ========================================== */

.lf-floating-offers__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 1px 0;
  padding-top: 7px;
  border-top: 1px solid #eee4d7;
}

.lf-floating-offers__pagination {
  font-size: 9px;
  color: #927653;
  font-variant-numeric: tabular-nums;
  letter-spacing: .11em;
}

.lf-floating-offers__controls {
  display: flex;
  gap: 5px;
}

.lf-floating-offers__controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid #e4d3bf;
  background: #fff;
  color: #654c36;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.lf-floating-offers__controls button:hover {
  background: #f7efe5;
  border-color: #b89265;
}

.lf-floating-offers button:focus-visible,
.lf-floating-offers a:focus-visible {
  outline: 2px solid var(--lff-gold);
  outline-offset: 3px;
}

.lf-floating-offers [hidden] {
  display: none !important;
}

/* ==========================================
   MINIMIZED OFFERS BUTTON
   CRITICAL RIGHT ALIGNMENT FIX
   ========================================== */

.lf-floating-offers .lf-floating-offers__restore {
  /* Align to the RIGHT side of the wrapper */
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 0 0 0 auto !important;

  align-items: center;
  justify-content: center;
  gap: 10px;

  min-width: 166px;
  min-height: 52px;
  padding: 13px 19px;

  border: 1px solid #d7be9b;
  border-radius: 999px;

  background: #29231f;
  color: #fff;

  box-shadow:
    0 12px 28px rgba(33, 24, 16, .23),
    0 3px 8px rgba(33, 24, 16, .10);

  font: 700 14px/1.2 'DM Sans', Arial, sans-serif;
  letter-spacing: .01em;
  text-align: center;
  white-space: nowrap;

  cursor: pointer;

  transition:
    background .25s ease,
    box-shadow .25s ease,
    transform .25s ease;
}

.lf-floating-offers .lf-floating-offers__restore:hover {
  background: #45372b;
  transform: translateY(-2px);
  box-shadow: 0 15px 32px rgba(33, 24, 16, .27);
}

.lf-floating-offers .lf-floating-offers__restore:active {
  transform: translateY(0);
}

.lf-floating-offers .lf-floating-offers__restore-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  min-width: 24px;
  min-height: 24px;
  padding: 3px 7px;

  background: #b48b52;
  color: #fff;
  border-radius: 99px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 900px) {
  .lf-floating-offers {
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {
  .lf-floating-offers {
    left: auto !important;
    right: 8px !important;
    top: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;

    width: min(252px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }

  .lf-floating-offers__panel {
    padding: 9px;
    border-radius: 14px;
    box-shadow: 0 9px 28px rgba(53, 35, 22, .15);
  }

  .lf-floating-offers__top {
    margin-bottom: 6px;
  }

  .lf-floating-offers__eyebrow {
    font-size: 7px;
    letter-spacing: .09em;
  }

  .lf-floating-offers__minimize {
    flex-basis: 23px;
    width: 23px;
    height: 23px;
    font-size: 17px;
  }

  .lf-floating-offers__link {
    gap: 8px;
  }

  .lf-floating-offers__media {
    flex: 0 0 57px;
    width: 57px;
    height: 67px;
    border-radius: 8px;
  }

  .lf-floating-offers__reward {
    font-size: 7px;
    padding: 3px 7px;
  }

  .lf-floating-offers__title {
    font-size: 18px;
    margin: 4px 0 2px;
    line-height: 1.02;
  }

  .lf-floating-offers__subtitle {
    font-size: 9px;
    line-height: 1.2;
    -webkit-line-clamp: 1;
  }

  .lf-floating-offers__cta {
    font-size: 9px;
    margin-top: 4px;
  }

  .lf-floating-offers__bottom {
    margin-top: 6px;
    padding-top: 5px;
  }

  .lf-floating-offers__controls button {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }

  /* Mobile pill remains right-aligned */
  .lf-floating-offers .lf-floating-offers__restore {
    width: max-content;
    min-width: 150px;
    min-height: 49px;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: 0 !important;

    padding: 12px 16px;
    font-size: 13px;
    gap: 9px;
  }

  .lf-floating-offers .lf-floating-offers__restore-count {
    min-width: 22px;
    min-height: 22px;
    font-size: 11px;
  }
}

/* ==========================================
   SMALL MOBILE
   ========================================== */

@media (max-width: 360px) {
  .lf-floating-offers {
    width: min(235px, calc(100vw - 16px));
    right: 8px !important;
  }

  .lf-floating-offers__title {
    font-size: 17px;
  }

  .lf-floating-offers__media {
    flex-basis: 52px;
    width: 52px;
    height: 63px;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .lf-floating-offers,
  .lf-floating-offers * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
