/*
 * Komachi EC — フロントエンドスタイル
 * モバイルファースト・レスポンシブ
 */

/* ============================================================
   フォーム共通: iOS Safari 自動ズーム防止
   font-size が 16px 未満の入力欄にフォーカスすると
   iOS Safari が画面を自動ズームするため 16px に統一する。
   ============================================================ */

.komachi-ec-login input,
.komachi-ec-login select,
.komachi-ec-login textarea,
.komachi-ec-register input,
.komachi-ec-register select,
.komachi-ec-register textarea,
.komachi-ec-checkout input,
.komachi-ec-checkout select,
.komachi-ec-checkout textarea,
.komachi-ec-mypage input,
.komachi-ec-mypage select,
.komachi-ec-mypage textarea,
.komachi-ec-cart input,
.komachi-ec-cart select,
.komachi-ec-cart textarea {
	font-size: 16px;
}

/* ============================================================
   フォーム共通
   ============================================================ */

.komachi-ec-form-row {
	margin-bottom: 1rem;
}

.komachi-ec-form-row label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
	color: #333;
}

.komachi-ec-form-row input[type="text"],
.komachi-ec-form-row input[type="email"],
.komachi-ec-form-row input[type="tel"],
.komachi-ec-form-row input[type="password"],
.komachi-ec-form-row input[type="number"],
.komachi-ec-form-row input[type="url"],
.komachi-ec-form-row select,
.komachi-ec-form-row textarea {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.komachi-ec-form-row input:focus,
.komachi-ec-form-row select:focus,
.komachi-ec-form-row textarea:focus {
	border-color: #2980b9;
	box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.15);
	outline: none;
}

.komachi-ec-form-row--submit {
	margin-top: 1.5rem;
}

.komachi-ec-required {
	color: #c0392b;
	font-weight: 400;
}

.komachi-ec-form-hint {
	font-size: 0.8rem;
	color: #888;
	margin: 0.3rem 0 0;
}

/* チェックアウト: セクション余白 */
.komachi-ec-checkout__section {
	margin-bottom: 2rem;
	padding-bottom: 0.5rem;
}

.komachi-ec-checkout__section h2 {
	margin-bottom: 1rem;
}

/* チェックアウト: フィールドレイアウト */
.komachi-ec-checkout .komachi-ec-form-row {
	display: flex;
	gap: 1rem;
}

.komachi-ec-checkout .komachi-ec-form-field {
	flex: 1;
}

.komachi-ec-checkout .komachi-ec-form-field--full {
	flex: 0 0 100%;
}

.komachi-ec-checkout .komachi-ec-form-field--postal {
	flex: 0 0 180px;
}

.komachi-ec-checkout .komachi-ec-form-field label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
	color: #333;
}

.komachi-ec-checkout .komachi-ec-form-field input,
.komachi-ec-checkout .komachi-ec-form-field select,
.komachi-ec-checkout .komachi-ec-form-field textarea {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

.komachi-ec-checkout .komachi-ec-form-field input:focus,
.komachi-ec-checkout .komachi-ec-form-field select:focus,
.komachi-ec-checkout .komachi-ec-form-field textarea:focus {
	border-color: #2980b9;
	box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.15);
	outline: none;
}

@media (max-width: 599px) {
	.komachi-ec-checkout .komachi-ec-form-row {
		flex-direction: column;
		gap: 0;
	}
	.komachi-ec-checkout .komachi-ec-form-field--postal {
		flex: 0 0 auto;
	}
}

/* チェックアウト: 注文テーブル金額右寄せ */
.komachi-ec-checkout__order-table td:nth-child(2),
.komachi-ec-checkout__order-table td:nth-child(3),
.komachi-ec-checkout__order-table td:nth-child(4),
.komachi-ec-checkout__order-table th:nth-child(2),
.komachi-ec-checkout__order-table th:nth-child(3),
.komachi-ec-checkout__order-table th:nth-child(4) {
	text-align: right;
}

.komachi-ec-checkout__order-table tfoot td {
	text-align: right;
}

/* チェックアウト: アクションボタン */
.komachi-ec-checkout__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 1.5rem;
}

/* 郵便番号検索ステータス */
.komachi-ec-postal-status {
	display: inline-block;
	font-size: 0.8rem;
	margin-left: 0.5rem;
	vertical-align: middle;
	line-height: 1;
}

