/* 搜尋區 */
.search-container {
    margin-bottom: 25px;
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
#storeSearchInput {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
    display: none;
}
.suggestions-list li {
    padding: 8px 12px;
    cursor: pointer;
}
.suggestions-list li:hover {
    background-color: #f0f0f0;
}

/* 大分類區塊 */
.redeemlist-category {
    background: white;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 0 7px rgba(0,0,0,0.1);
    overflow: hidden;
}
.redeemlist-category-header {
    background: #121535 !important;
    color: white;
    padding: 12px 20px;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.redeemlist-category-header span {
    font-weight: bold;
}
.redeemlist-category-header .toggle-icon {
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    user-select: none;
    transition: transform 0.3s ease;
}
.redeemlist-category.collapsed .redeemlist-category-header .toggle-icon {
    transform: rotate(-90deg);
}

/* 賣家群組 */
.redeemlist-seller-group {
    padding: 10px 20px 20px 20px;
    border-top: 1px solid #ddd;
}
.redeemlist-seller-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    color: #333;
    display: flex;
    align-items: center;
}
.redeemlist-seller-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    margin-right: 12px;
    border: 1px solid #ddd;
    background: white;
    flex-shrink: 0;
}

/* 單筆兌換券列表樣式 */
.redeemlist-item {
    display: flex;
    align-items: center;
    background: #fff;
    box-shadow: 0 0 3px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    border-radius: 6px;
    padding: 10px 15px;
    max-height: 100px;
}
/* 兌換券圖片 */
.redeemlist-coupon-img {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    background: #fafafa;
}

/* 文字內容（中間區塊） */
.redeemlist-text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* 避免寬度溢出 */
}
.redeemlist-name {
    font-weight: 600;
    font-size: 17px;
    color: #222;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.redeemlist-desc {
    color: #555;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

/* 右側狀態或按鈕區 */
.redeemlist-status-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}
.redeemlist-remaining {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}
.redeemlist-btn-use {
    background: #121535 !important;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.25s ease;
}
.redeemlist-btn-use:hover {
    background: #0056b3;
}
.redeemlist-status-text {
    font-weight: bold;
    font-size: 15px;
    color: #c00;
    white-space: nowrap;
}


/* 手機響應，兌換券圖片左方排列，詳情右方 */
@media screen and (max-width: 600px) {
    .redeemlist-item {
        flex-direction: row;
        max-height: none;
        height:auto;
        padding: 10px 10px;
    }
    .redeemlist-coupon-img {
        width: 80px;
        height: 80px;
        margin: 0 10px 0 0;
    }
    .redeemlist-text-content {
        margin-bottom: 0;
        min-width: 0;
        white-space: normal;
    }
    .redeemlist-name,
    .redeemlist-desc {
        white-space: normal;
    }
    .redeemlist-status-area {
        border-left: 2px solid #ddd;
        border-top: none;
        padding-left: 15px;
        padding-top: 0;
        min-width: 120px;
        width: auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .redeemlist-remaining {
        margin-bottom: 6px;
    }
    .redeemlist-btn-use {
        width: 100%;
        padding: 8px 15px;
    }
}

.redeempage-detail {
    border: 1px solid #ddd;
    padding: 20px 25px;
    border-radius: 10px;
    box-sizing: border-box;
}
.redeempage-info-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}
.redeempage-seller-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    margin-right: 15px;
    flex-shrink: 0;
}
.redeempage-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.4;
    overflow-wrap: break-word;
}
.redeempage-text-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.redeempage-text-label {
    font-weight: bold;
    width: 100px;
    flex-shrink: 0;
}
.redeempage-text-value {
    word-break: break-word;
}
#redeempage-qrcode {
    margin: 20px auto 15px;
    width: 200px;
    height: 200px;
    display: block;
}
.redeempage-checkcode-text {
    font-size: 24px;
    letter-spacing: 4px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    user-select: all;
    word-break: break-word;
}
.redeempage-countdown {
    font-size: 18px;
    text-align: center;
    color: #c00;
    font-weight: bold;
}

@media screen and (max-width: 767px) {
    .redeempage-detail {
        padding: 15px;
        border-radius: 6px;
    }
    .redeempage-info-group {
        flex-direction: row;
        margin-bottom: 15px;
    }
    .redeempage-seller-logo {
        width: 65px;
        height: 65px;
        margin-right: 12px;
    }
    .redeempage-text-label {
        width: 90px;
        font-size: 14px;
    }
    .redeempage-text-value {
        font-size: 14px;
    }
    .redeempage-checkcode-text {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .redeempage-countdown {
        font-size: 16px;
    }
    #redeempage-qrcode {
        width: 160px;
        height: 160px;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 480px) {
    .redeempage-info-group {
        flex-direction: row;
        margin-bottom: 12px;
    }
    .redeempage-seller-logo {
        width: 55px;
        height: 55px;
        margin-right: 10px;
    }
    .redeempage-text-label {
        width: 80px;
        font-size: 13px;
    }
    .redeempage-text-value {
        font-size: 13px;
    }
    .redeempage-checkcode-text {
        font-size: 18px;
        margin-bottom: 10px;
        letter-spacing: 3px;
    }
    .redeempage-countdown {
        font-size: 14px;
    }
    #redeempage-qrcode {
        width: 130px;
        height: 130px;
        margin-bottom: 10px;
    }
}