/* Sidebar Layout Styles - PERFECTED TO MATCH ORIGINAL */
.affiliate-sidebar-layout {
  max-width: 350px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trending-header {
  background: #dc2626;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightning {
  font-size: 18px;
}

.title {
  font-size: 14px;
  letter-spacing: 0.5px;
}

.search-box {
  padding: 12px;
  background: #f8f9fa;
}

.affiliate-search {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: white;
  box-sizing: border-box;
  font-size: 14px;
  color: #666;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23999" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.products-list {
  padding: 8px;
}

.product-card {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
}

.product-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.product-left {
  flex-shrink: 0;
}

.product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.product-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 60px;
}

.product-info {
  flex: 1;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
  line-height: 1.2;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.price {
  font-size: 16px;
  font-weight: bold;
  color: #111;
}

.rating {
  font-size: 12px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.discount {
  background: #dcfce7;
  color: #166534;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 4px;
  border: 1px solid #bbf7d0;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.platform {
  font-size: 11px;
  color: #2563eb;
  font-weight: 500;
}

.shop-now-btn {
  background: #dc2626;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.shop-now-btn:hover {
  background: #b91c1c;
  color: white;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

/* Featured Layout Styles */
.affiliate-featured-layout {
  max-width: 100%;
  background: white;
  font-family: Arial, sans-serif;
}

.featured-hero {
  background: linear-gradient(135deg, #dbeafe 0%, #fce7f3 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.featured-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.featured-badge {
  background: #7c3aed;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.time-badge {
  color: #6b7280;
  font-size: 12px;
}

.featured-main-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: center;
}

.featured-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.featured-title {
  font-size: 28px;
  font-weight: bold;
  color: #111;
  margin: 0;
  line-height: 1.2;
}

.featured-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: #fbbf24;
  font-size: 16px;
}

.review-count {
  color: #6b7280;
  font-size: 14px;
}

.featured-pricing {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.featured-price {
  font-size: 32px;
  font-weight: bold;
  color: #16a34a;
}

.featured-original {
  font-size: 20px;
  color: #6b7280;
  text-decoration: line-through;
}

.featured-discount-badge {
  background: #fecaca;
  color: #dc2626;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.featured-cta {
  background: #f97316;
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s;
}

.featured-cta:hover {
  background: #ea580c;
  color: white;
}

.featured-image-section {
  text-align: center;
}

.featured-product-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-other-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.featured-small-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.3s;
}

.featured-small-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.small-card-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.small-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #111;
}

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

.small-card-price {
  font-size: 16px;
  font-weight: bold;
  color: #111;
}

.small-card-btn {
  background: #6b7280;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.small-card-btn:hover {
  background: #4b5563;
  color: white;
}

/* List Layout Styles */
.affiliate-list-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.list-content {
  display: flex;
  gap: 16px;
  align-items: center;
}

.list-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-details {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #111;
}

.list-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.reviews {
  color: #6b7280;
  font-size: 12px;
}

.list-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  background: #f3f4f6;
  color: #374151;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.list-price-section {
  text-align: right;
  flex-shrink: 0;
}

.list-price {
  font-size: 20px;
  font-weight: bold;
  color: #111;
  margin-bottom: 4px;
}

.list-original-price {
  color: #6b7280;
  text-decoration: line-through;
  font-size: 14px;
  margin-bottom: 4px;
}

.list-platform {
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.list-btn {
  background: #16a34a;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.list-btn:hover {
  background: #15803d;
  color: white;
}

/* Horizontal Layout Styles */
.affiliate-horizontal-layout {
  max-width: 100%;
}

.horizontal-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.recommended {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.sponsored {
  color: #6b7280;
  font-size: 12px;
}

.card-content {
  display: flex;
  padding: 16px;
  gap: 24px;
  align-items: center;
}

.horizontal-card .product-image {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}

.product-details {
  flex: 1;
}

.horizontal-card .product-name {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 12px 0;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-section {
  text-align: right;
}

.platform-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}

.platform-icon {
  background: #3b82f6;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.horizontal-card .price {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

.store-btn {
  background: #f97316;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.store-btn:hover {
  background: #ea580c;
  color: white;
}

/* Compact Layout Styles */
.affiliate-compact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.compact-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.compact-card .product-name {
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.compact-card .product-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.price-info .price {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.price-info .platform {
  font-size: 12px;
  color: #2563eb;
}

.compact-card .store-btn {
  width: 100%;
  background: #f97316;
  color: white;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  display: block;
}

.compact-card .store-btn:hover {
  background: #ea580c;
  color: white;
}

/* Grid Layout Styles */
.affiliate-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.grid-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-container {
  position: relative;
}

.grid-card .product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #dc2626;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.grid-card .product-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.grid-card .price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.original-price {
  color: #6b7280;
  text-decoration: line-through;
  font-size: 14px;
}

.grid-card .platform {
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
}

.buy-btn {
  width: 100%;
  background: #16a34a;
  color: white;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  display: block;
  font-weight: 500;
}

.buy-btn:hover {
  background: #15803d;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .featured-main-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .features {
    grid-template-columns: 1fr;
  }

  .affiliate-compact-layout {
    grid-template-columns: 1fr;
  }

  .affiliate-grid-layout {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

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

  .list-price-section {
    text-align: center;
  }

  .featured-other-products {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .affiliate-sidebar-layout {
    max-width: 100%;
  }
}