.komachi-ec-postal-status--loading {
	color: #888;
}

.komachi-ec-postal-status--loading::before {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid #ccc;
	border-top-color: #888;
	border-radius: 50%;
	animation: komachi-ec-spin 0.6s linear infinite;
	margin-right: 4px;
	vertical-align: middle;
}

@keyframes komachi-ec-spin {
	to { transform: rotate(360deg); }
}

.komachi-ec-postal-status--success {
	color: #27ae60;
}

.komachi-ec-postal-status--success::before {
	content: '✓ ';
}

.komachi-ec-postal-status--error {
	color: #c0392b;
}

.komachi-ec-postal-status--error::before {
	content: '✕ ';
}

/* チェックアウト: 配送先と同じトグル */
.komachi-ec-checkout__billing-toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #f9f9f9;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.komachi-ec-checkout__billing-toggle:hover {
	border-color: #999;
}

.komachi-ec-checkout__billing-toggle input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
}

.komachi-ec-checkout__billing-toggle span {
	font-size: 0.95rem;
	font-weight: 500;
	color: #333;
}

/* ============================================================
   商品一覧グリッド
   ============================================================ */

.komachi-ec-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 1.5rem 0;
}

@media (min-width: 600px) {
	.komachi-ec-products--cols-2,
	.komachi-ec-products--cols-3,
	.komachi-ec-products--cols-4,
	.komachi-ec-products--cols-5,
	.komachi-ec-products--cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.komachi-ec-products--cols-3 { grid-template-columns: repeat(3, 1fr); }
	.komachi-ec-products--cols-4 { grid-template-columns: repeat(4, 1fr); }
	.komachi-ec-products--cols-5 { grid-template-columns: repeat(5, 1fr); }
	.komachi-ec-products--cols-6 { grid-template-columns: repeat(6, 1fr); }
}

.komachi-ec-products__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #666;
	padding: 2rem 0;
}

/* ============================================================
   カテゴリタブ
   ============================================================ */

.komachi-ec-category-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.komachi-ec-category-tab {
	display: inline-block;
	padding: 0.4rem 1rem;
	border: 1px solid #ccc;
	border-radius: 2rem;
	background: #fff;
	color: #555;
	font-size: 0.875rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	cursor: pointer;
}

.komachi-ec-category-tab:hover {
	background: #f5f5f5;
	border-color: #999;
	color: #333;
}

.komachi-ec-category-tab.is-active {
	background: #333;
	border-color: #333;
	color: #fff;
	font-weight: 600;
}

/* ============================================================
   商品カード
   ============================================================ */

.komachi-ec-product-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
	cursor: pointer;
}

.komachi-ec-product-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.komachi-ec-product-card__image-link {
	display: block;
	overflow: hidden;
}

.komachi-ec-product-card__image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.komachi-ec-product-card__image-link:hover .komachi-ec-product-card__image {
	transform: scale(1.03);
}

.komachi-ec-product-card__image-placeholder {
	width: 100%;
	height: 200px;
	background: #f5f5f5;
}

