/* Top 10 Most Popular */
.top-10-most-popular-section {
  padding-bottom: 40px;
}

.top-10-most-popular-section h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  color: #3f3b37;
  margin-bottom: 24px;
}

.top-10-most-popular-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.top-10-most-popular-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 24px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  transform: translateY(0);
  cursor: pointer;
  text-decoration: none;
}

.top-10-most-popular-item:hover {
  background-color: rgba(107, 51, 5, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: rgba(107, 51, 5, 0.2);
}

.top-10-most-popular-item-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.top-10-most-popular-item-content {
  display: flex;
  flex-direction: column;
}

.top-10-most-popular-item-content h5 {
  font-family: var(--font-family);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0;
}

.top-10-most-popular-item-content p {
  font-size: var(--fluid-14-16);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.top-10-most-popular-item-icon {
  width: 42px;
  height: 42px;
}

.top-10-most-popular-item-flag {
  width: 42px;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

.top-10-most-popular-item-arrow svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text);
}

/* Card Offer */
.card-offer-container {
  display: flex;
  flex-direction: row;
  gap: 24px;
  padding: 40px;
  border-radius: 32px;
  border: 1px solid #e5e5e5;
  background-image: linear-gradient(
    217deg,
    rgba(242, 238, 235, 1) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  margin-bottom: 60px;
  overflow: hidden;
  position: relative;
}

.card-offer {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.card-offer-img {
  width: 50%;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  height: 100%;
  transform: translateX(10%) translateY(12%);
}

.card-offer-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-offer-header h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  color: #3f3b37;
}

.card-offer-header h2 span {
  color: #8b4513;
}

.card-offer-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-offer-body p {
  font-size: var(--font-size-base);
  color: var(--color-text);
}

/* Find top 10 */
.find-top-10-section {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(242, 238, 235, 1) 0%,
    rgba(255, 255, 255, 1) 50%,
    rgba(242, 238, 235, 1) 100%
  );
}

.find-top-10-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.find-top-10-header h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  color: #3f3b37;
}

.find-top-10-header p {
  font-size: var(--fluid-16-20);
  color: var(--color-text-secondary);
  margin-bottom: 0;
  max-width: 60ch;
}

.find-top-10-search {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #e0dad1;
  border-radius: 50px;
  padding: 12px;
  background-color: #fff;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 12px 20px;
}

.find-top-10-search:hover {
  border: 2px solid var(--color-primary);
}

.find-top-10-search:focus-within {
  border-color: var(--color-primary);
}

.find-top-10-search input {
  border: none;
  outline: none;
  background-color: transparent;
  width: 100%;
  /* height: 48px; */
}

/* Market Carousel */
.market-carousel-container {
  position: relative;
  max-width: 1380px;
  margin: 10px auto 40px auto;
}

.market-carousel-container .embla {
  overflow: hidden;
  position: relative;
}

/* Override default embla styles for market carousel */
.market-carousel-container .embla__container {
  display: flex;
  user-select: none;
  -webkit-touch-callout: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin-left: 0 !important;
  width: 100%;
  min-width: 100%;
}

.market-carousel-container .embla__slide {
  flex: 0 0 450px;
  min-width: 0; 
}

.market-carousel-container .embla__viewport {
  overflow: hidden;
  width: 100%;

  /* Add Padding because slide content have a shadow */
  padding-bottom: 20px;
}

.market-carousel-container .embla__controls {
  display: flex;
  justify-content: center;
  margin-top: 0px;
}

