/* =========================================
   Logo
========================================= */
#h_logo .M_ShopLogo {
  max-width: inherit;
}

/* =========================================
   clearfix
========================================= */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* =========================================
   Product Topics List Page (.up-d_topic-list)
========================================= */
.up-d_topic-content {
  max-width: 1000px;
  margin-block: 60px;
  margin-inline: auto;
  padding-inline: 20px;
}

.up-d_topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 50px;
}

[data-element-id] .up-d_topic-grid > div[data-collection-list-content] {
  display: contents;
}

.up-d_topic-card {
  max-width: 350px;
  width: 100%;
  margin-inline: auto;
}

.up-d_topic-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #333;
  transition: opacity 0.3s;
}

.up-d_topic-card a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.up-d_topic-card a:hover .up-d_topic-card-title {
    text-decoration: underline;
}

.up-d_topic-card-img img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: 8px;
}

.up-d_topic-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.up-d_topic-card-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.03em;
  line-height: 1.5;
  margin-top: 15px;
  text-align: left;
}

.up-d_topic-card-info {
  margin-top: auto;
}

.up-d_topic-card-date {
  font-size: 10px;
  font-weight: normal;
  color: #999;
  letter-spacing: 0.05em;
  line-height: 1.0;
  margin-top: 5px;
  text-align: left;
}

.up-d_topic-card-cat {
  font-size: 10px;
  font-weight: normal;
  color: #666;
  letter-spacing: 0.02em;
  line-height: 1.0;
  margin-top: 10px;
  border: 1px solid #999;
  padding: 2px 10px;
  width: fit-content;
  margin-right: auto;
}

/* Responsive List */
@media (max-width: 768px) {
  .up-d_topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .up-d_topic-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Product Topics Detail Page (.up-d_topic-detail)
========================================= */

.up-d_topic-detail {
  text-align: left;
  max-width: 800px;
  margin-block: 60px;
  margin-inline: auto;
  padding-inline: 20px;
  color: #333;
}

/* Title */
.up-d_detail-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 30px;
  letter-spacing: 0.1em;
}

.up-d_topic-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.05em;
  line-height: 1.4;
  padding-bottom: 15px;
  border-bottom: 2px solid #e88625;
  text-align: left;
}

/* Meta Data (Date & Categories) */
.up-d_topic-meta-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 30px;
}

.up-d_topic-date {
  font-size: 12px;
  font-weight: bold;
  color: #888;
  letter-spacing: 0.05em;
  line-height: 1.0;
}

.up-d_topic-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.up-d_topic-cat {
  font-size: 12px;
  font-weight: normal;
  color: #666;
  letter-spacing: 0.02em;
  line-height: 1.0;
  border: 1px solid #ccc;
  padding: 2px 15px;
  background-color: #fff;
  border-radius: 20px;
}

/* Main Image */
.up-d_detail-img {
  width: 100%;
}
.up-d_detail-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.up-d_topic-main-img {
  margin-top: 30px;
  max-width: 800px;
  width: 100%;
}
.up-d_topic-main-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Sections */
.up-d_topic-section {
  margin-top: 70px;
}

.up-d_topic-section-title {
  text-align: left;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.05em;
  line-height: 1.2;
  padding-left: 12px;
  border-left: 4px solid #f7a83d;
  text-align: left;
}

/* Efficacy Box */
.up-d_topic-efficacy-box {
  text-align: left;
  margin-top: 20px;
  background-color: #fdfaf0;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #fbe7b1;
  text-align: left;
  line-height: 1.8;
}

/* Text Body */
.up-d_topic-text-body {
  text-align: left;
  margin-top: 20px;
  line-height: 1.8;
  text-align: left;
}

/* Back Button */
.up-d_btn-wrap {
  text-align: center;
  margin-top: 60px;
  max-width: 300px;
  margin-inline: auto;
}
.up-d_btn-outline {
  display: block;
  padding: 12px 40px;
  border: 1px solid #f7a83d;
  color: #f7a83d;
  background-color: #fff;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.up-d_btn-outline:hover {
  background-color: #f7a83d;
  color: #fff;
  opacity: 1;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .up-d_topic-detail {
    padding-inline: 10px;
  }
  
  .up-d_detail-title {
  font-size: 24px;
  margin-bottom: 20px;
  }
}

