/* ================================
   CATEGORY PAGE – NON CRITICAL CSS
   ================================ */

/* View Options */
.view-options{margin-bottom:20px}

/* ================= GRID ================= */

.product-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
  align-items:stretch;
}

/* Responsive */
@media (min-width:768px){
  .product-grid{grid-template-columns:repeat(4,1fr)}
}

@media (min-width:480px){
  #productGrid.product-grid{grid-template-columns:repeat(2,1fr)}
}

/* JS Overrides */
.product-grid.override-1{grid-template-columns:repeat(1,1fr)!important}
.product-grid.override-2{grid-template-columns:repeat(2,1fr)!important}
.product-grid.override-3{grid-template-columns:repeat(3,1fr)!important}
.product-grid.override-4{grid-template-columns:repeat(4,1fr)!important}
.product-grid.override-6{grid-template-columns:repeat(6,1fr)!important}

/* ================= PRODUCT CARD ================= */

.product-card{
  border:1px solid #ccc;
  border-radius:8px;
  padding:10px;
  position:relative;
  min-width:0;
}

.image-wrapper img{
  width:100%;
  height:auto;
  display:block;
  border-radius:8px;
}

.product-name{font-weight:bold}
.product-price-bold{color:#333}

.image-icons{margin-top:10px}
.icon-button{background:none;border:none;cursor:pointer}

/* ================= VIEW ICONS ================= */

.view-icons{
  display:flex;
  justify-content:center;
  gap:12px;
  padding:10px 15px;
  margin:20px auto;
  background:#f8f8f8;
  border-radius:8px;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}

.view-icons button{
  border:1px solid #444;
  padding:4px;
  cursor:pointer;
  border-radius:4px;
  background:none;
}

.view-icons button.active{background:#eee}

.grid-icon{display:flex;gap:3px}
.grid-icon span{
  width:8px;
  height:15px;
  background:#F8941D;
  border-radius:2px;
}

.view-icons button.active .grid-icon span{background:#6C972D}

/* ================= SALE TAG ================= */

.product-img-wrap{position:relative}

.sale-tag{
  position:absolute;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:148px;
  height:26px;
  background:linear-gradient(90deg,#ff4d4d,#ff9500);
  color:#fff;
  font-size:11px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:4px;
  box-shadow:0 3px 8px rgba(0,0,0,.25);
  transition:.3s;
}

.product-img-wrap:hover .sale-tag {
    background: linear-gradient(90deg, #F8941D, #6C972D ); /* new hover color */
}

.product-img-wrap:hover .sale-tag::after {
    border-top-color: #6C972D ; /* arrow matches hover */
}

.sale-tag {
    transition: all 0.3s ease-in-out;
}

.sale-tag::after {
    transition: all 0.3s ease-in-out;
}



/* ================= CART SLIDER ================= */

.cart-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  display:none;
  z-index:1100;
}

.cart-overlay.active{display:block}

.cart-slider{
  position:fixed;
  right:-100%;
  top:0;
  width:300px;
  height:100vh;
  background:#fff;
  transition:right .3s ease;
  z-index:2200;
}

.cart-slider.open{right:0}

@media(min-width:769px){
  .cart-slider{width:450px}
}

/* ================= QUANTITY ================= */

.quantity-selector{
  display:flex;
  align-items:center;
  gap:8px;
}

.btn-quantity{
  width:40px;
  height:40px;
  border-radius:50%;
  border:2px solid #6C972D;
  background:#fff;
  color:#6C972D;
  cursor:pointer;
}

/* ================= BUTTON ================= */

.btn1{
  display:block;
  width:100%;
  max-width:500px;
  margin:auto;
  border-radius:10px;
  background:#6C972D;
  color:#fff;
  padding:18px 40px;
  border:none;
  cursor:pointer;
  font-weight:bold;
  text-align:center;
}

/* ================= LOAD MORE ================= */

#loadMoreButton{
  min-height:44px;
  padding:.75rem 1rem;
  background:linear-gradient(90deg,#66000F,#8A0F1D);
  color:#FFD7DD;
  border:none;
  border-radius:4px;
  cursor:pointer;
}

/* ================= UTILS ================= */

.desktop-only{display:block}
.mobile-only{display:none}

@media(max-width:767px){
  .desktop-only{display:none!important}
  .mobile-only{display:block}
}

/* Clearfix */
.clearfix::after{
  content:"";
  display:table;
  clear:both;
}

.sale-tag {
    position: absolute;
    bottom: 0px;      /* drops slightly below image */
    left: 50%;
    transform: translateX(-50%);

    width: 148px;
    height: 26px;

    background: linear-gradient(90deg, #ff4d4d, #ff9500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border-radius: 4px;  /* rectangular (not pill) */
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
    
    z-index: 2;
    pointer-events: none;
}

.sale-icon {
    width: 12px;
    height: 12px;
}

.sale-tag::after {
    content: "";
    position: absolute;
    bottom: -8px;              /* pushes arrow below button */
    left: 50%;
    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ff7a32; /* matches gradient tone */
}
