/* Add custom CSS styles below */ 

/* ==========================================
   POWER TECH COUPON SYSTEM - V4
   Product Coupon + Home/Entry Popup
   ========================================== */

#pt-coupon,
#pt-coupon-popup {
  --pt-red: #ed1c24;
  --pt-red-dark: #c9151c;
  --pt-yellow: #f7c526;
  --pt-ink: #17243a;
  --pt-muted: #69717b;
  direction: rtl;
  color: var(--pt-ink);
  font-family: inherit;
  box-sizing: border-box;
}

#pt-coupon *,
#pt-coupon-popup *,
#pt-coupon *::before,
#pt-coupon-popup *::before,
#pt-coupon *::after,
#pt-coupon-popup *::after {
  box-sizing: border-box;
}

/* Product page container */

#pt-coupon {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 14px 0 18px;
}

/* Popup dark background */

#pt-coupon-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(13,22,37,.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#pt-coupon-popup > .pt-popup-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: visible;
}

/* Shared white card */

.pt-coupon-card {
  position: relative;
  width: 100%;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(247,197,38,.16),
      transparent 38%
    ),
    #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 3px 16px rgba(0,0,0,.045);
}

#pt-coupon .pt-coupon-card {
  padding: 20px 15px 18px;
  overflow: hidden;
}

/* Popup is 30% smaller.
   JS further adjusts it to fit the viewport. */

#pt-coupon-popup .pt-coupon-card {
  width: 520px;
  min-width: 520px;
  flex: 0 0 520px;
  max-width: none;
  max-height: none;
  height: auto;
  padding: 24px 25px 22px;
  overflow: visible;
  border-radius: 22px;
  box-shadow: 0 22px 70px rgba(0,0,0,.3);
  transform: scale(var(--pt-popup-scale, .7));
  transform-origin: center center;
}

.pt-coupon-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 4px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(
    90deg,
    var(--pt-red),
    var(--pt-yellow) 50%,
    var(--pt-red)
  );
}

/* Close button */

#pt-coupon-popup .pt-close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--pt-red);
  border-radius: 50%;
  background: #fff;
  color: #242424;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

/* Welcome greeting */

.pt-coupon-card .pt-greeting {
  margin: 0;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
  text-align: center;
}

#pt-coupon-popup .pt-greeting {
  padding: 4px 40px;
}

.pt-coupon-card .pt-small-line {
  width: 45px;
  height: 3px;
  margin: 10px auto 14px;
  background: var(--pt-yellow);
  border-radius: 10px;
}

/* Yellow offer label */

.pt-coupon-card .pt-offer-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  padding: 7px 20px;
  border-radius: 40px;
  background: var(--pt-yellow);
  color: #201d13;
  font-size: 13px;
  font-weight: 900;
}

/* Red percentage graphic */

.pt-coupon-card .pt-percent-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 76px;
  height: 76px;
  margin: 16px auto;
  border-radius: 20px;
  background: var(--pt-red);
  color: var(--pt-yellow);
  font-family: Arial, sans-serif;
  font-size: 53px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-3deg);
  box-shadow: 0 8px 18px rgba(237,28,36,.13);
}

/* Headline */

.pt-coupon-card .pt-hero-title {
  margin: 0;
  color: var(--pt-ink);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

#pt-coupon-popup .pt-hero-title {
  font-size: 31px;
}

.pt-coupon-card .pt-hero-subtitle {
  margin: 6px 0 17px;
  color: var(--pt-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
}

/* Code and copy button */

.pt-coupon-card .pt-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  background: #fff;
  border: 1.5px dashed #cfd3d8;
  border-radius: 12px;
}

.pt-coupon-card .pt-code-value {
  flex: 1;
  min-width: 0;
  direction: ltr;
  color: var(--pt-ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  overflow-wrap: anywhere;
  user-select: all;
}

#pt-coupon-popup .pt-code-value {
  font-size: 34px;
}

.pt-coupon-card .pt-copy-btn {
  flex-shrink: 0;
  min-width: 116px;
  padding: 12px 15px;
  border: 0;
  border-radius: 9px;
  background: var(--pt-red);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease;
}