/* =========================================
   Pagination Button
========================================= */
.up-d_load-more-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
.up-d_load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  padding: 12px 40px;
  border: 1px solid #333;
  background-color: #fff;
  color: #333;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  &:hover {
    background-color: #333;
    color: #fff;
  }
  .up-d_load-more-icon {
    margin-left: 8px;
  }
}

/* Reveal Animation */
@keyframes up-d_fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.up-d_topic-card.is-show {
  animation: up-d_fadeInUp 0.6s ease forwards;
}

/* =========================================
   Recipe Page Styles
========================================= */
.up-d_recipe-header {
  text-align: center;
  margin-top: 20px;
}

.up-d_recipe-main-title {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.up-d_recipe-intro {
  font-size: 16px;
  font-weight: normal;
  color: #666;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-top: 20px;
}

/* INDEX */
.up-d_recipe-index-section {
  margin-top: 60px;
}
.up-d_recipe-index-box {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  padding-inline: 20px;
}
.up-d_recipe-index-title,
.up-d_topic-main-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.1em;
  line-height: 1.0;
}
.up-d_recipe-index-line,
.up-d_topic-main-title-line {
  width: 100px;
  height: 3px;
  background-color: #333;
  margin-inline: auto;
  margin-top: 15px;
}
.up-d_recipe-index-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  margin-top: 40px;
  text-align: left;
}

[data-element-id] .up-d_recipe-index-list > div[data-collection-filtered-content] {
  display: contents;
} 

.up-d_recipe-index-item {
  position: relative;
  padding-left: 35px;
}

.up-d_recipe-index-item.up-d_recipe-index-item01 {
  grid-column: 1 / -1;
}

.up-d_recipe-index-item::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-color: #e60012;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.up-d_recipe-index-item::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  position: absolute;
  left: 6px;
  top: calc(50% - 1px);
  transform: translateY(-50%) rotate(45deg);
}
.up-d_recipe-index-item a {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
  display: block;
  width: 50%;
}
.up-d_recipe-index-item a:hover {
  color: #e60012;
}

/* Category Sections */
.up-d_recipe-section {
  margin-top: 50px;
}

.up-d_recipe-cat-title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.1em;
  line-height: 1.0;
  text-align: center;
  padding: 15px 0;
  border-top: 2px solid #666;
  border-bottom: 2px solid #666;
  margin-top: 0;
}

/* Card overrides for Recipe */
.up-d_topic-card-desc {
  font-size: 14px;
  font-weight: normal;
  color: #888;
  letter-spacing: 0.02em;
  line-height: 1.6;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

/* Responsive Recipe */
@media (max-width: 480px) {
  .up-d_recipe-index-list {
    gap: 15px;
    padding-left: 20px;
  }
  
  .up-d_recipe-cat-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {

}
/* =========================================
   Recipe Detail Page Styles
========================================= */



.up-d_recipe-time {
  display: flex;
  align-items: center;
  margin-top: 30px;
  color: #f7a83d;
  font-weight: bold;
}
.up-d_recipe-time-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-color: #f7a83d;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,2A10,10,0,1,0,22,12,10.011,10.011,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.009,8.009,0,0,1,12,20ZM12.5,7H11v6l5.2,3.1,0.8-1.2-4.5-2.7V7Z'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,2A10,10,0,1,0,22,12,10.011,10.011,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.009,8.009,0,0,1,12,20ZM12.5,7H11v6l5.2,3.1,0.8-1.2-4.5-2.7V7Z'/%3E%3C/svg%3E") no-repeat center / contain;
  margin-right: 8px;
}
.up-d_recipe-time-label {
  font-size: 16px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.up-d_recipe-time-value {
  font-size: 18px;
  margin-left: 5px;
}

.up-d_recipe-date {
  font-size: 16px;
  font-weight: bold;
  color: #999;
  letter-spacing: 0.05em;
  margin-top: 25px;
}

.up-d_recipe-category-tags {
  margin-top: 15px;
}
.up-d_recipe-tag {
  display: inline-block;
  font-size: 13px;
  color: #666;
  border: 1px solid #ccc;
  padding: 4px 20px;
  border-radius: 50px;
  margin-right: 10px;
  letter-spacing: 0.05em;
}

/* Meta Fields A-E */
.up-d_recipe-meta-fields {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}
.up-d_recipe-meta-fields .up-d_dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 15px;
}
.up-d_recipe-meta-fields .up-d_dt {
  font-weight: bold;
  color: #666;
}
.up-d_recipe-meta-fields .up-d_dd {
  color: #333;
}

/* Section Common: Bar Title */
.up-d_recipe-bar-title {
  text-align: left;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  letter-spacing: 0.05em;
  line-height: 1.4;
  padding-left: 15px;
  border-left: 4px solid #f7a83d;
  margin-top: 50px;
}

/* Product Grid */
.up-d_recipe-product-grid {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 175px);
  gap: 20px;
}
.up-d_recipe-product-item {
  width: 175px;
}
.up-d_recipe-product-img {
  width: 100%;
}
.up-d_recipe-product-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid #eee;
  border-radius: 8px;
}
.up-d_recipe-product-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  text-align: center;
  line-height: 1.4;
}

