/* GT Stripe Physical Cart Front CSS
 * Mobile-first layout.
 * Base styles target smartphone widths.
 * Desktop/tablet enhancements are added with min-width media queries.
 */

/* =========================================================
   Base box / messages
========================================================= */
.gtspc-box {
	border: 1px solid #e5e5e5;
	padding: 18px;
	margin: 24px 0;
	background: #fff;
	box-sizing: border-box;
}

.gtspc-title,
.post_contents .gtspc-cart .gtspc-title,
.post_contents .gtspc-customer-profile .gtspc-title,
.post_contents .gtspc-profile .gtspc-title {
	margin: 0 0 34px;
	font-size: 24px;
	font-weight: normal;
	line-height: 1.35;
	letter-spacing: 0.06em;
}

.gtspc-message {
	padding: 12px 14px;
	margin-bottom: 16px;
	border: 1px solid #ddd;
	font-size: 14px;
	line-height: 1.7;
}

.gtspc-message--success {
	background: #f4fbf4;
	border-color: #b6dfb6;
}

.gtspc-message--error,
.gtspc-error {
	background: #fff5f5;
	border-color: #e0a7a7;
}

.gtspc-help,
.post_contents .gtspc-cart .gtspc-help {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #666;
}

.gtspc-description,
.post_contents .gtspc-cart .gtspc-description {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.8;
	color: #666;
}

/* =========================================================
   Form fields
========================================================= */
.gtspc-field {
	display: block;
	margin-bottom: 16px;
}

.gtspc-field > span,
.gtspc-field span {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.04em;
}

.gtspc-field select,
.gtspc-field input,
.gtspc-cart-table input[type="number"] {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
	font-size: 15px;
	line-height: 1.4;
	box-sizing: border-box;
}

.gtspc-field select:focus,
.gtspc-field input:focus,
.gtspc-cart-table input[type="number"]:focus {
	outline: none;
	border-color: #111;
}

.gtspc-field--qty input,
.gtspc-cart-table input[type="number"] {
	max-width: 96px;
}

.gtspc-field-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-bottom: 16px;
}

.gtspc-field-row .gtspc-field {
	margin-bottom: 0;
}

/* Current shortcode may output inline style on .gtspc-field-row--two.
   !important is intentionally used so stylesheet control wins. */
.gtspc-field-row--two,
.gtspc-customer-profile .gtspc-field-row--two,
.gtspc-profile .gtspc-field-row--two {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 12px !important;
	align-items: end !important;
	margin-bottom: 16px;
}

.gtspc-field-row--two .gtspc-field {
	margin-bottom: 0 !important;
}

/* Checkout-specific input widths */
.gtspc-cart .gtspc-checkout-form {
	width: 100%;
}

.gtspc-cart .gtspc-field input,
.gtspc-cart .gtspc-field select {
	width: 100%;
	box-sizing: border-box;
}

.gtspc-cart input[name="gtspc_customer_postal_code"],
.gtspc-cart input[name="gtspc_shipping_postal_code"] {
	max-width: 180px;
}

.gtspc-cart select[name="gtspc_customer_state"],
.gtspc-cart select[name="gtspc_shipping_state"] {
	max-width: 220px;
}

.gtspc-cart input[name="gtspc_customer_phone"] {
	max-width: 240px;
}

/* =========================================================
   Buttons / links
========================================================= */
.gtspc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border: 1px solid #222;
	border-radius: 0;
	background: #222;
	color: #fff;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}

.gtspc-button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.gtspc-button--secondary {
	background: #fff;
	color: #222;
}
/* customer profile: member tabs */
.gtspc-member-tabs {
	margin-bottom: 40px;
}
.gtspc-button--checkout {
	width: 100%;
	min-height: 56px;
	margin-top: 0;
	background: #111;
	color: #fff;
	border-color: #111;
	font-size: 16px;
	letter-spacing: 0.08em;
}

.gtspc-link-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 0 20px;
	border: 1px solid #ccc;
	background: transparent;
	color: inherit;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}

/* =========================================================
   Cart table / totals
========================================================= */
.gtspc-product-cart__price {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: center;
	margin-bottom: 16px;
	font-size: 15px;
}

.gtspc-cart-total {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	align-items: center;
	flex-wrap: nowrap;
	margin-bottom: 16px;
	font-size: 15px;
}

.gtspc-cart-total > span,
.gtspc-cart-total > strong {
	flex: 0 0 auto;
	white-space: nowrap;
}

.gtspc-cart-total > strong {
	text-align: right;
}

.gtspc-cart-total strong {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}
/* 送料メッセージはスマホで折り返し可能にする */
.gtspc-cart .gtspc-cart-total--shipping {
	align-items: flex-start;
}

