/* Product Cards Popup Style - Horizontal Layout */

.product-layout {
  margin-bottom: 20px;
}

.product-thumb {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid #e8e8e8;
  position: relative;
}

.product-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: #007bff;
}

.product-info-window {
  padding: 16px;
}

/* Header Section - Horizontal Layout */
.product-header {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.product-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-thumb:hover .product-image img {
  transform: scale(1.05);
}

.product-details {
  flex: 1;
  min-width: 0;
}

.product-details h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.product-details h4 a {
  color: #333;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-details h4 a:hover {
  color: #007bff;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 6px;
}

.product-location {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-location i {
  color: #007bff;
  font-size: 12px;
}

/* Rating Section */
.product-rating {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.seller-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.seller-rating span:first-child {
  color: #666;
  font-weight: 500;
}

.seller-name {
  color: #007bff;
  font-weight: 600;
  font-size: 14px;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.rating-stars i {
  color: #ffc107;
  font-size: 14px;
}

.rating-stars i.bi-star {
  color: #ddd;
}

.rating-value {
  color: #666;
  font-size: 12px;
  margin-left: 4px;
}

/* Description */
.product-description {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actions Section */
.product-actions {
  margin-top: auto;
}

.social-contact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: none !important;
}

.social-btn:hover {
  transform: scale(1.1);
  text-decoration: none;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
  background: #25D366;
}

.whatsapp-btn:hover {
  background: #1ebe57;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.instagram-btn {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.instagram-btn:hover {
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.telegram-btn {
  background: #0088cc;
}

.facebook-btn {
  background: #3b5998;
}

.facebook-btn:hover {
  background: #2d4373;
  box-shadow: 0 4px 12px rgba(59, 89, 152, 0.4);
}

.telegram-btn:hover {
  background: #006ba3;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.messenger-btn {
  background: #0084ff;
}

.messenger-btn:hover {
  background: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4);
}

.viber-btn {
  background: #665cac;
}

.viber-btn:hover {
  background: #574a91;
  box-shadow: 0 4px 12px rgba(102, 92, 172, 0.4);
}

.signal-btn {
  background: #3a76f0;
}

.signal-btn:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(58, 118, 240, 0.4);
}

.imessage-btn {
  background: #007aff;
}

.imessage-btn:hover {
  background: #0056cc;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.email-btn {
  background: #dc3545;
}

.email-btn:hover {
  background: #c82333;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.phone-btn {
  background: #28a745;
}

.phone-btn:hover {
  background: #218838;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .product-header {
    gap: 12px;
  }
  
  .product-image {
    width: 70px;
    height: 70px;
  }
  
  .product-details h4 {
    font-size: 15px;
  }
  
  .product-price {
    font-size: 16px;
  }
  
  .social-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .product-thumb:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 576px) {
  .product-info-window {
    padding: 12px;
  }
  
  .product-header {
    gap: 10px;
  }
  
  .product-image {
    width: 60px;
    height: 60px;
  }
  
  .product-details h4 {
    font-size: 14px;
  }
  
  .product-price {
    font-size: 15px;
  }
  
  .social-contact-actions {
    gap: 6px;
  }
  
  .social-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}

/* Loading Animation */
.product-thumb {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s ease forwards;
}

.product-thumb:nth-child(1) { animation-delay: 0.1s; }
.product-thumb:nth-child(2) { animation-delay: 0.2s; }
.product-thumb:nth-child(3) { animation-delay: 0.3s; }
.product-thumb:nth-child(4) { animation-delay: 0.4s; }
.product-thumb:nth-child(5) { animation-delay: 0.5s; }
.product-thumb:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Special Effects */
.product-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s;
  z-index: 1;
}

.product-thumb:hover::before {
  left: 100%;
}

/* Tooltips for social buttons */
.social-btn[title] {
  position: relative;
}

.social-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 1000;
}

.social-btn[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .product-layout {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 15px;
  }
  
  .product-thumb {
    margin: 0 auto;
    max-width: 100%;
  }
  
  /* Adjust header layout for mobile */
  .product-header {
    flex-direction: row;
    gap: 12px;
  }
  
  .product-image {
    width: 70px;
    height: 70px;
  }
  
  .product-details h4 {
    font-size: 14px;
    line-height: 1.3;
  }
  
  .product-price {
    font-size: 16px;
  }
  
  .product-location {
    font-size: 12px;
  }
  
  /* Adjust social buttons for mobile */
  .social-contact-actions {
    gap: 8px;
  }
  
  .social-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .product-layout {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  .product-info-window {
    padding: 12px;
  }
  
  .product-header {
    gap: 10px;
  }
  
  .product-image {
    width: 60px;
    height: 60px;
  }
  
  .product-details h4 {
    font-size: 13px;
    margin-bottom: 4px;
  }
  
  .product-price {
    font-size: 15px;
  }
  
  .social-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}
