/*
 * assets/css/offtag.css
 * Styles of the discount tag on product cards and the compact header of the products page.
 * They used to be an inline <style id="ia-offtag-css"> block in includes/offtag.php.
 *
 * Linked by:  includes/offtag.php, at the same place the inline block stood (late in the page, so these rules keep
 *             winning ties against the page styles, as before).
 * Used by:    index, products, rice, millets and wishlist (the pages that show .product-card items).
 * Script:     assets/js/offtag.js creates the .ia-off-tag element.
 */

/* Discount tag: top-right corner of the image, joined with the heart:  [ 7% OFF | heart ] */
.product-card .ia-off-tag{
  position:absolute;top:0;right:0;z-index:20;display:inline-flex;align-items:center;
  height:2.5rem;padding:0 3.5rem 0 .95rem;border-radius:0 0 0 .9rem;
  background:#2f6b3e;color:#fff;font:800 .78rem/1 'Inter',system-ui,sans-serif;letter-spacing:.04em;text-transform:uppercase;
  white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,.18);
}
.product-card .ia-off-tag::after{content:"";position:absolute;right:3rem;top:.75rem;bottom:.75rem;width:1px;background:rgba(255,255,255,.55)}
.product-card .ia-off-tag[hidden]{display:none!important}
/* with a tag, the heart sits inside it (white, no circle); without a tag it keeps the round white button */
.product-card .ia-has-off .wishlist-btn{
  top:0!important;right:0!important;width:3rem!important;height:2.5rem!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;z-index:30!important;
}
.product-card .ia-has-off .wishlist-btn:hover{transform:none!important;background:rgba(255,255,255,.14)!important}
.product-card .ia-has-off .wishlist-btn i{color:#fff!important}
/* the same offer is now on the image, so the small pill beside the price is not repeated */
.product-card .card-price .text-emerald-600,
.product-card .card-price .card-price-off{display:none!important}
@media (max-width:359px){.product-card .ia-off-tag{font-size:.7rem;padding-left:.7rem}}

/* Products page header: smaller banner, smaller category box, smaller sub-line (tablet and desktop) */
@media (min-width:768px){
  main.products-page>section:first-of-type{min-height:0!important;padding-bottom:1.25rem!important}
  main.products-page>section:first-of-type .text-white.flex-shrink-0{margin-top:.25rem!important}
  main.products-page>section:first-of-type h1{margin-bottom:.4rem!important}
  main.products-page>section:first-of-type h1 + p{font-size:.9rem!important;line-height:1.4!important;margin-bottom:.85rem!important}
  main.products-page>section:first-of-type .custom-select-wrap{width:15rem!important;max-width:100%}
  main.products-page>section:first-of-type #filterCategoryBtn{height:2.5rem!important;font-size:.85rem!important;border-radius:.65rem!important}
  main.products-page>section:first-of-type #activeFilters{margin-top:.6rem!important}
  main.products-page>section:first-of-type .md\:text-right .bg-amber-400{margin-bottom:.5rem!important;padding:.2rem .8rem!important}
  main.products-page>section:first-of-type .md\:text-right h2{font-size:1.45rem!important;line-height:1.2!important;margin-bottom:.35rem!important}
  main.products-page>section:first-of-type .md\:text-right .text-emerald-300{font-size:1.35rem!important;margin-bottom:0!important}
  main.products-page>section:first-of-type .md\:text-right p:last-child{font-size:.85rem!important;margin-bottom:0!important}
}