.pt-coupon-card .pt-copy-btn:hover {
  background: var(--pt-red-dark);
  color: #fff;
}

.pt-coupon-card .pt-copy-status {
  margin: 6px 0 0;
  color: #16803c;
  font-size: 11px;
  text-align: center;
}

.pt-coupon-card .pt-copy-status:empty {
  display: none;
}

/* Payment method logos */

.pt-coupon-card .pt-payment-title {
  margin: 14px 0 10px;
  color: var(--pt-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.pt-coupon-card .pt-payment-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  width: 100%;
  gap: 7px;
}

.pt-coupon-card .pt-payment-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 49px;
  padding: 5px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 8px;
}

.pt-coupon-card .pt-payment-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 36px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
}

/* Warning about installment payments */

.pt-coupon-card .pt-payment-warning {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 13px 0 0;
  padding: 10px 12px;
  background: #fff5f5;
  border: 1px solid #ffdddd;
  border-radius: 8px;
  color: #bd2026;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.8;
  text-align: right;
}

.pt-coupon-card .pt-warning-mark {
  flex-shrink: 0;
  font-size: 16px;
}

/* Numbered conditions */

.pt-coupon-card .pt-terms-heading {
  margin: 17px 0 10px;
  color: var(--pt-ink);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.pt-coupon-card .pt-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pt-coupon-card .pt-term-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 49px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 9px;
  text-align: right;
}

.pt-coupon-card .pt-term-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--pt-yellow);
  color: #262014;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.pt-coupon-card .pt-term-text {
  color: #4b525a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
}

/* Shop button in popup only */

#pt-coupon-popup .pt-shop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 18px;
  padding: 14px 12px;
  background: var(--pt-red);
  border: 0;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

#pt-coupon-popup .pt-shop-btn:hover {
  background: var(--pt-red-dark);
  color: #fff;
}

#pt-coupon-popup button:focus-visible,
#pt-coupon button:focus-visible {
  outline: 2px solid var(--pt-red);
  outline-offset: 3px;
}

/* Mobile product conditions */

@media (max-width: 600px) {
  #pt-coupon {
    margin: 12px 0 16px;
  }

  #pt-coupon .pt-coupon-card {
    padding: 15px 11px 14px;
  }

  #pt-coupon .pt-greeting {
    font-size: 11px;
  }

  #pt-coupon .pt-offer-badge {
    min-height: 32px;
    padding: 6px 17px;
    font-size: 12px;
  }

  #pt-coupon .pt-percent-icon {
    width: 62px;
    height: 62px;
    margin: 12px auto;
    border-radius: 16px;
    font-size: 43px;
  }

  #pt-coupon .pt-hero-title {
    font-size: 20px;
  }

  #pt-coupon .pt-hero-subtitle {
    margin-bottom: 12px;
    font-size: 12px;
  }

  #pt-coupon .pt-code-row {
    gap: 6px;
    padding: 6px;
  }

  #pt-coupon .pt-code-value {
    font-size: 22px;
    letter-spacing: 1px;
  }

  #pt-coupon .pt-copy-btn {
    min-width: 85px;
    padding: 10px 8px;
    font-size: 11px;
  }

  #pt-coupon .pt-payment-grid {
    gap: 4px;
  }

  #pt-coupon .pt-payment-item {
    height: 40px;
    padding: 3px;
    border-radius: 5px;
  }

  #pt-coupon .pt-payment-item img {
    max-height: 30px;
  }

  /* One condition per row on mobile */
  #pt-coupon .pt-terms-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 7px;
  }

  #pt-coupon .pt-term-item {
    min-height: 41px;
    padding: 8px 10px;
  }
}

/* On mobile the popup is proportionally
   resized using JavaScript.
   No internal scrollbar is used. */

@media (max-width: 600px) {
  #pt-coupon-popup .pt-coupon-card {
    box-shadow: 0 14px 45px rgba(0,0,0,.28);
  }
}