/* 価格表示のスタイル */
.product-price-area {
  margin: 8px 0;
}

.price-original {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9em;
  margin-right: 8px;
}

.price-actual {
  font-weight: 600;
  font-size: 1.1em;
  color: #333;
}

.tax-notation {
  font-size: 0.8em;
  color: #666;
  margin-left: 5px;
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}/**
* Product Showcase Widget Styles
*/

/* Common styles for all layouts */
.product-showcase {
  margin-bottom: 40px;
  font-family: sans-serif;
}

.showcase-subtitle {
  margin-bottom: 15px;
  font-size: 1.1em;
  color: #666;
  font-style: italic;
}

.no-products {
  padding: 20px;
  text-align: center;
  color: #666;
  background: #f7f7f7;
  border-radius: 4px;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #999;
  height: 200px;
}

.product-rating {
  color: #ffc107;
  font-size: 0.9em;
  margin: 5px 0;
}

.product-price {
  font-weight: 600;
  font-size: 1.1em;
  color: #333;
  margin: 5px 0;
}

.product-excerpt {
  margin: 10px 0;
  font-size: 0.9em;
  color: #666;
  line-height: 1.5;
}

.view-product-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  transition: background-color 0.3s;
}

.view-product-button:hover {
  background-color: #388e3c;
  color: white;
}

.product-actions {
  margin-top: 10px;
}

/* Grid Layout */
.grid-layout .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.grid-layout .product-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  background: white;
}

.grid-layout .product-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.grid-layout .product-thumbnail {
  position: relative;
  overflow: hidden;
}

.grid-layout .product-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s;
}

.grid-layout .product-item:hover .product-image {
  transform: scale(1.05);
}

.grid-layout .product-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.3s;
  display: flex;
  justify-content: center;
}

.grid-layout .product-item:hover .product-actions {
  transform: translateY(0);
}

.grid-layout .product-details {
  padding: 15px;
}

.grid-layout .product-title {
  margin: 0 0 10px;
  font-size: 1em;
  font-weight: 600;
}

.grid-layout .product-title a {
  color: #333;
  text-decoration: none;
}

.grid-layout .product-title a:hover {
  color: #4caf50;
}

/* List Layout */
.list-layout .products-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.list-layout .product-item {
  display: flex;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: box-shadow 0.3s;
}

.list-layout .product-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.list-layout .product-thumbnail {
  flex: 0 0 200px;
}

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

