/* === BEAN 테마 변수 폴백 (스탠드얼론 = 빈 레이아웃 미사용) ===
   빈 레이아웃 사용 시 #bean_root .bean_theme-* 가 더 가까운 조상이라 자동 종속.
   기본 라이트(2차) / 라이믹스 다크모드(body.color_scheme_dark) = 다크(1차).
   배경색 버튼 가독성: --bean-onaccent = #fff (흰 글씨). */
:root{
  --bean-bg:#ffffff;--bean-card:#ffffff;--bean-surf:#eef2fb;--bean-line:#dde6f5;
  --bean-text:#1f2733;--bean-muted:#64748b;
  --bean-accent:#3b6ef0;--bean-accent2:#2554c8;--bean-onaccent:#ffffff;
}
body.color_scheme_dark{
  --bean-bg:#0f1115;--bean-card:#171a21;--bean-surf:#1e222b;--bean-line:#2c313c;
  --bean-text:#e8eaed;--bean-muted:#9aa0aa;
  --bean-accent:#3b6ef0;--bean-accent2:#2554c8;--bean-onaccent:#ffffff;
}

/* Bean Shopping — 모바일 카드 레이아웃 (BEAN 테마) */
/* 모든 색상은 --bean-* 변수에서 파생 */

/* 구독 관리 모바일 카드 */
.bshop_subscription_mobile_card {
  background: var(--bean-card);
  border: 1px solid var(--bean-line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.bshop_subscription_mobile_header {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--bean-line);
}

.bshop_subscription_mobile_image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.bshop_subscription_mobile_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--bean-line);
}

.bshop_subscription_mobile_info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bshop_subscription_mobile_title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bean-text);
  margin: 0 0 4px 0;
}

.bshop_subscription_mobile_option {
  font-size: 14px;
  color: var(--bean-muted);
  margin: 0;
}

.bshop_subscription_mobile_body {
  padding: 16px;
}

.bshop_subscription_mobile_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--bean-line);
}

.bshop_subscription_mobile_row:last-child {
  border-bottom: none;
}

.bshop_subscription_mobile_label {
  font-size: 14px;
  color: var(--bean-muted);
  font-weight: 600;
}

.bshop_subscription_mobile_value {
  font-size: 14px;
  color: var(--bean-text);
  font-weight: 600;
  text-align: right;
}

.bshop_subscription_mobile_status {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--bean-line);
}

.bshop_subscription_mobile_status.ACTIVE {
  background: color-mix(in srgb, var(--bean-accent) 14%, transparent);
  color: var(--bean-accent);
  border-color: color-mix(in srgb, var(--bean-accent) 30%, transparent);
}

.bshop_subscription_mobile_status.CANCELLED,
.bshop_subscription_mobile_status.CANCELED_REFUND,
.bshop_subscription_mobile_status.FAILED_RENEW,
.bshop_subscription_mobile_status.FAILED_INITIAL {
  background: color-mix(in srgb, var(--bean-accent2) 14%, transparent);
  color: var(--bean-accent2);
  border-color: color-mix(in srgb, var(--bean-accent2) 30%, transparent);
}

.bshop_subscription_mobile_status.PENDING {
  background: var(--bean-surf);
  color: var(--bean-text);
}

.bshop_subscription_mobile_status.OUT_OF_STOCK {
  background: var(--bean-surf);
  color: var(--bean-muted);
}

.bshop_subscription_mobile_footer {
  padding: 16px;
  background: var(--bean-surf);
  border-top: 1px solid var(--bean-line);
  text-align: center;
}

.bshop_subscription_mobile_footer .bshop_btn {
  width: 100%;
}

.bshop_subscription_mobile_footer .bshop_subscription_no_action {
  display: block;
  color: var(--bean-muted);
  font-size: 14px;
}

/* PC에서는 모바일 레이아웃 숨김 */
.bshop_mobile_only {
  display: none;
}

/* 모바일에서는 테이블 숨김 */
@media (max-width: 768px) {
  .bshop_desktop_only {
    display: none !important;
  }

  .bshop_mobile_only {
    display: block;
  }
}