.gtspc-cart .gtspc-cart-total--shipping > span {
	flex: 0 0 auto;
	white-space: nowrap;
}

.gtspc-cart .gtspc-cart-total--shipping > strong,
.gtspc-cart .gtspc-cart-total--shipping strong[data-gtspc-shipping-fee] {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	font-weight: normal;
	line-height: 1.5;
	text-align: right;
	white-space: normal !important;
	overflow-wrap: break-word;
	word-break: normal;
}
.gtspc-cart-total--shipping {
	color: #555;
}

.gtspc-cart-total--grand {
	margin-top: 10px;
	padding-top: 14px;
	border-top: 1px solid #ddd;
	font-size: 15px;
}

.gtspc-cart-total--grand span {
	font-size: 15px;
	font-weight: normal;
}

.gtspc-cart-total--grand strong,
.gtspc-cart-total--grand strong[data-gtspc-grand-total] {
	font-size: 16px;
	font-weight: 600;
}

.gtspc-cart-table-wrap {
	overflow-x: auto;
	margin-bottom: 20px;
	-webkit-overflow-scrolling: touch;
}

.gtspc-cart-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	font-size: 14px;
}

.gtspc-cart-table th,
.gtspc-cart-table td {
	padding: 10px 8px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
	white-space: nowrap;
}

.gtspc-order-summary {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}
/* checkout: coupon area */
.gtspc-coupon-box {
	margin-bottom: 32px;
}

/* =========================================================
   Cart / checkout page
========================================================= */
.gtspc-cart.gtspc-box {
	max-width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding: 28px 16px;
}

.gtspc-checkout-summary,
.gtspc-customer-login-box,
.gtspc-customer-register-box,
.gtspc-checkout-form > .gtspc-checkout-fields,
.gtspc-different-shipping__body {
	width: 100%;
	margin-bottom: 24px;
	padding: 18px;
	border: 1px solid #e5e5e5;
	background: #fff;
	box-sizing: border-box;
}

.gtspc-checkout-summary {
	background: #fafafa;
}

.gtspc-checkout-heading,
.post_contents .gtspc-cart .gtspc-checkout-heading,
.post_contents .gtspc-customer-profile .gtspc-checkout-heading,
.post_contents .gtspc-profile .gtspc-checkout-heading {
	margin: 24px 0 24px;
	font-size: 17px;
	font-weight: normal;
	line-height: 1.5;
	letter-spacing: 0.06em;
}

.gtspc-shipping-summary__note,
.post_contents .gtspc-cart .gtspc-shipping-summary__note {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.7;
	color: #777;
}

.gtspc-customer-login-form,
.gtspc-customer-register-form {
	display: grid;
	gap: 16px;
}

.gtspc-cart-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: 20px;
}

.gtspc-cart-actions--login,
.gtspc-cart-actions--register {
	margin-top: 18px;
}

.gtspc-cart-actions--checkout {
	margin-top: 30px;
}

.gtspc-register-details {
	margin-top: 16px;
}

.gtspc-register-details > summary,
.gtspc-different-shipping__summary {
	list-style: none;
	cursor: pointer;
}

.gtspc-register-details > summary::-webkit-details-marker,
.gtspc-different-shipping__summary::-webkit-details-marker {
	display: none;
}

.gtspc-different-shipping {
	margin-bottom: 24px;
	padding: 0;
	border: 0;
}

.gtspc-different-shipping__summary {
	width: 100%;
}

.gtspc-different-shipping__body {
	margin-top: 18px;
	background: #fafafa;
}

/* =========================================================
   Customer profile page
========================================================= */
.gtspc-customer-profile.gtspc-box,
.gtspc-profile.gtspc-box {
	max-width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding: 28px 16px;
}

/* =========================================================
   Product page add-to-cart button
========================================================= */
.product_cart_button_area .gtspc-product-cart {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin-top: 18px;
}

.product_cart_button_area .gtspc-add-to-cart-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	max-width: 100%;
}

.product_cart_button_area .gtspc-field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.04em;
}

.product_cart_button_area .gtspc-field > span {
	min-width: 48px;
	margin-bottom: 0;
	font-size: 12px;
	line-height: 1.4;
}

.product_cart_button_area .gtspc-field select,
.product_cart_button_area .gtspc-field input[type="number"] {
	width: 100%;
	max-width: 210px;
	height: 34px;
	min-height: 34px;
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.4;
	border: 1px solid #d8d8d8;
	border-radius: 0;
	background-color: #fff;
	box-sizing: border-box;
}

.product_cart_button_area .gtspc-field--qty input[type="number"] {
	max-width: 80px;
}

