/* values_myprices.css - 找河豚買果頁面專用樣式 */

/* === 1. 購物車左下角浮動視窗 === */
.shop-cart {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  width: min(360px, 95vw);
  max-height: 70vh;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(248,250,252,0.96);
  box-shadow: 0 16px 40px rgba(15,23,42,0.45);
  display: flex;
  flex-direction: column;
  padding: 0; /* 重置 padding，由內部元素控制 */
  border: 2px solid #facc15; /* 金黃色邊框 */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 收合狀態：只露出標題列 */
.shop-cart.shop-cart-collapsed {
  transform: translateY(calc(100% - 54px)); /* 54px 為標題列高度 */
}

/* 購物清單標題列（展開 / 收合切換） */
.shop-cart-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #713f12;
  border: none;
  padding: 14px 16px;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  z-index: 2;
}

.shop-cart-toggle-title {
  font-size: 1rem;
}

.shop-cart-toggle-arrow {
  font-size: 0.9rem;
  transition: transform 0.3s;
}
.shop-cart.shop-cart-collapsed .shop-cart-toggle-arrow {
  transform: rotate(180deg);
}

/* 內文滾動區 */
.shop-cart-body {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-cart-desc {
  font-size: 0.86rem;
  color: #c2410c;
  background: #fff7ed;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed #fdba74;
}

.shop-cart-empty {
  text-align: center;
  color: #94a3b8;
  padding: 20px;
}

.shop-cart-table-wrapper {
  margin-top: 6px;
}

.shop-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.shop-cart-table th {
  text-align: left;
  color: #94a3b8;
  font-size: 0.8rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.shop-cart-table td {
  padding: 8px 4px;
  border-bottom: 1px dashed #f1f5f9;
  vertical-align: middle;
  color: #334155;
  font-weight: 600;
}

.cart-remove-btn {
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.cart-remove-btn:hover {
  background: #fecaca;
}

.shop-cart-summary {
  background: #0f172a;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.shop-cart-summary p {
  margin: 4px 0;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
}

.shop-cart-summary span {
  color: #facc15;
  font-weight: 900;
}

/* 手續費明細（更清楚） */
.shop-cart-fee-breakdown {
  margin: 8px 0 6px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(250, 204, 21, 0.30);
  border-radius: 10px;
}

.shop-cart-fee-breakdown .fee-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  line-height: 1.35;
  font-size: 0.92rem;
}

.shop-cart-fee-breakdown .fee-label {
  flex: 1;
  min-width: 0;
  color: #f8fafc;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.shop-cart-fee-breakdown .fee-value {
  color: #facc15;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.shop-cart-fee-breakdown .fee-note {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.25);
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

/* 付款與備註 */
.shop-payment label, .shop-cart-extra label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.shop-payment select, .shop-cart-extra textarea {
  width: 100%;
  padding: 8px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}

.shop-payment select:focus, .shop-cart-extra textarea:focus {
  border-color: #3b82f6;
  outline: none;
}

.shop-payment-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 4px;
}

#shop-cart-copy-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 0 #047857;
  transition: transform 0.1s;
}
#shop-cart-copy-btn:active {
  transform: translateY(3px);
  box-shadow: none;
}

/* 手機版：拉成接近全寬，避免擋住太多畫面 */
@media (max-width: 768px) {
  .shop-cart {
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    bottom: 80px; /* 避開底部選單或按鈕 */
  }
}


/* === 2. 果實價目表 (Fruit Grid) === */
.myprices-fruit-section .card {
  padding: 16px 16px 20px;
}

.myprices-fruit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

/* 手機版強制雙欄 */
@media (max-width: 600px) {
  .myprices-fruit-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.myprices-fruit-card {
  background: #fff;
  border: 2px solid #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.myprices-fruit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: #bfdbfe;
  z-index: 5;
}

/* 圖片區塊 */
.myprices-fruit-icon-wrapper {
  background: radial-gradient(circle, #f8fafc 0%, #e2e8f0 100%);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.myprices-fruit-icon {
  width: 70px;
  height: 70px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

/* 內容區塊 */
.myprices-fruit-text {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.myprices-fruit-name-zh {
  font-weight: 900;
  font-size: 1.05rem;
  color: #1e293b;
  text-align: center;
  margin-bottom: 8px;
}

.myprices-fruit-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
  align-items: center;
}

.myprices-fruit-value {
  font-weight: 700;
  font-family: monospace;
  font-size: 0.95rem;
}

/* 購買按鈕 */
.myprices-fruit-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
}

.myprices-add-btn {
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  position: relative;
  transition: transform 0.1s;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.myprices-add-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.myprices-add-btn[data-item-type="real"] {
  background: #3b82f6; /* 藍色 */
  box-shadow: 0 3px 0 #1d4ed8;
}
.myprices-add-btn[data-item-type="perm"] {
  background: #a855f7; /* 紫色 */
  box-shadow: 0 3px 0 #7e22ce;
}


/* === 3. 簡帳與 Robux 區塊 === */
.myprices-extra-layout {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.myprices-extra-image {
  flex: 1;
  min-width: 280px;
}
.myprices-extra-image img {
  width: 100%;
  border-radius: 16px;
  border: 4px solid #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.myprices-extra-content {
  flex: 1.5;
  min-width: 280px;
}

.myprices-extra-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.myprices-extra-item {
  background: #fff;
  border: 2px solid #f1f5f9;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s;
}
.myprices-extra-item:hover {
  border-color: #cbd5e1;
}

.myprices-extra-name {
  font-weight: bold;
  color: #334155;
  font-size: 1rem;
  margin-bottom: 4px;
}

.myprices-extra-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.4;
}

.myprices-extra-price {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 6px;
}

.shop-quick-add-btn {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #047857;
  white-space: nowrap;
  transition: transform 0.1s;
}
.shop-quick-add-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* RWD 調整 */
@media (max-width: 768px) {
  .myprices-extra-layout {
    flex-direction: column;
  }
  .myprices-extra-image, .myprices-extra-content {
    width: 100%;
  }
}

/* 手續費明細（購物車） */
.shop-cart-fee-breakdown{
  margin: 8px 0 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.22);
  font-size: 0.85rem;
}
.shop-cart-fee-breakdown .fee-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin: 4px 0;
}
.shop-cart-fee-breakdown .fee-label{
  color: rgba(226,232,240,0.95);
  overflow-wrap: normal;
  word-break: keep-all;
}
.shop-cart-fee-breakdown .fee-value{
  color: #facc15;
  font-weight: 800;
  white-space: nowrap;
}
.shop-cart-fee-breakdown .fee-note{
  color: rgba(203,213,225,0.92);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* === 補強：手續費明細改用黑字（避免在深色區塊看不清） === */
.shop-cart-summary .shop-cart-fee-breakdown{
  background: #ffffff !important;
  border: 1px solid rgba(15,23,42,0.18) !important;
  border-top: 1px solid rgba(15,23,42,0.18) !important; /* 覆蓋舊的白色虛線 */
  border-radius: 10px !important;
  padding: 10px 10px !important;
}

.shop-cart-summary .shop-cart-fee-breakdown .fee-label,
.shop-cart-summary .shop-cart-fee-breakdown .fee-value{
  color: #0f172a !important;
  text-shadow: none !important;
}

.shop-cart-summary .shop-cart-fee-breakdown .fee-note{
  color: #334155 !important;
  text-shadow: none !important;
}
