/* Merchant Page Styles */

/* Roboto Font Family */

*{
    font-family: 'Roboto', sans-serif !important;
}

.fa,
.fas,
.far,
.fal,
.fab,
[class*="fa-"] {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* Banner Section */
.merchant-banner {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 60px;
  position: relative;
  margin-top: 70px;
}



.merchant-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.merchant-banner-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 30px;
}

.banner-text-left {
  flex: 1;
  min-width: 300px;
}

.banner-main-title {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Milliard', sans-serif;
}

.banner-subtitle {
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  font-weight: 400;
}

.banner-text-right {
  flex: 1;
  text-align: right;
  min-width: 300px;
}

.banner-circuit-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Main Content Section */
.merchant-content {
  background: #f4f4f4;
  padding: 60px 0;
  min-height: 600px;
}

/* Mobile Filter Button */
.mobile-filter-btn {
  display: none;
  background: unset;
  align-items: center;
  gap: 8px;
  padding: 0px;
  border: unset;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #777777;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-filter-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mobile-filter-btn i {
  font-size: 18px;
}

/* Filter Drawer Overlay */
.filter-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-drawer-overlay.active {
  display: block;
  opacity: 1;
}

/* Filter Drawer */
.filter-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.filter-drawer.active {
  right: 0;
}

.filter-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.filter-drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin: 0 0 5px 0;
}

.filter-drawer-count {
  font-size: 14px;
  color: #666666;
  margin: 0;
}

.filter-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #000000;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.filter-drawer-close:hover {
  color: #ff0000;
}

.filter-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.filter-sort-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.filter-sort-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 10px;
}

.filter-sort-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  color: #000000;
  background: #ffffff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.filter-drawer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  gap: 15px;
}

.filter-remove-all {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.filter-remove-all:hover {
  color: #ff0000;
}

.filter-apply {
  flex: 1;
  padding: 14px 16px;
  background: #ff0000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.filter-apply:hover {
  background: #333333;
}

/* Filters Sidebar (Desktop) */
.merchant-filters.desktop-filters {
  margin-top: 0px !important;
  margin-bottom: 0px;
  background: #ffffff;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 60px 55px;
  height: fit-content;
}

.filters-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.filter-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 15px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  transition: color 0.3s ease;
}

.filter-toggle:hover {
  color: #ff0000;
}

.filter-toggle i {
  transition: transform 0.3s ease;
  font-size: 14px;
  color: #666666;
  margin-left: 10px;
}

.filter-toggle:hover i {
  color: #ff0000;
}

.filter-toggle.active i {
  transform: rotate(90deg);
  color: #ff0000;
}

.filter-content {
  padding: 15px 0;
}

.filter-content label {
  display: block;
  padding: 8px 0;
  cursor: pointer;
  color: #666666;
  font-size: 14px;
}

.filter-content input[type="checkbox"] {
  margin-right: 10px;
}

/* Products Grid */
.merchant-products {
  padding: 0px !important;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: auto;
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  min-height: auto; 
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: #ffffff;
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  z-index: 1;
}


.product-image[data-image-index="0"] {
  opacity: 1;
  z-index: 1;
}

/* Show second image on hover (when slider is not active) */
.product-card:not(.slider-active):hover .product-image[data-image-index="0"] {
  opacity: 0;
}

.product-card:not(.slider-active):hover .product-image[data-image-index="1"] {
  opacity: 1;
  z-index: 2;
}

/* When slider is used, active class controls visibility */
.product-card.slider-active .product-image-active {
  opacity: 1 !important;
  z-index: 2;
}

.product-card.slider-active .product-image:not(.product-image-active) {
  opacity: 0 !important;
}

/* Slider Navigation Buttons */
.product-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.3s ease;
  opacity: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-slider-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.product-slider-btn i {
  font-size: 14px;
  color: #000000;
}

.product-slider-prev {
  left: 10px;
}

.product-slider-next {
  right: 10px;
}

.product-image-wrapper:hover .product-slider-btn {
  opacity: 1;
}

/* Image Counter */
.product-image-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-image-wrapper:hover .product-image-counter {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: 0px;
  right: 0cm;
  background: #D10606;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
}

.product-info-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-actions{
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: 0px;
}

.product-details-wrapper {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0px;
}

.product-details {
  font-size: 12px;
  color: #666666;
  line-height: 1  ;
  margin: 0;
  white-space: pre-line;
  text-overflow: ellipsis;
  overflow: hidden;
}

.product-variant {
  font-size: 12px;
  color: #666666;
  line-height: 1;
  margin: 0;
  white-space: pre-line;
  text-overflow: ellipsis;
  overflow: hidden;
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin: 0;
  white-space: nowrap;
}

