/* Product Badges Styles - Mobile First Design */

.product-badge-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

/* MOBILE FIRST - Base styles for mobile devices */
.product-badge-strip {
  position: absolute;
  left: 0;
  width: auto;
  min-width: fit-content;
  max-width: 85%; /* Mobile screens need more margin */
  height: 0.6875rem; /* Smaller for mobile - 11px */
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.09375rem 0.375rem; /* Compact padding for mobile - 1.5px 6px */
  box-sizing: border-box;
  white-space: nowrap;
  border-radius: 0.09375rem; /* Small radius for mobile */
  z-index: 10;
  transition: all 0.15s ease;
  overflow: visible;
  contain: layout;
}

.product-badge-content {
  display: flex;
  align-items: center;
  gap: 0.1875rem; /* Smaller gap for mobile - 3px */
  white-space: nowrap;
}

/* MOBILE FIRST - Base text and icon sizes */
.product-badge-icon {
  width: 9px; /* Smaller for mobile */
  height: 9px; /* Smaller for mobile */
  color: white;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.product-badge-text {
  color: white;
  font-size: 0.4375rem; /* Smaller - 7px */
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.1;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Better readability on mobile */
}

/* Color variations */
.badge-emerald-light {
  background: linear-gradient(to right, #6ee7b7, #5eead4); /* emerald-300 to teal-300 */
}

.badge-emerald-dark {
  background: linear-gradient(to right, #34d399, #14b8a6); /* emerald-400 to teal-500 */
}

/* Animation utilities */
.badge-hover-effect {
  transition: all 0.3s ease;
}

.badge-hover-effect:hover {
  transform: scale(1.02);
}

/* PROGRESSIVE ENHANCEMENT - Larger screens get better experience */

/* TABLET SCREENS - Improved visibility */
@media (min-width: 481px) {
  .product-badge-strip {
    height: 0.8125rem; /* Slightly larger - 13px */
    padding: 0.125rem 0.4375rem; /* 2px 7px */
    max-width: 90%;
  }

  .product-badge-icon {
    width: 10px;
    height: 10px;
  }

  .product-badge-text {
    font-size: 0.5rem; /* 8px */
  }

  .product-badge-content {
    gap: 0.21875rem; /* 3.5px */
  }
}

/* DESKTOP SCREENS - Full experience */
@media (min-width: 769px) {
  .product-badge-strip {
    height: 0.9375rem; /* 15px */
    padding: 0.15625rem 0.5625rem; /* 2.5px 9px */
    max-width: 95%;
    border-radius: 0.125rem;
  }

  .product-badge-icon {
    width: 12px;
    height: 12px;
  }

  .product-badge-text {
    font-size: 0.625rem; /* 10px */
    line-height: 1.2;
  }

  .product-badge-content {
    gap: 0.25rem; /* 4px */
  }
}

/* LARGE DESKTOP - Premium experience */
@media (min-width: 1025px) {
  .product-badge-strip {
    height: 1rem; /* 16px */
    padding: 0.1875rem 0.625rem; /* 3px 10px */
    max-width: 98%;
    transition: all 0.2s ease;
  }

  .product-badge-icon {
    width: 13px;
    height: 13px;
  }

  .product-badge-text {
    font-size: 0.6875rem; /* 11px */
  }
}

/* Handle text overflow gracefully on all devices */
.product-badge-strip {
  overflow: visible;
}

.product-badge-container {
  overflow: visible;
}

/* SPECIAL RULES FOR "You may also like" SECTION */
/* These products are smaller so badges need different sizing */

/* Related products have smaller containers, so adjust accordingly */
/* MOBILE FIRST - Very small for mobile "You may also like" */
.related-products .product-badge-strip,
[data-page-type="related-products"] .product-badge-strip {
  height: 0.4375rem; /* Extra small for mobile - 7px */
  padding: 0.03125rem 0.1875rem; /* Ultra compact - 0.5px 3px */
  max-width: 75%; /* More space for tiny mobile containers */
  border-radius: 0.03125rem; /* Minimal radius */
}

.related-products .product-badge-icon,
[data-page-type="related-products"] .product-badge-icon {
  width: 6px; /* Very small icon */
  height: 6px;
  stroke-width: 1.5; /* Thinner stroke for small size */
}

.related-products .product-badge-text,
[data-page-type="related-products"] .product-badge-text {
  font-size: 0.3125rem; /* Very small - 5px */
  font-weight: 500; /* Less bold for tiny text */
  line-height: 1;
}

.related-products .product-badge-content,
[data-page-type="related-products"] .product-badge-content {
  gap: 0.125rem; /* Minimal gap - 2px */
}

/* Responsive adjustments for related products */
@media (min-width: 481px) {
  .related-products .product-badge-strip,
  [data-page-type="related-products"] .product-badge-strip {
    height: 0.5625rem; /* 9px */
    padding: 0.078125rem 0.3125rem; /* 1.25px 5px */
  }

  .related-products .product-badge-icon,
  [data-page-type="related-products"] .product-badge-icon {
    width: 7px;
    height: 7px;
  }

  .related-products .product-badge-text,
  [data-page-type="related-products"] .product-badge-text {
    font-size: 0.375rem; /* 6px */
  }
}

@media (min-width: 769px) {
  .related-products .product-badge-strip,
  [data-page-type="related-products"] .product-badge-strip {
    height: 0.625rem; /* 10px */
    padding: 0.09375rem 0.375rem; /* 1.5px 6px */
    max-width: 85%;
  }

  .related-products .product-badge-icon,
  [data-page-type="related-products"] .product-badge-icon {
    width: 8px;
    height: 8px;
  }

  .related-products .product-badge-text,
  [data-page-type="related-products"] .product-badge-text {
    font-size: 0.4375rem; /* 7px */
  }
}

/* Admin preview mode */
.badge-admin-preview {
  border: 2px dashed #f59e0b;
  background-color: rgba(245, 158, 11, 0.1);
}

.badge-admin-preview::after {
  content: "Preview Mode";
  position: absolute;
  top: -20px;
  right: 0;
  background: #f59e0b;
  color: white;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 2px;
}