/* Ingredients Box */
.up-d_recipe-section-ingredients {
  margin-top: 50px;
}
.up-d_recipe-ingredients-box {
  background-color: #fffef2;
  border-radius: 4px;
  overflow: hidden;
}
.up-d_recipe-ingredients-title {
  text-align: center;
  background-color: #f7a83d;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  padding: 10px 0;
  letter-spacing: 0.2em;
}
.up-d_recipe-ingredients-body {
  padding: 30px 40px;
}
.up-d_ingredient-list {
  text-align: left;
  display: flex;
  flex-direction: column;
}
.up-d_ingredient-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dotted #ccc;
}
.up-d_ingredient-item .up-d_dt {
  color: #333;
}
.up-d_ingredient-item .up-d_dd {
  font-weight: bold;
}
.up-d_ingredient-group {
  margin-top: 25px;
  font-weight: bold;
  color: #333;
  padding-bottom: 5px;
}

/* Steps */
.up-d_recipe-steps-list {
  text-align: left;
  margin-top: 25px;
  list-style: none;
  padding: 0;
}
.up-d_recipe-steps-list .up-d_step-item {
  display: flex;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}
.up-d_recipe-steps-list .up-d_step-item:first-child {
  padding-top: 0;
}
.up-d_recipe-steps-list .step-num {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  width: 40px;
  flex-shrink: 0;
}
.up-d_recipe-steps-list .up-d_step-text {
  font-size: 16px;
  color: #333;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* Tips */
.up-d_recipe-tips-text {
  margin-top: 25px;
  font-size: 16px;
  color: #333;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* Responsive Recipe Detail */
@media (max-width: 768px) {
  .up-d_recipe-product-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .up-d_recipe-ingredients-body {
    padding: 20px;
  }
  
  .up-d_recipe-product-grid {
    grid-template-columns: repeat(auto-fill, 170px);
    gap: 15px;
  }
  .up-d_recipe-product-item {
    width: 100%;
  }
  .up-d_recipe-product-img img {
    aspect-ratio: 8 / 5;
  }
  .up-d_recipe-product-name {
    margin-top: 5px;
    font-size: 12px;
  }
  
  .up-d_recipe-time {
  margin-top: 20px;
}
.up-d_recipe-time-icon {
  width: 20px;
  height: 20px;
}
.up-d_recipe-time-label {
  font-size: 14px;
}

.up-d_recipe-time-value {
  font-size: 16px;
}

.up-d_recipe-date {
  font-size: 14px;
  margin-top: 15px;
}

.up-d_recipe-category-tags {
  margin-top: 10px;
}
.up-d_recipe-tag {
  font-size: 11px;
}
}

/* =========================================================
   ページネーション
========================================================= */

.up-d_pagination {
  margin-top: 60px;
}

.up-d_pagination-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.up-d_pagination-item {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.up-d_pagination-item > a,
.up-d_pagination-item > span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.up-d_pagination-item:hover {
  background-color: #f5f5f5;
}

.up-d_pagination-item.is-current {
  background-color: #333;
  border-color: #333;
  cursor: default;
  pointer-events: none;
}

.up-d_pagination-item.is-current > span {
  color: #fff;
}

.up-d_pagination-item.up-d_pagination-prev > a,
.up-d_pagination-item.up-d_pagination-next > a {
  font-weight: bold;
}

.up-d_pagination-item.up-d_pagination-prev,
.up-d_pagination-item.up-d_pagination-next {
  font-weight: bold;
}
