/* Merchant Page Redesign - Figma Match */

:root {
  --primary-color: #d4002c;
  --star-color: #ffc107;
  --rating-bg: #fff8e1;
  --delivery-bg: #fff0f0;
  --time-bg: #fff7ed;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
}

.merchant-page-container {
  --font-main: 'Outfit', 'Inter', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-family: var(--font-main);
}

.merchant-header-new {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: #fff;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.merchant-cover-photo {
  height: 320px;
  width: 100%;
  background: #eee;
}

  .merchant-cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

.merchant-header-content {
  padding: 0 40px 30px;
  position: relative;
  margin-top: -100px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.merchant-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 10;
}

.merchant-profile-logo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 8px solid #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: #fff;
}

  .merchant-profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

.super-restaurant-badge {
  background: #ffc107;
  color: #000;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.4);
  text-transform: capitalize;
  white-space: nowrap;
}

  .super-restaurant-badge i {
    font-size: 12px;
  }

.merchant-info-area {
  flex: 1;
  margin-top: 110px;
}

  .merchant-info-area h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #111;
  }

.merchant-description {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 800px;
}

.merchant-info-chips {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.info-chip {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.chip-rating {
  background: var(--rating-bg);
  color: #b45309;
  border-color: #fde68a;
}

.chip-delivery {
  background: var(--delivery-bg);
  color: #dc2626;
  border-color: #fecaca;
}

.chip-time {
  background: var(--time-bg);
  color: #ea580c;
  border-color: #ffedd5;
}

.merchant-actions {
  display: flex;
  gap: 30px;
  align-items: center;
}

.btn-subscribe {
  background: #10b981;
  color: #fff;
  padding: 10px 35px;
  border-radius: 40px;
  font-weight: 700;
  border: none;
  transition: all 0.3s;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

  .btn-subscribe:hover {
    background: #059669;
    transform: translateY(-2px);
  }

.btn-call {
  border: 1px solid #ddd;
  color: #444;
  padding: 10px 25px;
  border-radius: 40px;
  font-weight: 700;
  background: #fff;
  transition: all 0.3s;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

  .btn-call:hover {
    background: #f8f8f8;
    border-color: #ccc;
  }

.merchant-location-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #888;
  line-height: 1.4;
}

  .merchant-location-address i {
    color: #d4002c;
    margin-top: 3px;
  }

  .merchant-location-address span {
    font-weight: 700;
    color: #444;
  }

/* Promotions/Coupons - Figma QuickBite */
.promotions-container.coupon-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 10px;
  scrollbar-width: none;
  align-items: center;
  position: relative;
  font-family: 'Rubik', 'Outfit', 'Inter', sans-serif;
}

.coupon-card {
  min-width: 362px;
  width: 362px;
  height: 77px;
  flex-shrink: 0;
  background: #fff5f7;
  border-radius: 12px;
  border: 1px dashed rgba(235, 0, 56, 0.2);
  position: relative;
}

  .coupon-card::before,
  .coupon-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    left: -11px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px dashed rgba(235, 0, 56, 0.2);
    clip-path: inset(0 0 0 50%);
  }

  .coupon-card::after {
    left: auto;
    right: -12px;
    clip-path: inset(0 50% 0 0);
  }

  .coupon-card.coupon-applied {
    background: #f5f5f5;
  }

.coupon-card-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  padding: 0 24px;
}

.coupon-logo {
  flex-shrink: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 3px solid #fff;
  overflow: hidden;
  background: #d22e00;
}

  .coupon-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

.coupon-logo-placeholder {
  width: 100%;
  height: 100%;
  background: #d22e00;
}

.coupon-divider {
  width: 1px;
  height: 59px;
  border-left: 1px dashed rgba(235, 0, 56, 0.2);
  flex-shrink: 0;
}

.coupon-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

  .coupon-info h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    text-transform: uppercase;
  }

    .coupon-info h5 .coupon-discount {
      color: #eb0038;
      font-weight: 600;
    }

  .coupon-info p {
    margin: 0;
    font-size: 12px;
    color: #000;
  }

.coupon-applied .coupon-info h5,
.coupon-applied .coupon-info p {
  color: #333;
}

.btn-coupon-action {
  flex-shrink: 0;
  background: #ff6600;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.btn-apply-coupon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.coupon-applied-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #6b7280;
}

.coupon-applied .btn-coupon-action {
  background: #6b7280;
}

