﻿/* 2026-03-10 appended by Mosu */
/* 定義全域顏色變數 */
:root {
    --primary-green: #28a745;
    --dark-green: #218838;
}
/* /2026-03-10 appended by Mosu. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles -------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles -------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* --- 懸浮購物車固定位置 --- */
#shoppingCartIcon {
    position: fixed;
    bottom: 40px; 
    right: 40px; 
    width: 65px;
    height: 65px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

#shoppingCartIcon:hover {
    transform: scale(1.1);
    background: var(--dark-green);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cart-tip {
    position: absolute;
    bottom: -25px;
    white-space: nowrap;
    font-size: 11px;
    color: #666;
    font-weight: bold;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #fff;
}

.cart-preview {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none; 
    z-index: 2100;
    overflow: hidden;
    border: 1px solid #eee;
}

#shoppingCartIcon:hover #cartPreviewPanel {
    display: block;
}

.preview-header {
    background: #f8f9fa;
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.preview-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
    transition: background 0.2s;
}

.preview-item:hover {
    background: #fafafa;
}

.preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-info {
    flex: 1;
    font-size: 13px;
}

.preview-name {
    font-weight: bold;
    display: block;
}

.preview-price {
    color: #28a745;
}

.preview-footer {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    background: #f8f9fa;
    color: #888;
}

.preview-group-header {
    margin-bottom: 5px;
    border-radius: 2px;
}

.click-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    z-index: 5;
}