/* Merchant card - image match styling */
.merchant-item {
  width: 100%;
}

.item-box .merchant-item .picture a:before {
  content: "";
  display: block;
  padding-top: 60%;
}

.merchant-item .picture a img {
  height: 100%;
}

.merchant-ribbons {
  --sc: #FF6600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  align-items: flex-start;
}

.merchant-item .merchant-name {
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  text-align: left;
}

  .merchant-item .merchant-name a {
    color: #000;
    text-decoration: none;
  }

    .merchant-item .merchant-name a:hover {
      color: var(--sc, #FF6600);
    }

/* Picture wrapper - rounded corners and heart overlay */
.merchant-item .picture-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 10px;
}

  .merchant-item .picture-wrapper img {
    border-radius: 8px;
    display: block;
    width: 100%;
    object-fit: cover;
  }

.merchant-item .merchant-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

  .merchant-item .merchant-favorite-btn span {
    font-size: 0;
  }

  .merchant-item .merchant-favorite-btn:hover {
    background: rgba(255, 255, 255, 0.5);
  }

  .merchant-item .merchant-favorite-btn .icon-font-heart::before {
    font-size: 16px;
    color: #fff;
  }

.merchant-item .is-favorite .icon-font-heart::before {
  color: var(--pc);
}
/* Ribbon rows - flat design, no pills */
.ribbon-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
}

.ribbon-icon {
  font-size: 14px;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

/* Rating row - star and number orange, Review grey */
.ribbon-row.rating-ribbon {
  color: var(--sc, #FF6600);
}

  .ribbon-row.rating-ribbon .ribbon-icon {
    color: var(--sc, #FF6600);
  }

  .ribbon-row.rating-ribbon .rating-value {
    color: var(--sc, #FF6600);
    font-weight: 500;
  }

  .ribbon-row.rating-ribbon .review-label {
    color: #777;
    font-weight: 400;
    margin-left: 4px;
  }

/* Delivery row - Free Delivery and discount tag on same line */
.ribbon-row.delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

  .ribbon-row.delivery-row .delivery-fee-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000;
  }

  .ribbon-row.delivery-row .ribbon-icon {
    color: #000;
  }

/* Discount tag - dotted border, white background */
.discount-tag {
  font-size: 12px;
  font-weight: 600;
  color: #EB0038;
  background: #fff;
  border: #EB0038 1px dashed;
  border-radius: 12px;
  padding: 4px 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Delivery time row */
.ribbon-row.delivery-time-ribbon {
  color: #000;
}

  .ribbon-row.delivery-time-ribbon .ribbon-icon {
    color: #000;
  }

.merchant-item .merchant-details {
  padding: 0 12px;
  padding-left: 0;
}

.merchant-item .merchant-ribbons {
  padding: 0 12px;
  padding-left: 0;
}

.ocarousel .merchant-ribbons {
  align-items: flex-start;
}

@media (max-width: 768px) {
  .ribbon-row {
    font-size: 12px;
  }

  .ribbon-icon {
    font-size: 13px;
  }

  .discount-tag {
    font-size: 11px;
    padding: 3px 8px;
  }

  .merchant-item .merchant-name {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .merchant-ribbons {
    gap: 5px;
  }
}

[dir="rtl"] .merchant-ribbons {
  direction: rtl;
}

[dir="rtl"] .ribbon-row {
  flex-direction: row-reverse;
}

  [dir="rtl"] .ribbon-row.delivery-row .delivery-fee-item {
    flex-direction: row-reverse;
  }

[dir="rtl"] .merchant-item .merchant-favorite-btn {
  right: auto;
  left: 10px;
}