/* 모바일 카드 스타일 */
.bshop_mobile_card {
  background: var(--bean-card);
  border: 1px solid var(--bean-line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.bshop_mobile_card.invalid {
  opacity: 0.55;
}

/* 이미지 영역 */
.bshop_mobile_image {
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  position: relative;
  overflow: hidden;
  background: var(--bean-surf);
}

.bshop_mobile_image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 상품 정보 */
.bshop_mobile_info {
  padding: 16px;
  border-bottom: 1px solid var(--bean-line);
}

.bshop_mobile_title {
  font-size: 18px;
  font-weight: 700;
  color: var(--bean-text);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.bshop_mobile_option {
  font-size: 14px;
  color: var(--bean-muted);
  margin: 0;
}

/* 정보 행 */
.bshop_mobile_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bean-line);
}

.bshop_mobile_row:last-child {
  border-bottom: none;
}

.bshop_mobile_label {
  font-size: 14px;
  color: var(--bean-muted);
  font-weight: 600;
}

.bshop_mobile_value {
  font-size: 16px;
  color: var(--bean-text);
  font-weight: 600;
}

.bshop_mobile_price {
  font-size: 18px;
  font-weight: 800;
  color: var(--bean-accent);
}

/* 수량 입력 */
.mobile_quantity {
  width: 80px;
  padding: 7px 8px;
  border: 1px solid var(--bean-line);
  border-radius: 9px;
  text-align: center;
  font-size: 16px;
  background: var(--bean-surf);
  color: var(--bean-text);
}

/* 삭제 버튼 */
.bshop_mobile_delete {
  padding: 16px;
}

.delete_item_mobile {
  width: 100%;
  padding: 12px;
  background: none;
  color: var(--bean-accent2);
  border: 1px solid var(--bean-accent2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.delete_item_mobile:hover {
  background: var(--bean-accent2);
  color: var(--bean-onaccent);
}

/* 빈 장바구니 */
.bshop_mobile_empty {
  padding: 60px 20px;
  text-align: center;
  background: var(--bean-card);
  border: 1px solid var(--bean-line);
  border-radius: 12px;
  color: var(--bean-muted);
  font-size: 16px;
}

/* 주문 목록 페이지용 카드 */
.bshop_order_mobile_card {
  background: var(--bean-card);
  border: 1px solid var(--bean-line);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 주문 헤더 */
.bshop_order_mobile_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bean-surf);
  border-bottom: 1px solid var(--bean-line);
}

.bshop_order_mobile_id {
  background: var(--bean-accent);
  color: var(--bean-onaccent);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.bshop_order_mobile_status {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--bean-line);
}

.bshop_order_mobile_status[data-status="DONE"],
.bshop_order_mobile_status[data-status="APPROVED"] {
  background: color-mix(in srgb, var(--bean-accent) 14%, transparent);
  color: var(--bean-accent);
  border-color: color-mix(in srgb, var(--bean-accent) 30%, transparent);
}

.bshop_order_mobile_status[data-status="WAITING_FOR_DEPOSIT"],
.bshop_order_mobile_status[data-status="PENDING"] {
  background: var(--bean-surf);
  color: var(--bean-text);
}

.bshop_order_mobile_status[data-status="CANCELED"],
.bshop_order_mobile_status[data-status="FAILED"],
.bshop_order_mobile_status[data-status="REFUNDED"] {
  background: color-mix(in srgb, var(--bean-accent2) 14%, transparent);
  color: var(--bean-accent2);
  border-color: color-mix(in srgb, var(--bean-accent2) 30%, transparent);
}

/* 주문 상품 항목 */
.bshop_order_mobile_item {
  padding: 16px;
  border-bottom: 1px solid var(--bean-line);
}

.bshop_order_mobile_item:last-child {
  border-bottom: none;
}

.bshop_order_mobile_product {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.bshop_order_mobile_thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.bshop_order_mobile_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--bean-line);
}

.bshop_order_mobile_product_info {
  flex: 1;
}

.bshop_order_mobile_product_name {
  font-size: 15px;
  font-weight: 600;
  color: var(--bean-text);
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.bshop_order_mobile_product_name a {
  color: inherit;
  text-decoration: none;
}

.bshop_order_mobile_product_option {
  font-size: 13px;
  color: var(--bean-muted);
  margin: 0;
}

.bshop_order_mobile_price_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.bshop_order_mobile_price_label {
  display: none;
}

.bshop_order_mobile_price_value {
  font-size: 16px;
  font-weight: 800;
  color: var(--bean-accent);
  width: 100%;
  text-align: right;
}

/* 주문 날짜 */
.bshop_order_mobile_footer {
  padding: 12px 16px;
  background: var(--bean-surf);
  border-top: 1px solid var(--bean-line);
  text-align: right;
  font-size: 13px;
  color: var(--bean-muted);
}

.bshop_order_mobile_footer a {
  color: var(--bean-accent);
  text-decoration: none;
  margin-left: 8px;
}

/* 반응형 조정 */
@media (max-width: 480px) {
  .bshop_mobile_card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-bottom: 12px;
  }

  .bshop_mobile_title {
    font-size: 16px;
  }

  .bshop_mobile_price {
    font-size: 16px;
  }

  .mobile_quantity {
    width: 70px;
    font-size: 14px;
  }
}