.btn-buy {
  background: #D10606;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-transform: none;
}

.btn-buy:hover {
  background: #cc0000;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-buy:active {
  transform: translateY(0);
}

.marketplace-popover {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 8px 0;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.marketplace-popover-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  text-decoration: none;
  color: #000000;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.marketplace-popover-link:hover {
  background: #f5f5f5;
  color: #000000;
}

.marketplace-popover-link img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.marketplace-popover-link span {
  font-size: 14px;
  font-weight: 500;
}

.product-marketplaces {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 4px;
  min-width: 0;
  justify-content: flex-end;
}

.marketplace-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.marketplace-link:hover {
  transform: translateY(-2px);
}

.marketplace-icon {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: #ffffff;
  position: relative;
}



.marketplace-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
  max-width: 100%;
  max-height: 100%;
}

.marketplace-label {
  font-size: 10px;
  color: #666666;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
  text-transform: capitalize;
}

.marketplace-link:hover .marketplace-label {
  color: #000000;
}

/* Load More Button */
.load-more-container {
width: 90% !important;
cursor: pointer;
margin: auto;
  text-align: center;
border-radius: 8px;
  height: 40px;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  background-color: #D10606;
}

.load-more-text {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 0px;
}

.btn-load-more {
  background: #ff0000;
  color: #ffffff;
  border: none;
  padding: 15px 60px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0px;
}

.btn-load-more:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.btn-load-more:active {
  transform: translateY(0);
}

@media (min-width:1400px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: auto;
    gap: 20px;
  }
}

@media (max-width:1400px) and (min-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: auto;
    gap: 20px;
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .merchant-products {
    padding-left: 0;
    margin-top: 30px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .banner-main-title {
    font-size: 36px;
  }

  .banner-circuit-name {
    font-size: 16px;
  }

  /* Hide desktop filters on tablet and mobile */
  .merchant-filters.desktop-filters {
    display: none;
  }
}

/* Desktop banner image */
@media (min-width: 769px) {
  .merchant-banner {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
}

@media (max-width: 768px) {
  .merchant-banner {
    min-height: 300px;
    padding: 100px 20px 40px;
    background-size: contain;
  }

  .merchant-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .banner-text-right {
    text-align: center;
  }

  .banner-main-title {
    font-size: 28px;
  }

  .banner-subtitle {
    font-size: 16px;
  }

  .banner-circuit-name {
    font-size: 14px;
  }

  .merchant-content {
    padding: 40px 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  /* Show mobile filter button */
  .mobile-filter-btn {
    display: flex;
  }

  /* Hide desktop filters */
  .merchant-filters.desktop-filters {
    display: none;
  }

  .product-info {
    padding: 15px;
    flex-direction: column;
    align-items: flex-start;
  }

  .product-info-detail {
    width: 100%;
  }



  .marketplace-icon {
    width: 35px;
    height: 35px;
  }

  .marketplace-label {
    font-size: 9px;
  }

  .product-slider-btn {
    width: 32px;
    height: 32px;
    opacity: 1;
  }

  .product-slider-btn i {
    font-size: 12px;
  }

  .product-slider-prev {
    left: 5px;
  }

  .product-slider-next {
    right: 5px;
  }

  .product-image-counter {
    opacity: 1;
    font-size: 10px;
    padding: 3px 8px;
    bottom: 5px;
    right: 5px;
  }

  .btn-buy {
    padding: 8px 16px;
    font-size: 12px;
  }

  .marketplace-popover {
    min-width: 180px;
    gap: 10px;
  }

  .marketplace-popover-link {
    padding: 8px 12px;
    gap: 10px;
  }

  .marketplace-popover-link img {
    width: 28px;
    height: 28px;
  }

  .marketplace-popover-link span {
    font-size: 12px;
  }

  .product-title {
    font-size: 12px;
  }

  .product-price {
    font-size: 14px;
  }

  .btn-load-more {
    padding: 12px 40px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto !important;
    gap: 23px 4px;
    min-height: 300px !important; 
  }

  .banner-main-title {
    font-size: 24px;
  }

  .product-card {
    max-height: none !important; 
    min-height: auto !important; 
  }

  .product-info {
    padding: 8px;
  }
}

/* Performance Optimizations */
.product-image {
  will-change: transform;
}

.product-card {
  will-change: transform;
}

/* Print Styles */
@media print {
  .merchant-filters,
  .btn-load-more,
  .btn-buy {
    display: none;
  }
}

.popover-body {
    padding: 0px !important;
}