.market-carousel-navigation {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Responsive Design for Carousel */
@media (max-width: 1024px) {  
  .market-carousel-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .market-carousel-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {  
  .market-card {
    padding: 20px;
  }
}

/* Market Card */
.market-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 24px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.market-card-header {
  text-align: center;
  margin-bottom: 20px;
}

.market-card-header h4 {
  font-weight: 500;
  color: #3f3b37;
  margin: 0;
}

.market-card-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.market-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.market-item:hover {
  background: #f8f8f8;
}

.country-flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.market-name {
  flex: 1;
  font-size: var(--fluid-14-16);
  font-weight: 500;
  color: #3f3b37;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}

.market-name:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.market-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-date {
  background: #E5E5E5;
  color: var(--color-text-secondary);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.save-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text);
  cursor: pointer;
}

.save-icon:hover {
  color: var(--color-primary);
}

/* Market Item Icon for Themes */
.market-item-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text);
  flex-shrink: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop (1024px - 1199px) */
@media (max-width: 1199px) {
  .top-10-most-popular-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  
  .card-offer-container {
    padding: 32px;
  }
  
  .find-top-10-section {
    padding: 32px 20px;
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
  .top-10-most-popular-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .top-10-most-popular-item {
    padding: 20px;
    gap: 16px;
  }
  
  .card-offer-container {
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }
  
  .card-offer {
    width: 100%;
  }
  
  .card-offer-img {
    width: 100%;
    position: relative;
    transform: none;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 16px;
  }
  
  .find-top-10-header h2 {
    font-size: var(--fluid-28-36);
  }
  
  .find-top-10-header p {
    max-width: 50ch;
  }
  
  .find-top-10-search {
    max-width: 400px;
  }
  
  .market-card {
    padding: 20px;
  }
  
  .market-item {
    padding: 10px;
    gap: 10px;
  }
  
  .market-name {
    font-size: 14px;
  }
  
  .market-date {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* Tablet Portrait (481px - 767px) */
@media (max-width: 767px) {
  .top-10-most-popular-section {
    padding-bottom: 32px;
  }
  
  .top-10-most-popular-section h2 {
    font-size: var(--fluid-24-32);
    margin-bottom: 20px;
  }
  
  .top-10-most-popular-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .top-10-most-popular-item {
    padding: 16px;
    gap: 12px;
  }
  
  .top-10-most-popular-item-left {
    gap: 10px;
  }
  
  .top-10-most-popular-item-content h5 {
    font-size: 16px;
  }
  
  .top-10-most-popular-item-content p {
    font-size: 14px;
  }
  
  .top-10-most-popular-item-icon {
    width: 42px;
    height: 32px;
  }
  
  .top-10-most-popular-item-arrow svg {
    width: 24px;
    height: 24px;
  }
  
  .card-offer-container {
    padding: 20px;
    border-radius: 24px;
    margin-bottom: 40px;
  }
  
  .card-offer-header h2 {
    font-size: var(--fluid-18-24);
  }
  
  .card-offer-body p {
    font-size: 15px;
  }
  
  .find-top-10-section {
    padding: 24px 16px;
    gap: 20px;
  }
  
  .find-top-10-header {
    gap: 10px;
  }
  
  .find-top-10-header h2 {
    font-size: var(--fluid-24-32);
  }
  
  .find-top-10-header p {
    font-size: var(--fluid-14-16);
    max-width: 40ch;
  }
  
  .find-top-10-search {
    max-width: 100%;
    padding: 10px 16px;
  }
  
  .find-top-10-search input {
    font-size: 14px;
  }
  
  .market-card {
    padding: 16px;
  }
  
  .market-card-header h4 {
    font-size: 16px;
  }
  
  .market-item {
    padding: 8px;
    gap: 8px;
  }
  
  .country-flag {
    width: 20px;
    height: 14px;
  }
  
  .market-item-icon {
    width: 20px;
    height: 20px;
  }
  
  .market-name {
    font-size: 13px;
  }
  
  .market-date {
    font-size: 11px;
    padding: 2px 6px;
  }
  
  .save-icon {
    width: 20px;
    height: 20px;
  }
  
  .market-carousel-navigation {
    gap: 12px;
  }
}

/* Mobile Large (375px - 480px) */
@media (max-width: 480px) {
  .market-carousel-container .embla__slide {
    /* Fix for mobile */
    flex: 0 0 100%;
  }
  
  .top-10-most-popular-section {
    padding-bottom: 24px;
  }
  
  .top-10-most-popular-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
  }
  
  .top-10-most-popular-item {
    padding: 12px;
    gap: 10px;
    border-radius: 16px;
  }
  
  .top-10-most-popular-item-left {
    gap: 8px;
  }
  
  .top-10-most-popular-item-content h5 {
    font-size: 15px;
  }
  
  .top-10-most-popular-item-content p {
    font-size: 13px;
  }
  
  .top-10-most-popular-item-arrow svg {
    width: 20px;
    height: 20px;
  }
  
  .card-offer-container {
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 32px;
  }
  
  .card-offer {
    gap: 16px;
  }
  
  .card-offer-header h2 {
    font-size: 20px;
  }
  
  .card-offer-body p {
    font-size: 14px;
  }
  
  .card-offer-img {
    max-height: 200px;
  }
  
  .find-top-10-section {
    padding: 20px 12px;
    gap: 16px;
  }
  
  .find-top-10-header h2 {
    font-size: 22px;
  }
  
  .find-top-10-header p {
    font-size: 14px;
    max-width: 35ch;
  }
  
  .find-top-10-search {
    padding: 8px 12px;
  }
  
  .find-top-10-search input {
    font-size: 13px;
  }
  
  .market-card {
    padding: 12px;
    border-radius: 12px;
  }
  
  .market-card-header {
    margin-bottom: 16px;
  }
  
  .market-card-header h4 {
    font-size: 15px;
  }
  
  .market-card-list {
    gap: 6px;
  }
  
  .market-item {
    gap: 6px;
    border-radius: 6px;
  }
  
  .country-flag {
    width: 18px;
    height: 12px;
  }
  
  .market-item-icon {
    width: 18px;
    height: 18px;
  }
  
  .market-name {
    font-size: 12px;
  }
  
  .market-date {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 4px;
  }
  
  .save-icon {
    width: 18px;
    height: 18px;
  }
  
  .market-carousel-navigation {
    gap: 8px;
  }
}

/* Top 10 Countries Section */
.top-10-countries-section {
  padding: 60px 0;
  background: #ffffff;
}

.top-10-countries-header {
  text-align: center;
  margin-bottom: 40px;
}

.top-10-countries-header h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  font-size: var(--fluid-32-48);
  color: #3f3b37;
  margin-bottom: 12px;
}

.top-10-countries-header p {
  font-size: var(--fluid-16-20);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Search and Filter */
.top-10-search-filter {
  margin-bottom: 40px;
}

.top-10-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 2px solid #e5e5e5;
  border-radius: 50px;
  padding: 14px 24px;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.top-10-search-bar:hover {
  border-color: #6b3305;
}

.top-10-search-bar:focus-within {
  border-color: #6b3305;
  box-shadow: 0 0 0 3px rgba(107, 51, 5, 0.1);
}

.top-10-search-bar i {
  width: 20px;
  height: 20px;
  color: #6b3305;
}

.top-10-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #3f3b37;
  background: transparent;
}

.top-10-search-bar input::placeholder {
  color: #999;
}

/* Region Filter Tabs */
.region-filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.region-tab {
  padding: 10px 20px;
  border: 1px solid #e5e5e5;
  border-radius: 50px;
  background: #ffffff;
  color: #3f3b37;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.region-tab:hover {
  background: rgba(107, 51, 5, 0.05);
  border-color: rgba(107, 51, 5, 0.2);
}

.region-tab.active {
  background: #6b3305;
  color: #ffffff;
  border-color: #6b3305;
}

/* Countries Grid */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  max-height: 620px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.countries-grid.expanded {
  max-height: none;
}

.country-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(107, 51, 5, 0.2);
}

.country-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.country-card-header {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.country-flag-large {
  width: 60px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.favorite-btn:hover {
  background: rgba(107, 51, 5, 0.05);
  border-color: #6b3305;
}

.favorite-btn i {
  width: 16px;
  height: 16px;
  color: #999;
  transition: all 0.3s ease;
}

.favorite-btn:hover i {
  color: #6b3305;
}

.favorite-btn.favorited {
  background: #C61010;
  border-color: #C61010;
}

.favorite-btn.favorited i,
.favorite-btn.favorited svg {
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

.favorite-btn.favorited svg path {
  stroke: #ffffff !important;
  fill: #ffffff !important;
}

.country-card-body {
  padding: 16px;
}

.country-card-body h4 {
  font-size: 16px;
  font-weight: 600;
  color: #3f3b37;
  margin-bottom: 4px;
}

.country-region {
  font-size: 13px;
  color: #6b3305;
  margin-bottom: 12px;
}

.country-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.last-updated {
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  padding: 3px 8px;
  border-radius: 10px;
}

.card-arrow {
  width: 18px;
  height: 18px;
  color: #6b3305;
  transition: transform 0.3s ease;
}

.country-card:hover .card-arrow {
  transform: translateX(4px);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 40px;
}

/* Responsive Design for Countries Section */
@media (max-width: 1024px) {
  .countries-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
  
  .region-filter-tabs {
    gap: 6px;
  }
  
  .region-tab {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .top-10-countries-section {
    padding: 40px 0;
  }
  
  .top-10-countries-header h2 {
    font-size: var(--fluid-28-36);
  }
  
  .top-10-countries-header p {
    font-size: var(--fluid-14-16);
  }
  
  .countries-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-height: 540px;
  }
  
  .country-card-header {
    height: 120px;
  }
  
  .country-flag-large {
    width: 60px;
  }
  
  .country-card-body {
    padding: 16px;
  }
  
  .country-card-body h4 {
    font-size: 16px;
  }
  
  .top-10-search-bar {
    padding: 12px 20px;
  }
  
  .top-10-search-bar input {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .countries-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 480px;
  }
  
  .region-filter-tabs {
    gap: 4px;
  }
  
  .region-tab {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .country-card-header {
    height: 100px;
  }
  
  .country-flag-large {
    width: 50px;
  }
  
  .favorite-btn {
    width: 30px;
    height: 30px;
  }
  
  .favorite-btn i {
    width: 16px;
    height: 16px;
  }
  
  .country-card-body {
    padding: 12px;
  }
  
  .country-card-body h4 {
    font-size: 14px;
  }
  
  .country-region {
    font-size: 12px;
    margin-bottom: 12px;
  }
  
  .last-updated {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .card-arrow {
    width: 16px;
    height: 16px;
  }
}

/* Mobile Small (320px - 374px) */
@media (max-width: 374px) {
  .top-10-most-popular-section h2 {
    font-size: 22px;
  }
  
  .top-10-most-popular-item {
    padding: 10px;
    gap: 8px;
  }
  
  .top-10-most-popular-item-content h5 {
    font-size: 14px;
  }
  
  .top-10-most-popular-item-content p {
    font-size: 12px;
  }
  
  .card-offer-container {
    padding: 12px;
  }
  
  .card-offer-header h2 {
    font-size: 18px;
  }
  
  .card-offer-body p {
    font-size: 13px;
  }
  
  .find-top-10-header h2 {
    font-size: 20px;
  }
  
  .find-top-10-header p {
    font-size: 13px;
  }
  
  .market-card {
    padding: 10px;
  }
  
  .market-item {
    padding: 5px;
    gap: 5px;
  }
  
  .market-name {
    font-size: 11px;
  }
  
  .market-date {
    font-size: 9px;
    padding: 1px 3px;
  }
}