/* Instagram-style Mobile Feed Layout */
/* Mobile First Approach */

:root {
  --primary-color: #92041d;
  --secondary-color: #92041d;
  --border-color: #e5e5e5;
  --text-dark: #262626;
  --text-light: #8e8e8e;
  --bg-white: #ffffff;
  --bg-light: #fafafa;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  /* Padding only added when navbar is visible via body.with-bottom-nav in bottom-nav.css */
}

/* Add bottom padding only when navbar is visible for logged-in users */
body.with-bottom-nav {
  padding-bottom: 80px;
}

/* Shared mobile-width container (aligns with product detail) */
.detail-container {
  max-width: 470px;
  margin: 0 auto;
  min-height: 100vh;
  padding-top: 0px; /* header height */
  padding-bottom: 0px; /* safe space above bottom nav */
}

/* Avoid double top padding when feed is inside the container */
.detail-container .feed-container {
  padding-top: 0;
}

/* Mobile Header - Fixed */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 12px 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mobile-header .logo {
  height: 36px;
  width: auto;
}

.mobile-header .header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.mobile-header .search-btn,
.mobile-header .menu-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dark);
  cursor: pointer;
}

/* Main Feed Container */
.feed-container {
   max-width: 470px;
  margin: 0 auto;
  min-height: 100vh;
  padding-top: 60px; /* Mobile header fixed at top - same as header height */
  padding-bottom: 0px; /* No extra padding - body already has 80px bottom-nav space */
}

/* Hero Section - Mobile Optimized */
.hero-section {
  padding: 12px 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), #92041d);
  color: white;
  margin-bottom: 0;
}

.hero-section h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.hero-section p {
  font-size: 14px;
  margin: 0 0 20px 0;
  opacity: 0.9;
}

