/* ================================================================
   Discount Badge Styles — 3 design variants with transparency
   Uses --badge-color CSS variable for dynamic color control
   Default color: #dc3545 (Vermelho Clássico)
   ================================================================ */

/* ── Base Badge Wrapper ─────────────────────────────────────── */
.discount-badge {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  opacity: 0.88;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.product-card:hover .discount-badge,
.product-image-wrapper:hover .discount-badge {
  opacity: 0.95;
}

.discount-badge-text {
  display: block;
  white-space: nowrap;
}

/* ── Size Variants ─────────────────────────────────────────── */
.discount-badge-sm .discount-badge-text { font-size: 0.6rem; }
.discount-badge-md .discount-badge-text { font-size: 0.75rem; }
.discount-badge-lg .discount-badge-text { font-size: 0.9rem; }

/* ================================================================
   STYLE 1: Corner Ribbon (Diagonal)
   Positioned top-right, diagonal cut using linear-gradient
   ================================================================ */
.discount-badge-style1 {
  top: -5px;
  right: -5px;
  width: 70px;
  height: 70px;
  background: linear-gradient(225deg, var(--badge-color, #dc3545) 0%, var(--badge-color, #dc3545) 50%, transparent 50%);
  color: #fff;
  border-radius: 0;
}

.discount-badge-style1 .discount-badge-text {
  transform: rotate(45deg);
  position: absolute;
  top: 10px;
  right: 5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.discount-badge-sm.discount-badge-style1 {
  width: 50px;
  height: 50px;
}
.discount-badge-sm.discount-badge-style1 .discount-badge-text {
  top: 6px;
  right: 3px;
}

.discount-badge-lg.discount-badge-style1 {
  width: 90px;
  height: 90px;
}
.discount-badge-lg.discount-badge-style1 .discount-badge-text {
  top: 14px;
  right: 7px;
}

/* ================================================================
   STYLE 2: Top Banner (Full-width strip)
   ================================================================ */
.discount-badge-style2 {
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(90deg, var(--badge-color, #dc3545) 0%, color-mix(in srgb, var(--badge-color, #dc3545) 80%, white) 100%);
  color: #fff;
  border-radius: 0;
  text-align: center;
  backdrop-filter: blur(4px);
}

.discount-badge-sm.discount-badge-style2 { height: 22px; }
.discount-badge-lg.discount-badge-style2 { height: 34px; }

.discount-badge-style2 .discount-badge-text {
  letter-spacing: 0.05em;
}

/* ================================================================
   STYLE 3: Circular Seal
   Positioned top-right
   ================================================================ */
.discount-badge-style3 {
  top: 8px;
  right: 8px;
  width: 60px;
  height: 60px;
  background: var(--badge-color, #dc3545);
  opacity: 0.9;
  color: #fff;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--badge-color, #dc3545) 60%, transparent);
  backdrop-filter: blur(2px);
}

.discount-badge-style3 .discount-badge-text {
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.discount-badge-sm.discount-badge-style3 {
  width: 44px;
  height: 44px;
  top: 4px;
  right: 4px;
}

.discount-badge-lg.discount-badge-style3 {
  width: 76px;
  height: 76px;
  top: 10px;
  right: 10px;
}

/* ── Pulse animation for circular badge (subtle attention) ─── */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 2px 8px color-mix(in srgb, var(--badge-color, #dc3545) 40%, transparent); }
  50% { box-shadow: 0 4px 16px color-mix(in srgb, var(--badge-color, #dc3545) 60%, transparent); }
}

.discount-badge-style3 {
  animation: badgePulse 3s ease-in-out infinite;
}

/* ── Product card wrapper needed for absolute positioning ───── */
.product-image-wrapper {
  position: relative;
  overflow: hidden;
}

/* Optional: subtle overlay behind style2 banner for better readability */
.discount-badge-style2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* ================================================================
   Shipping Options — radio-button list for freight selection
   Used in cart, checkout, and anywhere shipping is calculated
   ================================================================ */

.shipping-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white, #fff);
  margin-bottom: 0.5rem;
}

.shipping-option:hover {
  border-color: var(--primary, #7a3f90);
  background: var(--bg, #f9f8fb);
}

.shipping-option input[type="radio"] {
  accent-color: var(--primary, #7a3f90);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin: 0;
}

.shipping-option:has(input:checked) {
  border-color: var(--primary, #7a3f90);
  background: var(--primary-subtle, #f3e8ff);
  box-shadow: 0 0 0 1px var(--primary, #7a3f90);
}

.shipping-info {
  flex: 1;
  min-width: 0;
}

.shipping-info span {
  display: block;
  line-height: 1.4;
}

.shipping-price {
  text-align: right;
  flex-shrink: 0;
}

.shipping-price span {
  display: block;
  line-height: 1.4;
}

/* Shipping calculator section */
.shipping-calc {
  border: 1px dashed var(--border, #e2e8f0);
}

#shipping-results {
  max-height: 240px;
  overflow-y: auto;
}
