/* RUDA Woo baseline (Bootstrap-friendly) — scope: body.ruda-woo-scope */

/* Frame */
body.ruda-woo-scope {
  --woo-primary: var(--color-primary, #0074b3);
  --woo-black: var(--color-black, #313436);
  --woo-muted: var(--color-darkgray, #8797a2);
  --woo-border: var(--color-lightgray, #e8eef1);
  --woo-card: #fff;
  --woo-container: min(960px, 92vw);
  --woo-radius: .5rem;
  --woo-gutter: 1rem;
}
body.ruda-woo-scope .woocommerce,
body.ruda-woo-scope .wpneo-wrapper {
  max-width: var(--woo-container) !important;
  margin-inline: auto !important;
  padding-inline: var(--woo-gutter) !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
}
body.ruda-woo-scope .wpneocf-container,
body.ruda-woo-scope #primary {
  max-width: var(--woo-container) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
}
body.single-product.product-type-crowdfunding #content {
  max-width: var(--woo-container) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
}
body.ruda-woo-scope.woocommerce-checkout .wp-block-woocommerce-checkout.alignwide,
body.ruda-woo-scope.woocommerce-checkout .wc-block-components-sidebar-layout {
  max-width: var(--woo-container);
  margin-inline: auto;
  padding-inline: var(--woo-gutter);
  width: 100%;
}

/* Type */
body.ruda-woo-scope h1,
body.ruda-woo-scope h2,
body.ruda-woo-scope h3 { font-weight: var(--font-weight-bold, 700); }
body.ruda-woo-scope .woocommerce-breadcrumb { display: none; }
body.ruda-woo-scope .price,
body.ruda-woo-scope .amount { font-weight: 700; }

/* Cards */
body.ruda-woo-scope .ruda-card,
body.ruda-woo-scope .wpneo-shadow {
  background: var(--woo-card);
  border: 1px solid var(--woo-border) !important;
  border-radius: var(--woo-radius);
}

/* Forms / Buttons */
body.ruda-woo-scope input[type="text"],
body.ruda-woo-scope input[type="email"],
body.ruda-woo-scope input[type="number"],
body.ruda-woo-scope input[type="tel"],
body.ruda-woo-scope input[type="password"],
body.ruda-woo-scope textarea,
body.ruda-woo-scope select {
  border: 1px solid var(--woo-muted);
  border-radius: .375rem;
  padding: .5rem .75rem;
  width: 100%;
}
body.ruda-woo-scope .button,
body.ruda-woo-scope .woocommerce a.button,
body.ruda-woo-scope .woocommerce button.button,
body.ruda-woo-scope .wpneo_donate_button,
body.ruda-woo-scope .select_rewards_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 0;
  background: var(--woo-primary);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
body.ruda-woo-scope .button:disabled,
body.ruda-woo-scope .woocommerce button.button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Notices */
body.ruda-woo-scope .woocommerce-notices-wrapper,
body.ruda-woo-scope .woocommerce-message,
body.ruda-woo-scope .woocommerce-info,
body.ruda-woo-scope .woocommerce-error {
  max-width: var(--woo-container);
  margin: 0 auto 1rem;
  padding: .75rem 1rem;
  border-radius: .375rem;
  border: 1px solid var(--woo-border);
  background: #fff;
}
body.ruda-woo-scope .woocommerce-message { border-left: .25rem solid var(--woo-primary); }
body.ruda-woo-scope .woocommerce-error   { border-left: .25rem solid #d22; }
body.ruda-woo-scope .woocommerce-info    { border-left: .25rem solid #888; }

/* Product lists */
body.ruda-woo-scope ul.products {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
body.ruda-woo-scope ul.products li.product {
  background: #fff;
  border: 1px solid var(--woo-border);
  border-radius: var(--woo-radius);
  overflow: hidden;
  padding: .75rem;
}
body.ruda-woo-scope ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  margin: .5rem 0;
}

/* Tables */
body.ruda-woo-scope table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--woo-border);
  border-radius: var(--woo-radius);
  overflow: hidden;
}
body.ruda-woo-scope table.shop_table th,
body.ruda-woo-scope table.shop_table td {
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--woo-border);
}
body.ruda-woo-scope table.shop_table tr>*:not(:last-child) { border-right: 1px solid var(--woo-border); }
body.ruda-woo-scope table.shop_table thead th { background: #f7f9fb; font-weight: 700; }
body.ruda-woo-scope table.shop_table tbody tr:last-child>* { border-bottom: none; }

/* WP Crowdfunding reset */
body.ruda-woo-scope .wpneo-campaign-single-left-info,
body.ruda-woo-scope .wpneo-campaign-summary,
body.ruda-woo-scope .wpneo-post-img,
body.ruda-woo-scope .wpneo-list-details,
body.ruda-woo-scope .wpneocf-container,
body.ruda-woo-scope .wpneo-wrapper {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  clear: none !important;
}
body.ruda-woo-scope .wpneo-post-img {
  border: 1px solid var(--woo-border);
  border-radius: var(--woo-radius);
  overflow: hidden;
  background: #fff;
}
body.ruda-woo-scope .wpneo-post-img img { display: block; width: 100%; height: auto; }
body.ruda-woo-scope #neo-progressbar { height: .75rem; border-radius: 999px; overflow: hidden; background: var(--woo-border); border: 0; }
body.ruda-woo-scope #neo-progressbar>div { height: 100%; background: var(--woo-primary); }

/* Tabs */
body.ruda-woo-scope .wpneo-tabs-menu {
  list-style: none;
  margin: 0;
  padding: .5rem 0;
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--woo-border);
}
body.ruda-woo-scope .wpneo-tabs-menu li a { text-decoration: none; color: var(--woo-black); }
body.ruda-woo-scope .wpneo-tab-content { padding: 1rem 0; }

/* Crowdfunding Product (single) */
body.single-product.product-type-crowdfunding {
  --cf-aside-w: 360px;
  --cf-card-border: var(--color-gray, #bfcdd6);
  --cf-primary: var(--color-primary, #0074b3);
}
body.single-product.product-type-crowdfunding .wpneo-wrapper {
  max-width: var(--woo-container) !important;
  margin-inline: auto !important;
  padding-inline: 1rem !important;
}
body.single-product.product-type-crowdfunding .wpneocf-container,
body.single-product.product-type-crowdfunding #primary,
body.single-product.product-type-crowdfunding #content,
body.single-product.product-type-crowdfunding .wpneo-list-details,
body.single-product.product-type-crowdfunding .wpneo-post-img,
body.single-product.product-type-crowdfunding .wpneo-tabs {
  max-width: var(--woo-container) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}
body.single-product.product-type-crowdfunding .wpneo-campaign-summary { display: none !important; }
body.single-product.product-type-crowdfunding .wpneo-list-details { display: block !important; grid-template-columns: none !important; }

/* Main visual clean */
body.single-product.product-type-crowdfunding .wpneo-post-img .overlay,
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="wishlist"],
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="wish"],
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="favorite"],
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="favourite"],
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="like"],
body.single-product.product-type-crowdfunding .wpneo-post-img [class*="heart"],
body.single-product.product-type-crowdfunding .wpneo-post-img .yith-wcwl-add-to-wishlist,
body.single-product.product-type-crowdfunding .wpneo-post-img a[href*="wishlist"] {
  display: none !important;
  visibility: hidden !important;
}
body.single-product.product-type-crowdfunding .wpneo-post-img,
body.single-product.product-type-crowdfunding .wpneo-post-img *:where(img,figure,div) {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
body.single-product.product-type-crowdfunding .wpneo-post-img img { display: block; width: 100% !important; height: auto; }

/* Tabs show description */
body.single-product.product-type-crowdfunding .wpneo-tabs-menu { display: none !important; }
body.single-product.product-type-crowdfunding #wpneo-tab-description { display: block; }
body.single-product.product-type-crowdfunding .tab-rewards > h2 { margin: 0 0 .6rem !important; }

/* Selected preview */
body.single-product.product-type-crowdfunding .ruda-selected-preview {
  border: 2px solid var(--color-primary, #0074b3);
  background: color-mix(in srgb, var(--color-primary, #0074b3) 8%, #fff);
  border-radius: .9rem;
  padding: 1rem;
  margin: 0 0 2rem;
}
body.single-product.product-type-crowdfunding .ruda-selected-preview.is-empty {
  border: 1px solid var(--color-gray, #bfcdd6);
  background: #fff;
}
body.single-product.product-type-crowdfunding .ruda-selected-preview .ruda-preview-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--color-primary, #0074b3);
}
body.single-product.product-type-crowdfunding .ruda-selected-preview.is-empty .ruda-preview-head { color: var(--color-darkgray, #8797a2); }
body.single-product.product-type-crowdfunding .ruda-selected-preview .ruda-preview-head .icon {
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  font-size: 1.25rem;
  line-height: 1;
}
body.single-product.product-type-crowdfunding .ruda-selected-preview .ruda-preview-head .change {
  margin-left: auto;
  font-weight: 600;
  text-decoration: underline;
  color: inherit;
}
body.single-product.product-type-crowdfunding .ruda-selected-preview .ruda-preview-empty-note { color: var(--color-darkgray, #8797a2); }

/* Return grid */
body.single-product.product-type-crowdfunding .tab-rewards { display: block !important; }
body.single-product.product-type-crowdfunding .cf-return-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: .5rem;
}
@media (max-width: 767px) {
  body.single-product.product-type-crowdfunding .cf-return-grid { grid-template-columns: 1fr; }
}
body.single-product.product-type-crowdfunding .cf-return-grid > .tab-rewards-wrapper {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
}
body.single-product.product-type-crowdfunding .cf-return-grid > .tab-rewards-wrapper .overlay,
body.single-product.product-type-crowdfunding .cf-return-grid > .tab-rewards-wrapper .wpneo-shadow {
  position: static !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: auto !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Return card */
body.single-product.product-type-crowdfunding .cf-return-card {
  background: #fff;
  border: 1px solid var(--cf-card-border);
  border-radius: .75rem;
  padding: 1.5rem 1.25rem !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}
body.single-product.product-type-crowdfunding .cf-return-price {
  color: var(--cf-primary);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  margin: 0 0 .6rem;
}
body.single-product.product-type-crowdfunding .cf-return-price .yen {
  margin-left: .2rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cf-primary);
}
body.single-product.product-type-crowdfunding .cf-return-title { margin: .2rem 0 .35rem; font-weight: 700; }
body.single-product.product-type-crowdfunding .cf-return-desc { margin: .3rem 0 .6rem; }
body.single-product.product-type-crowdfunding .cf-return-desc p { margin: .4rem 0; line-height: 1.6; }
body.single-product.product-type-crowdfunding .cf-return-cta { margin-top: auto; }
body.single-product.product-type-crowdfunding .cf-return-cta .button,
body.single-product.product-type-crowdfunding .cf-return-cta .select_rewards_button {
  width: 100%;
  margin-bottom: 0 !important;
}

/* Return images (smaller margins) */
body.single-product.product-type-crowdfunding .cf-return-image { margin: .5rem auto; }
body.single-product.product-type-crowdfunding .cf-return-image img { display: block; width: 100%; height: auto; }

/* Selected preview: image smaller */
body.single-product.product-type-crowdfunding .ruda-selected-preview .cf-return-image { width: 60%; margin: 1rem auto ; }

/* Cart form spacing */
body.single-product.product-type-crowdfunding .cf-return-card form.cart,
body.single-product.product-type-crowdfunding .ruda-selected-preview form.cart,
body.single-product.product-type-crowdfunding .woocommerce div.product form.cart { margin-bottom: 0 !important; }

/* Mobile fallback */
@media (max-width: 991px) {
  body.single-product.product-type-crowdfunding .wpneo-list-details { grid-template-columns: 1fr; }
}

/* Align / float fixes */
body.single-product.product-type-crowdfunding .tab-rewards,
body.single-product.product-type-crowdfunding .tab-rewards.tab-campaign-story-right,
body.single-product.product-type-crowdfunding .tab-rewards.tab_col_3,
body.single-product.product-type-crowdfunding .tab-rewards.tab_col_4,
body.single-product.product-type-crowdfunding .tab-campaign-story-right,
body.single-product.product-type-crowdfunding .tab_col_3,
body.single-product.product-type-crowdfunding .tab_col_4,
body.single-product.product-type-crowdfunding .tab_col_5 {
  float: none !important;
  width: auto !important;
  clear: none !important;
}

/* Buttons color unify */
body.single-product.product-type-crowdfunding .cf-return-cta .button,
body.single-product.product-type-crowdfunding .cf-return-cta .select_rewards_button,
body.single-product.product-type-crowdfunding .ruda-selected-preview .button,
body.single-product.product-type-crowdfunding .ruda-selected-preview .select_rewards_button,
body.single-product.product-type-crowdfunding .wpneo_donate_button {
  background: var(--color-primary) !important;
  color: #fff !important;
  border: 0 !important;
}
body.single-product.product-type-crowdfunding .cf-return-cta .button:hover,
body.single-product.product-type-crowdfunding .cf-return-cta .select_rewards_button:hover,
body.single-product.product-type-crowdfunding .ruda-selected-preview .button:hover,
body.single-product.product-type-crowdfunding .ruda-selected-preview .select_rewards_button:hover,
body.single-product.product-type-crowdfunding .wpneo_donate_button:hover { opacity: .75; }

/* Rewards tab padding reset */
body.single-product.product-type-crowdfunding #wpneo-tab-rewards,
body.single-product.product-type-crowdfunding .wpneo-tab-content#wpneo-tab-rewards,
body.single-product.product-type-crowdfunding .wpneo-tab-content.tab-rewards,
body.single-product.product-type-crowdfunding .tab-rewards,
body.single-product.product-type-crowdfunding .tab-campaign-story-right.tab-rewards { padding: 0 !important; }
body.single-product.product-type-crowdfunding .tab-rewards > h2 { padding: 0 !important; }
body.single-product.product-type-crowdfunding .cf-return-grid { padding: 0 !important; }
body.single-product.product-type-crowdfunding .tab-campaign-story-right { padding: 0 !important; }

/* Main visual strict reset */
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info,
body.single-product.product-type-crowdfunding .woocommerce div.product div.images,
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-post-img,
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-post-img>*,
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-single-main-image,
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-single-main-image img {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-post-img { width: 100% !important; margin: 0 !important; overflow: visible !important; }
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info figure { width: 100% !important; max-width: 100% !important; margin: 0 !important; border: 0 !important; }
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info img { width: 100% !important; height: auto !important; object-fit: contain !important; transform: none !important; transition: none !important; }
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-single-main-image { pointer-events: none !important; cursor: default !important; }

/* Checkout centering */
body.ruda-woo-scope .wp-block-woocommerce-checkout,
body.ruda-woo-scope .wc-block-checkout {
  max-width: var(--woo-container);
  margin-inline: auto;
  padding-inline: var(--woo-gutter);
}

/* Return Button */
.ruda-backlink-top, .ruda-return-inside-rewards { margin-top: 1rem; }

/* メインビジュアルの角丸を有効化 */
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-post-img{
  border-radius: .75rem !important;
  overflow: hidden !important;
}
body.single-product.product-type-crowdfunding .wpneo-campaign-single-left-info .wpneo-post-img :is(img,figure,div){
  border-radius: inherit !important;
}

/* 調整 */
body.single-product.product-type-crowdfunding .wpneo-tabs { margin-top: 1rem; }
