/* ==================== 全域變數 ==================== */
:root {
    --theme-color: #132c30;
    --accent-color: #55cba6;
    --price-color: #dc3545;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
}

/* ==================== 基礎樣式 ==================== */
body {
    background-color: #f8f9fa;
    font-family: "Microsoft JhengHei", sans-serif;
}

/* 主題色背景 */
.bg-theme {
    background-color: var(--theme-color) !important;
}

.text-theme {
    color: var(--accent-color) !important;
}

/* ==================== 按鈕樣式 ==================== */
.btn-outline-theme {
    color: var(--theme-color);
    border-color: var(--theme-color);
}

.btn-outline-theme:hover {
    background-color: var(--theme-color);
    color: #fff;
}

/* ==================== 導航選單樣式 ==================== */
.navbar {
    z-index: 1030;
}

.navbar .dropdown-menu {
    z-index: 1050;
}

.navbar-brand img {
    max-height: 50px;
}

.nav-item-custom {
    text-align: center;
    color: white;
    padding: 0 15px;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.nav-item-custom:hover {
    opacity: 0.8;
    color: #ccc;
}

.nav-item-custom i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 5px auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    width: 45px;
    height: 45px;
}

/* RWD 手機選單 */
@media (max-width: 991.98px) {
    .offcanvas-start {
        width: 90% !important;
    }

    .navbar-nav {
        flex-direction: column;
        padding-top: 20px;
    }

    .nav-item-custom {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .nav-item-custom i {
        display: inline-flex;
        margin: 0 15px 0 0;
        color: var(--theme-color);
        border-color: var(--theme-color);
    }

    .nav-item-custom:hover {
        color: var(--theme-color);
        background-color: #f0f0f0;
    }
}

/* ==================== 計數條 ==================== */
.count-bar {
    background-color: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.lcd-number {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    border: 1px solid #eee;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 5px;
}

/* ==================== 通用區塊樣式 ==================== */
.section-title {
    border-left: 5px solid var(--theme-color);
    padding-left: 10px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--theme-color);
}

/* ==================== 商品卡片 ==================== */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    background: #fff;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.product-title {
    font-size: 0.95rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    color: #333;
}

.product-price {
    color: var(--price-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.product-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

/* ==================== 頁尾 ==================== */
.site-footer {
    background-color: var(--theme-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 20px 0;
    margin-top: 50px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.footer-link:hover {
    color: white;
}