.hero-section .cta-button {
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-section .cta-button:hover {
  transform: translateY(-1px);
}

/* Product Feed */
.product-feed {
  background: var(--bg-white);
}

.section-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  border-spacing: 2px;
  background: var(--bg-white);
  position: sticky;
  top: 60px;
  margin-bottom: 6px;
  z-index: 50;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-right {
  position: relative;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

.item-counter {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 400;
}

/* Sort Dropdown */
.sort-dropdown {
  position: relative;
}

.sort-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sort-button:hover {
  background: white;
  border-color: var(--primary-color);
}

.sort-button i {
  font-size: 12px;
}

.sort-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  z-index: 100;
  display: none;
  overflow: hidden;
}

.sort-menu.show {
  display: block;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.sort-option:last-child {
  border-bottom: none;
}

.sort-option:hover {
  background: var(--bg-light);
}

.sort-option.active {
  background: rgba(220, 53, 69, 0.1);
  color: var(--primary-color);
}

.sort-option i {
  font-size: 12px;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .section-header {
    padding: 12px 16px;
  }
  
  .header-left h2 {
    font-size: 16px;
  }
  
  .sort-button {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .sort-menu {
    min-width: 120px;
  }
  
  .sort-option {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .show-more-container {
    padding: 20px 16px;
  }
  
  .show-more-button {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Login Modal Styles */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.login-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.login-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-modal-header {
  padding: 20px 20px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.login-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: var(--text-dark);
}

.login-modal-body {
  padding: 0 20px 20px 20px;
}

.modal-tabs {
  display: flex;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 4px;
}

.tab-button {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.modal-description {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.login-modal .form-group {
  margin-bottom: 16px;
}

.login-modal .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.login-modal .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.login-modal .form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.modal-btn-primary {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}

.modal-btn-primary:hover {
  background: #92041d;
  color: white;
  text-decoration: none;
}

.register-redirect {
  text-align: center;
}

.register-info {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.register-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.register-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.register-info p {
  margin: 0;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.4;
}

.section-header .view-all {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* Product Cards - Instagram Style */
.product-card {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-header-row { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; }
.product-header { display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit; }
.header-share-btn { background:none; border:1px solid var(--border-color); border-radius:999px; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; color:var(--text-dark); }
.header-share-btn:hover { background: var(--bg-light); }

.seller-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.seller-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text-dark);
}

.seller-info p {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
}

/* Product Image Container with Overlays */
.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Auth-only overlay action buttons on cards */
.card-share-btn,
/* remove floating overlay action buttons (moved to header/title row) */

/* Price Badge Overlay - Bottom Right in Image */
.price-badge-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.price-badge-overlay.net {
  background: rgba(40, 167, 69, 0.9);
  color: white;
}

.price-badge-overlay.nego {
  background: rgba(255, 193, 7, 0.9);
  color: #212529;
}

.product-content {
  padding: 12px 16px;
}

.title-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.product-title { font-size: 16px; font-weight: 600; margin: 0 0 4px 0; color: var(--text-dark); }
.like-inline-btn{ background:none; border:1px solid var(--border-color); border-radius:999px; width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; color:var(--text-dark); }
.like-inline-btn.active, .like-inline-btn:hover{ background:var(--primary-color); color:#fff; border-color:transparent; }

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 8px 0;
}

/* Updated Product Meta Layout */
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.product-location {
  font-size: 12px;
  color: var(--text-light);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

/* Category Badge - Far Right with High Contrast */
.product-category-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), #f79696);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show More Container */
.show-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  background: var(--bg-white);
  width: 100%;
  text-align: center;
}

/* Show More Button */
.show-more-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  justify-content: center;
}

.show-more-button:hover {
  background: #92041d;
  transform: translateY(-1px);
}

.show-more-button:active {
  transform: translateY(0);
}

.show-more-button:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  transform: none;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Category Filter Section */
.filter-section {
  padding: 16px;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-section::-webkit-scrollbar {
  display: none;
}

.filter-container {
  display: flex;
  gap: 12px;
  padding-bottom: 4px;
}

.filter-item {
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-item:hover {
  transform: translateY(-2px);
}

.filter-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 2px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.filter-item.active .filter-badge {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.filter-item:not(.active) .filter-badge div {
  background: linear-gradient(45deg, var(--secondary-color), #5a6268) !important;
}

.filter-item.active .filter-badge div {
  background: linear-gradient(45deg, var(--primary-color), #c82333) !important;
}

.filter-badge img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.filter-label {
  font-size: 12px;
  color: var(--text-dark);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  transition: color 0.3s ease;
}

.filter-item.active .filter-label {
  color: var(--primary-color);
  font-weight: 600;
}

/* Loading Animation */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tablet and Desktop Responsive */
@media (min-width: 768px) {
  .feed-container {
    max-width: 470px;
    margin: 0 auto;
    min-height: 100vh;
    padding-top: 60px; /* header height - fixed at top */
    padding-bottom: 0px; /* body already has 80px padding for bottom nav */
  }
  
  /* Desktop: keep homepage header stuck to top, full-width */
  .mobile-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    z-index: 101;
  }
  
  .hero-section {
    padding: 40px 24px;
  }
  
  .hero-section h1 {
    font-size: 32px;
  }
  
  .product-content {
    padding: 16px 20px;
  }
}

@media (min-width: 1024px) {
  .feed-container {
    max-width: 470px;
  }
  
  .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Touch improvements */
.product-card,
.action-btn,
.cta-button,
.view-all {
  -webkit-tap-highlight-color: transparent;
}

/* Footer Section */
.footer-section {
  background: var(--text-dark);
  color: white;
  padding: 32px 16px 24px;
  margin-top: 24px;
}

.footer-content {
  max-width: 470px;
  margin: 0 auto;
}

.footer-stats {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid #444;
  margin-bottom: 24px;
}

.footer-stats h3 {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.footer-stats p {
  font-size: 14px;
  color: #ccc;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
}

.footer-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  background: var(--primary-color);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s;
  width: 100%;
  max-width: 300px;
}

@media (min-width: 768px) {
  .footer-link {
    width: auto;
    min-width: 180px;
  }
}

.footer-link:hover {
  background: #9d2c70a0;
}

.footer-info {
  text-align: center;
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}

.footer-info p {
  margin: 0 0 8px 0;
}

/* CTA Bottom Section (buatan sendiri hehehe) */
.cta-section {
  background: var(--text-dark);
  color: white;
  padding: 32px 16px 24px;
  margin-top: 24px;
}

.cta-content {
  max-width: 470px;
  margin: 0 auto;
}

.cta-stats {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid #444;
  margin-bottom: 24px;
}

.cta-stats h3 {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.cta-stats p {
  font-size: 14px;
  color: #ccc;
  margin: 0;
}

.cta-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-links {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
}

.cta-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  background: #2C889D;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s;
  width: 100%;
  max-width: 300px;
}

@media (min-width: 768px) {
  .cta-link {
    width: auto;
    min-width: 180px;
  }
}

.cta-link:hover {
  background: #0e3c4b;
}

.cta-info {
  text-align: center;
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}

.cta-info p {
  margin: 0 0 8px 0;
}

/* Item Counter Styles */
.item-counter {
  background: var(--primary-color);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.header-counter {
  background: rgba(220, 53, 69, 0.1);
  color: var(--primary-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

/* Highlighted Ads Carousel */
.highlighted-carousel {
  max-width: 450px;
  margin: 12px 12px 10px 10px;
  align-items: center;
  min-height: 20vh;
  padding: 10px 16px;
  padding-top: 20px; /* header height */
  padding-bottom: 5px; /* safe space above bottom nav */
  display: flex;  
  background: linear-gradient(135deg, rgba(253, 75, 91, 0.2) 0%, rgba(253, 75, 91, 0.4) 100%);
  border-radius: 10px;
  border: 1px solid rgba(157, 44, 111, 0.2);
}

.carousel-header {
  margin-bottom: 12px;
}

.carousel-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 8px 0;
}

.carousel-header small {
  font-size: 12px;
  color: var(--text-light);
  display: block;
}

.carousel-container {
  max-width: 400px;
  margin: 0 auto;
  min-height: 10vh;
  padding-top: 5px; /* header height */
  padding-bottom: 0px; /* safe space above bottom nav */
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-items {
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
  width: 100%;
}

.carousel-items-small {
  gap: 10px;
}

.carousel-item {
  flex: 0 0 calc(50% - 6px);
  min-width: 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.carousel-item:active {
  transform: scale(0.98);
}

.carousel-item:hover {
  box-shadow: 0 4px 12px rgba(157, 44, 111, 0.15);
}

/* Smaller carousel items for product detail (3 items) */
.carousel-items-small .carousel-item {
  flex: 0 0 calc(50% - 6px);
}

@media (min-width: 500px) {
  .carousel-items-small .carousel-item {
    flex: 0 0 calc(33.333% - 8px);
  }
}

.item-image {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
}

.item-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel item image for homepage carousel */
.carousel-item-image {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
}

.carousel-item-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Highlight badge overlay on image */
.carousel-highlight-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Carousel item content styling */
.carousel-item-content {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.carousel-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.carousel-item-meta {
  display: none;
}

.carousel-item-category {
  background: rgba(220, 53, 69, 0.1);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.carousel-item-seller {
  font-size: 10px;
  color: var(--text-light);
}


.highlight-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.item-info {
  padding: 8px;
}

.item-info h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

/* Dark mode adjustments */
html.dark .highlighted-carousel {
  background: linear-gradient(135deg, rgba(157, 44, 111, 0.2) 0%, rgba(166, 65, 125, 0.2) 100%);
  border-color: rgba(157, 44, 111, 0.3);
}

html.dark .carousel-item {
  background: #242424;
}

html.dark .item-info h4 {
  color: #e1e1e1;
}

/* Detail Page Carousel - NEW CLASS */
.highlighted-carousel-detail {
  margin: 20px 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(253, 75, 91, 0.2) 0%, rgba(253, 75, 91, 0.4) 100%);
  border-radius: 12px;
  border: 1px solid rgba(157, 44, 111, 0.2);
}

.carousel-header-detail {
  margin-bottom: 12px;
}

.carousel-header-detail h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 4px 0;
}

.carousel-header-detail small {
  font-size: 12px;
  color: var(--text-light);
  display: block;
}

.carousel-container-detail {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  width: 100%;
}

.carousel-container-detail::-webkit-scrollbar {
  display: none;
}

.carousel-items-detail {
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
  width: 100%;
}

html.dark .highlighted-carousel-detail {
  background: linear-gradient(135deg, rgba(157, 44, 111, 0.15) 0%, rgba(166, 65, 125, 0.15) 100%);
  border: 1px solid rgba(157, 44, 111, 0.3);
}
