/* 部分テンプレート(利用規約) */
.term_label {
	font-size: 14px;
	display: -webkit-box;
}
.term_label > a {
	color: #386f81;
}

.modal-open {
	.modal-scrollable {
		position: fixed;
		z-index: 100;
		overflow: hidden;
		height: 100%;
	}
	.modal::before {
		content: "";
		position: fixed;
		inset: 0;
		background: white;
		z-index: -1;
	}
	.modal {
		height: 100%;
		overflow-y: auto;
		margin-top: unset !important;
	}
}

/* ecforce側からAJAXで返されるモーダルのデザイン用CSS(Smartphone) */
@media screen and (max-width: 480px) {
	.modal-scrollable {
		position: fixed;
		top: 0;
	}
	.modal-scrollable .modal {
		padding: 20px 10%;
		overflow-y: scroll;
		max-height: 100vh;
	}
	.modal-scrollable .modal .modal-header {
		text-align: right;
	}
	.modal-scrollable .modal .modal-header .close {
		font-size: 30px;
	}
	.modal-scrollable .modal .modal-title {
		font-size: 18px;
		text-align: center;
		font-weight: bold;
	}
	.modal-scrollable .modal .modal-body {
		margin: 30px 0;
	}
	.modal-scrollable .modal .modal-body p {
		margin: 5px 0;
		font-size: 13px;
	}
	.modal-scrollable .modal .modal-body form {
		margin: 10px 0;
	}
	.modal-scrollable .modal .modal-body form .form-group {
		margin: 15px 0;
	}
	.modal-scrollable .modal .modal-body form label {
		font-size: 15px;
		font-weight: bold;
	}
	.modal-scrollable .modal .modal-body form input {
		border: solid 1px #ddd;
		font-size: 16px;
		width: 100%;
		padding: 10px;
		margin-top: 5px;
	}
	.modal-scrollable .modal .modal-body form a {
		background: #386f81;
		color: #fff;
		padding: 15px;
		width: 100%;
		display: block;
		text-align: center;
	}
	.modal-scrollable .modal .modal-body form a.disabled {
		background: #aaa;
		cursor: default;
	}
}

/* ecforce側からAJAXで返されるモーダルのデザイン用CSS(PC) */
@media screen and (min-width: 480px) {
	.modal-scrollable {
		position: fixed;
		top: 0;
	}
	.modal-scrollable .modal {
		padding: 60px 25%;
	}
	.modal-scrollable .modal .modal-header {
		text-align: right;
	}
	.modal-scrollable .modal .modal-header .close {
		font-size: 30px;
	}
	.modal-scrollable .modal .modal-title {
		font-size: 20px;
		text-align: center;
		font-weight: bold;
	}
	.modal-scrollable .modal .modal-body {
		margin: 30px 0;
	}
	.modal-scrollable .modal .modal-body p {
		margin: 5px 0;
	}
	.modal-scrollable .modal .modal-body form {
		margin: 10px 0;
	}
	.modal-scrollable .modal .modal-body form .form-group {
		margin: 20px 0;
	}
	.modal-scrollable .modal .modal-body form label {
		font-weight: bold;
	}
	.modal-scrollable .modal .modal-body form input {
		border: solid 1px #ddd;
		font-size: 16px;
		width: 100%;
		padding: 10px;
		margin-top: 5px;
	}
	.modal-scrollable .modal .modal-body form a {
		margin-top: 50px;
		background: #386f81;
		color: #fff;
		padding: 15px;
		width: 100%;
	}
	.modal-scrollable .modal .modal-body form a.disabled {
		background: #aaa;
		cursor: default;
	}
}

/* SKU画像項目用(smartphone) */
@media screen and (max-width: 480px) {
	.c-product_img {
		display: block;
	}
	#sub-images-view {
		max-width: 100%;
		display: block;
	}
	.img-wrap {
		width: 100%;
		max-height: 100%;
		align-items: center;
		padding: 0;
		list-style: none;
		display: flex;
	}
	.img-box {
		margin: 2px;
	}
	.img-thumbnail {
		width: 100% !important;
		pointer-events: auto;
	}
	.img-box:hover {
		opacity: 0.8;
	}
	.product-thumbnail {
		max-height: 125px;
		max-width: 125px;
	}
	#main-img {
		height: auto;
		object-fit: contain;
	}
}