.coupon-btn-text-mobile {
  display: none;
}

.coupon-btn-text-desktop {
  display: inline;
}

.coupon-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.coupon-nav-prev {
  left: 0;
}

.coupon-nav-next {
  right: 0;
}

.coupon-nav-btn [class^="icon-font-"] {
  font-size: 14px;
}

/* Category Navigation - Figma QuickBite */
.sticky-nav-container {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eff6ff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 30px;
  border-radius: 4px;
  font-family: 'Rubik', 'Outfit', 'Inter', sans-serif;
}

.sticky-nav-search-wrap {
  flex-shrink: 0;
  width: 350px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 10px;
  border-right: 1px solid #e5e4ee;
}

.sticky-nav-search-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  font-size: 15px;
  color: #767484;
}

.sticky-nav-search-wrap .product-search-box {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  flex: 1;
}

  .sticky-nav-search-wrap .product-search-box .product-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .sticky-nav-search-wrap .product-search-box .search-box-text {
    flex: 1;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    color: #767484;
    outline: none;
  }

    .sticky-nav-search-wrap .product-search-box .search-box-text::placeholder {
      color: #767484;
    }

  .sticky-nav-search-wrap .product-search-box .search-box-button {
    display: none;
  }

.search-box form {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  justify-content: flex-end;
}

.category-nav-tabs {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0 10px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.nav-tab {
  font-size: 14px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  padding: 15px 10px;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

  .nav-tab.active {
    font-weight: 500;
    color: #d22e00;
    border-bottom: 2px solid #d22e00;
  }

/* Products Layout */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
}

  .section-title::before {
    content: '\e071';
    font-family: 'icon-font';
    font-weight: 500;
    color: #ea580c;
    font-size: 26px;
  }

.btn-see-all {
  background: #ea580c;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 20px;
  text-decoration: none !important;
}

.products-grid-wrap {
  position: relative;
  margin-bottom: 40px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 0;
}

  .products-grid.swiper.products-swiper {
    display: block;
    overflow: hidden;
  }

  .products-grid.swiper .swiper-wrapper {
    align-items: stretch;
  }

  .products-grid.swiper .swiper-slide {
    height: auto;
  }

    .products-grid.swiper .swiper-slide .product-item {
      height: 100%;
      margin-top: 4px;
    }

    .products-grid.swiper .swiper-slide .product-card {
      height: 100%;
    }

.products-swiper .products-swiper-btn-prev,
.products-swiper .products-swiper-btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  color: #333;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.products-swiper .products-swiper-btn-prev {
  left: -12px;
}

.products-swiper .products-swiper-btn-next {
  right: -12px;
}

  .products-swiper .products-swiper-btn-prev:hover,
  .products-swiper .products-swiper-btn-next:hover {
    background: #ff5722;
    color: #fff;
  }

  .products-swiper .products-swiper-btn-prev::after,
  .products-swiper .products-swiper-btn-next::after {
    font-size: 16px;
    font-weight: 700;
    font-family: 'icon-font';
  }

  .products-swiper .products-swiper-btn-next::after {
    content: '\e012';
  }

.products-swiper .products-swiper-btn-prev::after {
  content: '\e010';
}

.category-section {
  margin-bottom: 40px;
}

/* Add extra bottom margin to category section for button overflow */
.products-wrapper .category-section:last-child {
  margin-bottom: 20px;
}

/* Product item wrapper - transparent to not interfere with design */
.products-grid .product-item {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.product-card {
  background: #fff;
  border-radius: 14px;
  overflow: visible;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

  .product-card:hover {
    transform: translateY(-2px);
  }

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FF0054;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(255, 0, 84, 0.3);
}

.product-image {
  width: 100%;
  height: auto;
  aspect-ratio: 5/3;
  object-fit: cover;
  border-radius: 5px;
}

.product-image-link {
  display: block;
  position: relative;
  text-decoration: none;
}

.product-details {
  padding: 16px 10px 20px;
}

.product-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #000;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

  .product-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s;
  }

    .product-title a:hover {
      color: #FF0054;
    }

