/* ============================================
   楽天商品カード専用CSS
   ============================================ */

.rakuten-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 2rem 0;
}

.rakuten-product-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
}

.rakuten-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: #bf0000;
}

.rakuten-product-card.loading {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rakuten-product-card .loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #bf0000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

.product-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: linear-gradient(135deg, #bf0000 0%, #ff0000 100%);
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(191, 0, 0, 0.3);
}

.product-image-container {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.product-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-shop {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.product-rating .stars {
  color: #fbbf24;
}

.product-rating .review-count {
  color: #64748b;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: #dc2626;
  margin-bottom: 0.3rem;
}

.product-price-tax {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.product-features {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.product-features h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.8rem;
}

.product-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  padding: 0.3rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: #475569;
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
}

.product-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.product-btn-rakuten {
  background: #bf0000;
  color: white;
}

.product-btn-rakuten:hover {
  background: #a00000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(191, 0, 0, 0.3);
}

.product-btn-amazon {
  background: #ff9900;
  color: #111;
}

.product-btn-amazon:hover {
  background: #e68a00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.product-error {
  background: #fee;
  border: 2px solid #fca5a5;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.product-error-title {
  color: #dc2626;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-error-message {
  color: #64748b;
  font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .rakuten-product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .product-price {
    font-size: 1.5rem;
  }
}