/* SKU画像項目用(PC) */
@media screen and (min-width: 480px) {
	.c-product_img {
		display: flex;
		justify-content: space-around;
	}
	#sub-images-view {
		max-width: 15%;
		display: flex;
		flex-direction: column;
	}
	.img-wrap {
		width: 100%;
		max-height: 100%;
		align-items: center;
		padding: 0;
		list-style: none;
	}
	.img-wrap:nth-child(n + 2) {
		display: none;
	}
	.img-box {
		width: 100% !important;
		margin: 2px;
	}
	.img-thumbnail {
		width: 100% !important;
		pointer-events: auto;
	}
	.img-box:hover {
		opacity: 0.8;
	}
	.product-thumbnail {
		max-height: 125px;
		max-width: 125px;
	}
	#main-img {
		width: 70%;
		height: auto;
		object-fit: contain;
	}
}

.recommend_product_padding {
	padding-top: 80px;
	padding-bottom: 100px;
}

/* KK-ROOIBOS-LP: SKU 700001278専用LPブロック（design00 product.html #lpRooibosBlock準拠、
   ported as a static full-bleed image stack; visibility is gated in Liquid via
   product.master.sku so no runtime display:none/JS toggle is needed here） */
.kk-rooibos-lp {
	max-width: 750px;
	margin: 40px auto 0;
	padding: 0;
	font-size: 0;
	line-height: 0;
}
.kk-rooibos-lp img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
}


/* REDMINE-11896: campaign image is authored in PDP CMS -> product CSV detail.
   Never stretch the banner vertically or overlap existing purchase controls. */
.c-product_info__description a.kkd-pdp-campaign-banner,
.kk-mobile-campaign-top > a.kkd-pdp-campaign-banner,
.kk-desktop-campaign-top > a.kkd-pdp-campaign-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  text-decoration: none;
}
.c-product_info__description .kkd-pdp-campaign-banner__image,
.kk-mobile-campaign-top .kkd-pdp-campaign-banner__image,
.kk-desktop-campaign-top .kkd-pdp-campaign-banner__image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
}
.c-product_info__description a.kkd-pdp-campaign-banner:focus-visible,
.kk-mobile-campaign-top > a.kkd-pdp-campaign-banner:focus-visible,
.kk-desktop-campaign-top > a.kkd-pdp-campaign-banner:focus-visible {
  outline: 3px solid #A71F28;
  outline-offset: 3px;
}


/* REDMINE-11897: CMS-editable shipping copy uses the existing PDP purchase
   box. Long text should wrap instead of widening or shifting purchase CTAs. */
.kk-buy-panel .pl-ship-note {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}


/* REDMINE-11912: move native option01 bottom LP to the mobile top, preserving option08. */
/* Keep original desktop LP flow intact while preventing its intrinsic media
   from overflowing the narrower PDP detail column. */
.p-product_content #option08 img,
.p-product_content #option08 video { max-width:100%;height:auto; }

.kk-mobile-lp-top:empty, .kk-mobile-campaign-top:empty, .kk-desktop-campaign-top:empty { display: none; }
/* REDMINE-11911 / G239: one active campaign node, no reserved space without a banner. */
.kk-mobile-campaign-top, .kk-desktop-campaign-top { display:none; }
@media (min-width:768px) {
  .kk-desktop-campaign-top:not(:empty) { display:flow-root;width:100%;max-width:100%;min-width:0; }
}
@media (max-width:767px) {
  .kk-mobile-campaign-top:not(:empty) { display:flow-root;width:100%;max-width:100%;min-width:0;margin:0 auto; }
}
@media (max-width:767px) {
  .kk-mobile-lp-top { width:100%;max-width:100%;min-width:0;margin:0 auto 22px;overflow:hidden; }
  .kk-mobile-lp-top #option01 { display:block!important;width:100%;max-width:100%;min-width:0;margin:0; }
  .kk-mobile-lp-top img, .kk-mobile-lp-top video { display:block;max-width:100%;height:auto; }
  .kk-mobile-lp-top iframe { max-width:100%; }
  .kk-opt1-full[data-kk-mobile-lp-relocated] { display:none !important; }
}

/* REDMINE-11910: keep EC-FORCE standard floating shell and shared CTA skin. */
#product-show-view [data-kk-pdp-scroll-cta][hidden] { display: none !important; }
@media (max-width:767px) {
  #product-show-view [data-kk-pdp-scroll-cta] {
    box-sizing: border-box;
    z-index: 55;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}