.komachi-ec-product-card__body {
	padding: 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.komachi-ec-product-card__name {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

.komachi-ec-product-card__category {
	font-size: 0.8rem;
	color: #888;
	margin: 0;
}

.komachi-ec-product-card__price {
	font-size: 1.1rem;
	font-weight: 700;
	color: #c0392b;
	margin: 0;
}

.komachi-ec-product-card__tax {
	font-size: 0.75rem;
	font-weight: 400;
	color: #666;
}

.komachi-ec-product-card__soldout {
	display: inline-block;
	font-size: 0.8rem;
	background: #bbb;
	color: #fff;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	margin: 0;
}

/* ============================================================
   商品単品
   ============================================================ */

.komachi-ec-product-single {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 1.5rem 0;
}

@media (min-width: 768px) {
	.komachi-ec-product-single {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

.komachi-ec-product-single__image-wrap {
	border-radius: 6px;
	overflow: hidden;
}

.komachi-ec-product-single__image {
	width: 100%;
	height: auto;
	display: block;
}

.komachi-ec-product-single__info {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.komachi-ec-product-single__category {
	font-size: 0.85rem;
	color: #888;
	margin: 0;
}

.komachi-ec-product-single__name {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

.komachi-ec-product-single__price {
	font-size: 1.6rem;
	font-weight: 700;
	color: #c0392b;
	margin: 0;
}

.komachi-ec-product-single__tax {
	font-size: 0.85rem;
	font-weight: 400;
	color: #666;
}

.komachi-ec-product-single__soldout {
	display: inline-block;
	font-size: 0.9rem;
	background: #bbb;
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	margin: 0;
}

.komachi-ec-product-single__description {
	font-size: 0.95rem;
	line-height: 1.7;
	color: #333;
	margin: 0;
}

/* ============================================================
   お届け予定日
   ============================================================ */

.komachi-ec-delivery-estimate {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.3rem 0.4rem;
	font-size: 0.9rem;
	color: #2c7a2c;
	background: #f0f9f0;
	border: 1px solid #c8e6c8;
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
	margin-top: 0.5rem;
}

.komachi-ec-delivery-estimate__icon {
	font-size: 1.1rem;
	flex-shrink: 0;
}

.komachi-ec-delivery-estimate__text {
	font-weight: 600;
}

.komachi-ec-delivery-estimate__note {
	font-size: 0.8rem;
	color: #666;
	font-weight: 400;
}

/* ============================================================
   カートに追加ボタン
   ============================================================ */

.komachi-ec-add-to-cart {
	display: block;
	width: 100%;
	padding: 0.6rem 1rem;
	background: #2980b9;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
	margin-top: auto;
}

.komachi-ec-add-to-cart:hover:not(:disabled) {
	background: #1a6fa0;
}

.komachi-ec-add-to-cart:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.komachi-ec-add-to-cart__message {
	display: block;
	font-size: 0.8rem;
	margin-top: 0.3rem;
	min-height: 1.2em;
}

.komachi-ec-add-to-cart__message[data-type="success"] { color: #27ae60; }
.komachi-ec-add-to-cart__message[data-type="error"]   { color: #c0392b; }

/* ============================================================
   カートアイコン
   ============================================================ */

.komachi-ec-cart-icon {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	text-decoration: none;
	color: inherit;
	position: relative;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
}

.komachi-ec-cart-icon__icon {
	font-size: 1.4rem;
	line-height: 1;
}

.komachi-ec-cart-icon__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding: 0 0.3rem;
	background: #c0392b;
	color: #fff;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
}

/* フローティングカートボタン（全ページ固定表示） */
.komachi-ec-floating-cart {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	z-index: 9998;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: #2c3e50;
	color: #fff;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
}

.komachi-ec-floating-cart:hover {
	transform: scale(1.1);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
}

.komachi-ec-floating-cart .komachi-ec-cart-icon__icon {
	font-size: 1.5rem;
	line-height: 1;
}

.komachi-ec-floating-cart .komachi-ec-cart-icon__count {
	position: absolute;
	top: -0.25rem;
	right: -0.25rem;
}

/* ============================================================
   カートページ
   ============================================================ */

.komachi-ec-cart {
	margin: 1.5rem 0;
}

.komachi-ec-cart__empty {
	text-align: center;
	color: #666;
	padding: 3rem 0;
}

.komachi-ec-cart__table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5rem;
}

.komachi-ec-cart__table th,
.komachi-ec-cart__table td {
	padding: 0.75rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
	vertical-align: middle;
}

.komachi-ec-cart__table th {
	font-size: 0.85rem;
	color: #666;
	font-weight: 600;
}

.komachi-ec-cart__col-price { width: 100px; text-align: right !important; }
.komachi-ec-cart__col-qty { width: 110px; text-align: center !important; }
.komachi-ec-cart__col-subtotal { width: 100px; text-align: right !important; }
.komachi-ec-cart__col-remove { width: 2rem; text-align: center; }

.komachi-ec-cart__product-image {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 0.5rem;
}

a.komachi-ec-cart__product-name {
	vertical-align: middle;
	color: #333;
	text-decoration: none;
}

a.komachi-ec-cart__product-name:hover {
	color: #2980b9;
	text-decoration: underline;
}

/* 数量コントロール */

.komachi-ec-cart__qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.komachi-ec-cart__qty-btn {
	width: 2rem;
	height: 2rem;
	background: #f5f5f5;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	transition: background 0.15s;
}

.komachi-ec-cart__qty-btn:hover {
	background: #e0e0e0;
}

.komachi-ec-cart__qty-input {
	width: 3rem;
	height: 2rem;
	border: none;
	border-left: 1px solid #ddd;
	border-right: 1px solid #ddd;
	text-align: center;
	font-size: 0.95rem;
	-moz-appearance: textfield;
}

.komachi-ec-cart__qty-input::-webkit-inner-spin-button,
.komachi-ec-cart__qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

/* 削除ボタン */

.komachi-ec-cart__remove-btn {
	background: none;
	border: none;
	color: #999;
	font-size: 1.2rem;
	cursor: pointer;
	padding: 0.25rem;
	line-height: 1;
	transition: color 0.15s;
}

.komachi-ec-cart__remove-btn:hover {
	color: #c0392b;
}

/* 合計エリア */

.komachi-ec-cart__totals {
	max-width: 400px;
	margin-left: auto;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.komachi-ec-cart__totals-row {
	display: flex;
	justify-content: space-between;
	padding: 0.4rem 0;
	font-size: 0.95rem;
	border-bottom: 1px solid #f0f0f0;
}

.komachi-ec-cart__totals-row:last-child {
	border-bottom: none;
}

.komachi-ec-cart__totals-row--total {
	font-size: 1.1rem;
	font-weight: 700;
	color: #c0392b;
	padding-top: 0.75rem;
	margin-top: 0.25rem;
	border-top: 2px solid #e0e0e0;
}

/* 送料目安 */

.komachi-ec-cart__shipping-guide {
	margin: 0.5rem 0;
	padding: 0.5rem 0.75rem;
	background: #f9f9f9;
	border-radius: 4px;
	font-size: 0.85rem;
	color: #555;
}

.komachi-ec-cart__shipping-guide-label {
	margin: 0 0 0.3rem;
	font-weight: 600;
	color: #444;
}

.komachi-ec-cart__shipping-guide-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.komachi-ec-cart__shipping-guide-list li {
	display: flex;
	justify-content: space-between;
}

/* カートテーブル: 数値列右寄せ */
.komachi-ec-cart__col-price,
.komachi-ec-cart__col-qty,
.komachi-ec-cart__col-subtotal {
	text-align: right;
	white-space: nowrap;
}

/* アクションエリア */

.komachi-ec-cart__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.75rem;
}

.komachi-ec-cart__checkout-btn {
	display: block;
	width: 100%;
	max-width: 400px;
	text-align: center;
	padding: 1rem 2rem;
	font-size: 1.1rem;
}

.komachi-ec-cart__sub-links {
	display: flex;
	gap: 1.5rem;
	font-size: 0.9rem;
}

.komachi-ec-cart__sub-links a {
	color: #555;
	text-decoration: none;
}

.komachi-ec-cart__sub-links a:hover {
	color: #333;
	text-decoration: underline;
}

.komachi-ec-btn {
	display: inline-block;
	padding: 0.75rem 2rem;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease;
}

.komachi-ec-btn--primary {
	background: #2980b9;
	color: #fff;
	border: none;
}

.komachi-ec-btn--primary:hover {
	background: #1a6fa0;
	color: #fff;
}

.komachi-ec-btn--secondary {
	background: #fff;
	color: #333;
	border: 1px solid #ccc;
}

.komachi-ec-btn--secondary:hover {
	background: #f5f5f5;
	color: #333;
}

.komachi-ec-btn--checkout {
	background: #27ae60;
	color: #fff;
	border: none;
}

.komachi-ec-btn--checkout:hover {
	background: #1e8449;
	color: #fff;
}

.komachi-ec-btn--small {
	padding: 0.4rem 0.8rem;
	font-size: 0.85rem;
}

.komachi-ec-btn--danger {
	background: #fff;
	color: #c0392b;
	border: 1px solid #c0392b;
}

.komachi-ec-btn--danger:hover {
	background: #c0392b;
	color: #fff;
}

/* ============================================================
   パスワード表示/非表示トグル
   ============================================================ */

.komachi-ec-password-field {
	position: relative;
	display: flex;
	align-items: center;
}

.komachi-ec-password-field input[type="password"],
.komachi-ec-password-field input[type="text"] {
	flex: 1;
	padding-right: 2.75rem;
}

.komachi-ec-password-toggle {
	position: absolute;
	right: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0.25rem;
	cursor: pointer;
	color: #666;
	line-height: 1;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.komachi-ec-password-toggle:hover {
	color: #333;
}

/* ============================================================
   お気に入りトグルボタン
   ============================================================ */

.komachi-ec-wishlist-toggle {
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 0.3rem 0.6rem;
	cursor: pointer;
	font-size: 1rem;
	color: #999;
	line-height: 1;
	transition: color 0.15s, border-color 0.15s;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.4rem;
}

.komachi-ec-wishlist-toggle:hover,
.komachi-ec-wishlist-toggle[data-in-wishlist="1"] {
	color: #e74c3c;
	border-color: #e74c3c;
}

.komachi-ec-wishlist-toggle[data-in-wishlist="1"] .komachi-ec-wishlist-toggle__icon {
	content: '♥';
}

.komachi-ec-wishlist-toggle--large {
	padding: 0.5rem 1.25rem;
	font-size: 1rem;
}

/* ============================================================
   マイページ: お気に入り一覧
   ============================================================ */

.komachi-ec-wishlist__empty {
	color: #666;
	padding: 2rem 0;
}

.komachi-ec-wishlist__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.komachi-ec-wishlist__item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #fff;
}

.komachi-ec-wishlist__item-image {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

.komachi-ec-wishlist__item-image-placeholder {
	width: 70px;
	height: 70px;
	background: #f5f5f5;
	border-radius: 4px;
	flex-shrink: 0;
}

.komachi-ec-wishlist__item-info {
	flex: 1;
}

.komachi-ec-wishlist__item-name {
	font-weight: 600;
	margin: 0 0 0.25rem;
}

.komachi-ec-wishlist__item-price {
	color: #c0392b;
	font-weight: 700;
	margin: 0;
}

.komachi-ec-wishlist__item-tax {
	font-size: 0.8rem;
	font-weight: 400;
	color: #666;
}

.komachi-ec-wishlist__item-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
	flex-shrink: 0;
}

.komachi-ec-wishlist__item-add {
	width: auto;
	font-size: 0.85rem;
	padding: 0.4rem 0.8rem;
}

.komachi-ec-wishlist__item-soldout {
	font-size: 0.85rem;
	color: #999;
}

.komachi-ec-wishlist__item-remove {
	margin-top: 0;
	border-color: transparent;
}

/* ============================================================
   チェックアウト ステップインジケーター
   ============================================================ */

.komachi-ec-checkout__steps {
	display: flex;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	counter-reset: step;
}

.komachi-ec-checkout__steps li {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	font-size: 0.8rem;
	color: #aaa;
	text-align: center;
}

/* ステップ間の接続線（左隣ステップとの間） */
.komachi-ec-checkout__steps li + li::before {
	content: '';
	position: absolute;
	top: 1.1rem;
	right: 50%;
	left: -50%;
	height: 2px;
	background: #e0e0e0;
	z-index: 0;
}

/* 番号サークル */
.komachi-ec-checkout__steps li::after {
	content: counter(step);
	counter-increment: step;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	border: 2px solid #e0e0e0;
	background: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	color: #aaa;
	margin-bottom: 0.4rem;
	order: -1;
	position: relative;
	z-index: 1;
}

/* アクティブステップ */
.komachi-ec-checkout__steps li.is-active {
	color: #333;
	font-weight: 600;
}

.komachi-ec-checkout__steps li.is-active::after {
	background: #333;
	border-color: #333;
	color: #fff;
}

/* 完了済みステップ */
.komachi-ec-checkout__steps li.is-done {
	color: #666;
}

.komachi-ec-checkout__steps li.is-done::after {
	content: '✓';
	background: #555;
	border-color: #555;
	color: #fff;
}

.komachi-ec-checkout__steps li.is-done + li::before,
.komachi-ec-checkout__steps li.is-done::before {
	background: #555;
}

/* ============================================================
   ミニカートドロワー
   ============================================================ */

/* ドロワー全体（デフォルト非表示） */
.komachi-ec-mini-cart {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
}

.komachi-ec-mini-cart.is-open {
	pointer-events: auto;
}

/* バックドロップ */
.komachi-ec-mini-cart__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.komachi-ec-mini-cart.is-open .komachi-ec-mini-cart__backdrop {
	opacity: 1;
}

/* パネル本体 */
.komachi-ec-mini-cart__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: 360px;
	max-width: 90vw;
	height: 100%;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.komachi-ec-mini-cart.is-open .komachi-ec-mini-cart__panel {
	transform: translateX(0);
}

/* ヘッダー */
.komachi-ec-mini-cart__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.2rem;
	border-bottom: 1px solid #e0e0e0;
}

.komachi-ec-mini-cart__title {
	font-size: 1rem;
	font-weight: 700;
}

.komachi-ec-mini-cart__close {
	background: none;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	padding: 0.2rem 0.4rem;
	color: #555;
	line-height: 1;
}

.komachi-ec-mini-cart__close:hover {
	color: #000;
}

/* 商品リスト */
.komachi-ec-mini-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	overflow-y: auto;
}

.komachi-ec-mini-cart__item {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.9rem 1.2rem;
	border-bottom: 1px solid #f0f0f0;
}

.komachi-ec-mini-cart__item-name {
	font-size: 0.9rem;
	font-weight: 600;
}

.komachi-ec-mini-cart__item-meta {
	font-size: 0.85rem;
	color: #555;
}

.komachi-ec-mini-cart__empty {
	padding: 2rem 1.2rem;
	color: #888;
	font-size: 0.9rem;
	text-align: center;
}

/* フッター */
.komachi-ec-mini-cart__footer {
	padding: 1rem 1.2rem;
	border-top: 1px solid #e0e0e0;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.komachi-ec-mini-cart__total {
	font-weight: 700;
	font-size: 1rem;
	text-align: right;
}

.komachi-ec-mini-cart__checkout-btn {
	display: block;
	background: #2980b9;
	color: #fff;
	text-align: center;
	padding: 0.8rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	transition: background 0.2s;
}

.komachi-ec-mini-cart__checkout-btn:hover {
	background: #1a6fa0;
	color: #fff;
}

.komachi-ec-mini-cart__cart-link {
	display: block;
	text-align: center;
	padding: 0.5rem 1rem;
	text-decoration: none;
	color: #555;
	font-size: 0.9rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: background 0.2s;
}

.komachi-ec-mini-cart__cart-link:hover {
	background: #f5f5f5;
	color: #333;
}

/* body スクロールロック */
body.komachi-ec-drawer-open {
	overflow: hidden;
}

/* ==========================================================================
   レビューセクション
   ========================================================================== */

.komachi-ec-reviews {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e0e0e0;
}

.komachi-ec-reviews__title {
	font-size: 1.25rem;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.komachi-ec-reviews__avg {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 1rem;
	font-weight: normal;
	color: #555;
}

.komachi-ec-reviews__stars {
	color: #f5a623;
	letter-spacing: 0.05em;
}

.komachi-ec-reviews__count {
	font-size: 0.85rem;
	color: #888;
}

.komachi-ec-reviews__empty {
	color: #888;
	font-size: 0.95rem;
}

.komachi-ec-reviews__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.komachi-ec-reviews__item {
	padding: 1rem 1.25rem;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	background: #fafafa;
}

.komachi-ec-reviews__meta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.5rem;
}

.komachi-ec-reviews__reviewer {
	font-weight: 600;
	font-size: 0.9rem;
}

.komachi-ec-reviews__date {
	font-size: 0.8rem;
	color: #999;
}

.komachi-ec-reviews__comment {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	white-space: pre-wrap;
}

.komachi-ec-reviews__already {
	font-size: 0.9rem;
	color: #666;
}

/* レビュー投稿フォーム */
.komachi-ec-reviews__form-wrap {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px dashed #e0e0e0;
}

.komachi-ec-reviews__form-title {
	font-size: 1rem;
	margin-bottom: 1rem;
}

/* 星評価セレクタ */
.komachi-ec-star-select {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 0.1rem;
}

.komachi-ec-star-select__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.komachi-ec-star-select__label {
	cursor: pointer;
	font-size: 1.75rem;
	color: #ccc;
	transition: color 0.1s;
	line-height: 1;
}

.komachi-ec-star-select__label:has(input:checked) ~ .komachi-ec-star-select__label,
.komachi-ec-star-select__label:has(input:checked) {
	color: #f5a623;
}

.komachi-ec-star-select__label.is-hovered,
.komachi-ec-star-select__label.is-hovered ~ .komachi-ec-star-select__label {
	color: #f5a623;
}

/* レビューメッセージ */
.komachi-ec-reviews__message {
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

.komachi-ec-reviews__message.is-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #15803d;
}

.komachi-ec-reviews__message.is-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

/* 注文詳細ヘッダー（戻るリンク + また同じものを買うボタン） */
.komachi-ec-order-detail__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