.product_cart_button_area .gtspc-button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	height: 60px;
	min-height: 60px;
	margin-top: 8px;
	padding: 0 64px 0 30px;
	background: #111;
	border: 1px solid #111;
	border-radius: 0;
	color: #fff;
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 1;
	text-align: center;
	box-shadow: 0 7px 14px rgba(0, 0, 0, 0.16);
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.product_cart_button_area .gtspc-button::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 42px;
	width: 36px;
	height: 1px;
	background-color: #fff;
	transform: translateY(-50%);
}

.product_cart_button_area .gtspc-button::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 42px;
	width: 12px;
	height: 1px;
	background-color: #fff;
	transform: translateY(-50%) rotate(32deg);
	transform-origin: right center;
}

.product_cart_button_area .gtspc-button:hover {
	opacity: 0.86;
	transform: translateY(-1px);
}

.product_cart_button_area .gtspc-button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

.product_cart_button_area .gtspc-product-cart__stock {
	font-size: 12px;
	margin: 0;
}

/* =========================================================
   Tablet / desktop enhancement
========================================================= */
@media (min-width: 768px) {
	.gtspc-box {
		padding: 24px;
	}

	.gtspc-title,
	.post_contents .gtspc-cart .gtspc-title,
	.post_contents .gtspc-customer-profile .gtspc-title,
	.post_contents .gtspc-profile .gtspc-title {
		margin-bottom: 44px;
		font-size: 28px;
	}

	.gtspc-field-row--two,
	.gtspc-customer-profile .gtspc-field-row--two,
	.gtspc-profile .gtspc-field-row--two {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 16px !important;
	}

	.gtspc-cart.gtspc-box,
	.gtspc-customer-profile.gtspc-box,
	.gtspc-profile.gtspc-box {
		max-width: 900px;
		padding: 40px 32px;
	}

	.gtspc-checkout-summary,
	.gtspc-customer-login-box,
	.gtspc-customer-register-box,
	.gtspc-checkout-form > .gtspc-checkout-fields,
	.gtspc-different-shipping__body {
		margin-bottom: 28px;
		padding: 24px;
	}

	.gtspc-customer-login-box,
	.gtspc-customer-register-box {
		max-width: 100%;
	}

	.gtspc-cart-table {
		min-width: 0;
	}

	.gtspc-cart-table th,
	.gtspc-cart-table td {
		padding: 12px;
		white-space: normal;
	}

	.gtspc-cart-actions {
		flex-direction: row;
		align-items: center;
		gap: 16px;
	}

	.gtspc-cart-actions--checkout {
		margin-top: 32px;
	}

	.gtspc-button--checkout {
		width: 100%;
		max-width: 360px;
		min-height: 58px;
	}

	.gtspc-link-button {
		width: auto;
		min-height: 58px;
		padding: 0 24px;
	}

	.gtspc-cart .gtspc-field input,
	.gtspc-cart .gtspc-field select {
		max-width: 520px;
	}

	.gtspc-cart .gtspc-field-row--two {
		max-width: 520px;
	}

	.gtspc-cart input[name="gtspc_customer_postal_code"],
	.gtspc-cart input[name="gtspc_shipping_postal_code"] {
		max-width: 180px;
	}

	.gtspc-cart select[name="gtspc_customer_state"],
	.gtspc-cart select[name="gtspc_shipping_state"] {
		max-width: 220px;
	}

	.gtspc-cart input[name="gtspc_customer_phone"] {
		max-width: 240px;
	}

	.gtspc-cart-total {
		gap: 16px;
	}

	.gtspc-cart-total--grand,
	.gtspc-cart-total--grand span {
		font-size: 15px;
	}

	.gtspc-cart-total--grand strong,
	.gtspc-cart-total--grand strong[data-gtspc-grand-total] {
		font-size: 16px;
	}

	.gtspc-checkout-heading,
	.post_contents .gtspc-cart .gtspc-checkout-heading,
	.post_contents .gtspc-customer-profile .gtspc-checkout-heading,
	.post_contents .gtspc-profile .gtspc-checkout-heading {
		margin-bottom: 28px;
	}

	.product_cart_button_area .gtspc-add-to-cart-form {
		max-width: 320px;
	}

	.product_cart_button_area .gtspc-button {
		max-width: 320px;
		height: 66px;
		min-height: 66px;
		padding: 0 72px 0 36px;
		font-size: 19px;
	}

	.product_cart_button_area .gtspc-button::before {
		right: 58px;
		width: 42px;
	}

	.product_cart_button_area .gtspc-button::after {
		right: 58px;
		width: 14px;
	}
}