.list-layout .product-info {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.list-layout .product-title {
  margin: 0 0 10px;
  font-size: 1.2em;
  font-weight: 600;
}

.list-layout .product-title a {
  color: #333;
  text-decoration: none;
}

.list-layout .product-title a:hover {
  color: #4caf50;
}

.list-layout .product-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

/* Carousel Layout */
.carousel-layout .carousel-container {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-layout .carousel-nav {
  flex: 0 0 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1;
  transition: background 0.3s;
}

.carousel-layout .carousel-nav:hover {
  background: white;
}

.carousel-layout .carousel-prev {
  margin-right: 10px;
}

.carousel-layout .carousel-next {
  margin-left: 10px;
}

.carousel-layout .products-carousel {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.carousel-layout .product-slide {
  width: 100%;
  min-height: 320px;
  padding: 20px;
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid #eee;
}

.carousel-layout .product-thumbnail {
  margin-bottom: 15px;
  text-align: center;
}

.carousel-layout .product-image {
  max-width: 100%;
  max-height: 200px;
  display: inline-block;
}

.carousel-layout .product-title {
  margin: 0 0 10px;
  font-size: 1.2em;
  font-weight: 600;
}

.carousel-layout .product-title a {
  color: #333;
  text-decoration: none;
}

.carousel-layout .product-title a:hover {
  color: #4caf50;
}

.carousel-layout .carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.carousel-layout .dot {
  width: 10px;
  height: 10px;
  background: #ccc;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-layout .dot.active {
  background: #4caf50;
}

/* Featured Layout */
.featured-layout .featured-container {
  margin-bottom: 30px;
}

.featured-layout .featured-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.featured-layout .featured-product-image {
  position: relative;
  overflow: hidden;
}

.featured-layout .featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.featured-layout .featured-product:hover .featured-image {
  transform: scale(1.03);
}

.featured-layout .featured-product-details {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-layout .featured-product-title {
  margin: 0 0 15px;
  font-size: 1.8em;
  font-weight: 600;
}

.featured-layout .featured-product-title a {
  color: #333;
  text-decoration: none;
}

.featured-layout .featured-product-price {
  font-size: 1.4em;
  font-weight: 600;
  margin: 10px 0;
  color: #333;
}

.featured-layout .featured-product-rating {
  font-size: 1.1em;
  margin: 10px 0;
}

.featured-layout .featured-product-excerpt {
  font-size: 1em;
  line-height: 1.6;
  margin: 15px 0;
  color: #666;
}

.featured-layout .featured-product-actions {
  margin-top: 20px;
}

.featured-layout .featured-product-actions .view-product-button {
  padding: 10px 20px;
  font-size: 1em;
}

.featured-layout .remaining-products-heading {
  margin: 30px 0 15px;
}

.featured-layout .remaining-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.featured-layout .product-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  background: white;
}

.featured-layout .product-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-layout .product-thumbnail {
  position: relative;
}

.featured-layout .product-image {
  width: 100%;
  height: auto;
  display: block;
}

.featured-layout .product-details {
  padding: 12px;
}

.featured-layout .product-title {
  margin: 0 0 5px;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.3;
}

.featured-layout .product-title a {
  color: #333;
  text-decoration: none;
}

.featured-layout .product-price {
  font-size: 0.9em;
  font-weight: 600;
  color: #333;
}

/* Compact Layout */
.compact-layout .compact-container {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #eee;
}

.compact-layout .products-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.compact-layout .compact-product-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  flex: 1 1 calc(50% - 10px);
  min-width: 200px;
  transition: box-shadow 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.compact-layout .compact-product-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.compact-layout .compact-product-thumbnail {
  flex: 0 0 80px;
  height: 80px;
}

.compact-layout .compact-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-layout .compact-no-image {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
}

.compact-layout .compact-product-info {
  flex: 1;
  padding: 10px 15px;
}

.compact-layout .compact-product-title {
  margin: 0 0 5px;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.3;
}

.compact-layout .compact-product-title a {
  color: #333;
  text-decoration: none;
}

.compact-layout .compact-product-title a:hover {
  color: #4caf50;
}

.compact-layout .compact-product-price {
  font-size: 0.9em;
  font-weight: 600;
  color: #333;
}

.compact-layout .compact-product-rating {
  font-size: 0.8em;
  margin-top: 3px;
}

.compact-layout .compact-view-all {
  text-align: center;
  margin-top: 20px;
}

.compact-layout .view-all-button {
  display: inline-block;
  padding: 8px 20px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9em;
  transition: background-color 0.3s, color 0.3s;
}

.compact-layout .view-all-button:hover {
  background-color: #4caf50;
  color: white;
}


/* 商品画像ラッパーのスタイル修正 */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* 商品画像のスタイル */
.product-image {
  display: block;
  width: 100%;
  height: auto;
  z-index: 0; /* 画像は背面に */
}

/* 在庫表示が空の場合は非表示 */
.stock-badge:not(:has(*)) {
  display: none;
}
.stock-badge {
  position: absolute;
	max-height: 20px;
	height: auto;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 1; /* z-indexを適切に設定 */
  max-width: 40%; /* 最大幅を制限 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive styles */
@media (max-width: 768px) {
  .grid-layout .products-grid {
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .list-layout .product-item {
      flex-direction: column;
  }
  
  .list-layout .product-thumbnail {
      flex: 0 0 auto;
  }
  
  .featured-layout .featured-product {
      grid-template-columns: 1fr;
      gap: 0;
  }
  
  .featured-layout .remaining-products {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .compact-layout .compact-product-item {
      flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .grid-layout .products-grid {
      grid-template-columns: repeat(2, 1fr);
  }
  
  .featured-layout .remaining-products {
      grid-template-columns: repeat(2, 1fr);
  }
}