.product-cuisine {
  display: block;
  font-size: 13px;
  color: #888;
  margin: 0 0 10px 0;
  text-align: left;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

.price-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

  .price-box .old-price {
    order: 1;
  }

  .price-box .actual-price {
    order: 2;
  }

  .price-box .discount-percent {
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
  }

.actual-price {
  font-size: 17px;
  font-weight: 700;
  color: #FF0054;
}

.old-price {
  font-size: 14px;
  color: #888;
  text-decoration: line-through;
}

.discount-percent {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #FF0054;
  padding: 4px 12px;
  border-radius: 9999px;
}

.btn-add-to-cart {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff5722;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  font-weight: 300;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.45);
  transition: all 0.3s;
  padding: 0;
  line-height: 1;
  z-index: 3;
}

  .btn-add-to-cart span {
    color: #fff;
    display: block;
    margin-top: -2px;
  }

  .btn-add-to-cart:hover {
    background: #E64A19;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 87, 34, 0.5);
  }

.no-result {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

  .no-result p {
    font-size: 16px;
    margin: 0;
  }

/* Merchant Favorite Button */
.btn-favorite-merchant {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

  .btn-favorite-merchant .btn-text {
    font-size: 14px;
    font-weight: 600;
  }

  .btn-favorite-merchant .icon-font-heart {
    font-size: 0;
  }

  .btn-favorite-merchant span:before {
    font-size: 14px;
    transition: all 0.3s;
  }

  .btn-favorite-merchant:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
  }

  .btn-favorite-merchant.is-favorite {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
  }

    .btn-favorite-merchant.is-favorite i {
      font-weight: 900;
    }

/* Header Favorites Button */
.header-favorites-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.3s;
}

  .header-favorites-button:hover {
    color: #dc2626;
  }

.header-favorites-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Merchant Closed Status Badge */
.merchant-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

  .merchant-status-badge.closed {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
  }

/* Merchant Item Closed Styling */
.merchant-item.merchant-closed {
  opacity: 0.75;
  filter: grayscale(30%);
}

  .merchant-item.merchant-closed:hover {
    opacity: 0.9;
    filter: grayscale(20%);
  }

  .merchant-item.merchant-closed .picture {
    position: relative;
  }

  .merchant-item.merchant-closed .product-title a {
    color: #6b7280;
  }

/* Media Queries */
@media only screen and (max-width: 768px) {
  .coupon-card {
    min-width: 100%;
    width: 100%;
  }

  .coupon-btn-text-desktop {
    display: none;
  }

  .coupon-btn-text-mobile {
    display: inline;
  }

  .sticky-nav-container {
    background: #fff;
    border-radius: 0;
    border-bottom: 1px solid #767484;
  }

  .sticky-nav-search-wrap {
    display: none;
  }

  .category-nav-tabs {
    width: 100%;
    gap: 10px;
    padding: 0 10px;
  }

  .nav-tab {
    padding: 10px;
  }

    .nav-tab.active {
      border-bottom-width: 2px;
    }
}

@media all and (max-width: 768px) {
  .products-grid .swiper-slide {
    text-align: left;
  }

  .product-details {
    text-align: left;
  }

  .product-title {
    font-size: 14px;
  }

  .product-cuisine {
    font-size: 12px;
  }

  .actual-price {
    font-size: 15px;
  }

  .old-price {
    font-size: 12px;
  }

  .discount-percent {
    font-size: 11px;
  }

  .products-swiper .products-swiper-btn-prev,
  .products-swiper .products-swiper-btn-next {
    width: 30px;
    height: 30px;
  }

  .products-swiper .products-swiper-btn-prev {
    left: 0;
  }

  .products-swiper .products-swiper-btn-next {
    right: 0;
  }

    .products-swiper .products-swiper-btn-prev::after,
    .products-swiper .products-swiper-btn-next::after {
      font-size: 14px;
    }
}

@media all and (min-width: 1001px) {
  .products-grid.swiper .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    flex-wrap: wrap;
  }

  .products-grid.swiper .swiper-slide {
    width: auto !important;
    height: auto !important;
  }

  .products-swiper .products-swiper-btn-prev,
  .products-swiper .products-swiper-btn-next {
    display: none;
  }
}

/* Merchant Banner Styles */
.merchant-banner-container {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius-lg, 16px);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.merchant-banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.merchant-banner-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 40px 25px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.merchant-banner-title h1 {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media only screen and (max-width: 768px) {
  .merchant-banner-container {
    border-radius: 0;
    margin-bottom: 15px;
  }

  .merchant-banner-title {
    padding: 20px 20px 15px;
  }

  .merchant-banner-title h1 {
    font-size: 22px;
  }
}
