@import url("../libs/toastr/toastr.min.css");
@import url("../libs/fastadmin-layer/dist/theme/default/layer.css");

/* ———————————————————————————————————————————————————————————— */
/* 变量 & 全局 */
:root {
    --main-color: #800020;
    --accent-color: #b3003c;
}

body {
    background-color: #0e0e0e;
    color: #f8f9fa;
    font-family: "Noto Sans TC";
    font-optical-sizing: auto;
}

.navbar {
    background-color: var(--main-color);
}

/* ———————————————————————————————————————————————————————————— */
/* 通用 文字／图标 */
.icon-sm {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.me-2 {
    margin-right: 0.5em;
}

/* ———————————————————————————————————————————————————————————— */
/* Hero Banner */
.hero {
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)),
        url('/assets/img/angel/S__90669084_0.jpg') center/cover no-repeat;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
}

/* ———————————————————————————————————————————————————————————— */
/* 卡片式元素 */
.video-card img {
    object-fit: cover;
    height: 180px;
}

footer {
    background: #1a1a1a;
    padding: 1rem;
    text-align: center;
    color: #ccc;
}

.product-box {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #0e0e0e;
}

.product-box img {
    position: absolute;
    inset: 0;
    object-fit: cover;
}

/* ———————————————————————————————————————————————————————————— */
/* 表单 & 输入框 深色主题 */
.form-control {
    background: #1a1a1a !important;
    border: 1px solid #444 !important;
    color: #f8f9fa !important;
    padding: 5px 10px !important;
}

.form-control::placeholder {
    color: #777 !important;
    opacity: 1;
}

.form-control:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(179, 0, 60, 0.25) !important;
    background: #1a1a1a !important;
}

/* 验证码输入组 */
.input-group .form-control {
    border-radius: 0.25rem 0 0 0.25rem !important;
}

.input-group .btn-outline-danger {
    border-color: var(--accent-color) !important;
    color: var(--accent-color) !important;
    background: transparent !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

.input-group .btn-outline-danger:hover {
    background-color: var(--accent-color) !important;
    color: #0e0e0e !important;
}

.input-group img {
    margin-left: 0.5rem !important;
    cursor: pointer !important;
    border: 1px solid #444 !important;
    border-radius: 0.25rem !important;
    width: 100px !important;
    height: 40px !important;
    object-fit: cover !important;
}

/* ———————————————————————————————————————————————————————————— */
/* Pagination 深色主题 */
.page .pagination {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
}

.page .pagination li {
    margin: 0 0.25rem;
}

.page .pagination li span,
.page .pagination li a {
    display: block;
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    color: #f8f9fa;
    border: 1px solid #444;
    border-radius: 0.25rem;
    min-width: 2.5rem;
    text-align: center;
    text-decoration: none;
}

.page .pagination li.active span {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.page .pagination li.disabled span {
    opacity: 0.5;
    cursor: default;
}

.page .pagination li a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* ———————————————————————————————————————————————————————————— */
/* Video.js 兼容 */
.video-js .vjs-poster,
.video-js .vjs-poster img {
    object-fit: cover !important;
    background-size: cover !important;
    background-position: center !important;
}

.video-js .vjs-tech {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    background-color: black;
}

.video-js.vjs-fullscreen .vjs-tech,
.video-js.vjs-fullscreen .vjs-poster img {
    object-fit: contain !important;
}

/* ———————————————————————————————————————————————————————————— */
/* 数量选择器（num_box） */
.num_box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.num_box .btn_change_num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
    background: #1a1a1a;
    color: #f8f9fa;
    border: 1px solid #444;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none !important;
}

.num_box .btn_change_num:hover {
    background: var(--accent-color);
    color: #0e0e0e;
}

.num_box .num_val_share {
    width: 3rem;
    height: 2.5rem;
    text-align: center;
    background: #1a1a1a;
    color: #f8f9fa;
    border: 1px solid #444;
    border-radius: 0.25rem;
    -moz-appearance: textfield;
}

.num_box .num_val_share::-webkit-outer-spin-button,
.num_box .num_val_share::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 缺貨徽章 */
.num_box+.badge {
    font-size: 1.25rem;
    background-color: #444 !important;
    color: #f8f9fa !important;
}

/* ———————————————————————————————————————————————————————————— */
/* 購物車頁面樣式 */
/* ———————————————————————————————————————————————————————————— */
/* Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #f8f9fa;
}

.cart-header p {
    font-size: 1.5rem;
    margin: 0;
}

.cart-header a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.cart-header a:hover {
    background: var(--accent-color);
    color: #0e0e0e;
}

/* 主容器 */
.cart-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cart-items {
    flex: 1;
    overflow-x: auto;
    /* 保持可滚动 */
}

/* 列表標題行 */
.cart-items-header {
    display: flex;
    background: #1a1a1a;
    padding: 0.75rem;
    border-radius: 0.25rem 0.25rem 0 0;
    color: #ccc;
}

.cart-items-header p {
    flex: 1;
    text-align: center;
    font-weight: 600;
    margin: 0;
}

.cart-items-header p:first-child {
    flex: 2;
}

/* 單一品項行 */
.cart-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #333;
}

.cart-item:last-child {
    border-radius: 0 0 0.25rem 0.25rem;
    border-bottom: none;
}

.cart-item-info {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.cart-item-name {
    margin: 0;
    color: #f8f9fa;
    font-size: 0.95rem;
}

.cart-item-price,
.cart-item-subtotal {
    flex: 1;
    text-align: center;
}

.cart-item-price p,
.cart-item-subtotal p {
    margin: 0;
}

.cart-item-quantity {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.cart-item-quantity .btn-change {
    background: #1a1a1a;
    color: #f8f9fa;
    border: 1px solid #444;
    border-radius: 0.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.2s;
}

.cart-item-quantity .btn-change:hover {
    background: var(--accent-color);
    color: #0e0e0e;
}

.cart-item-quantity .quantity-value {
    min-width: 2rem;
    color: #f8f9fa;
}

.cart-item-remove {
    flex: 1;
    text-align: center;
}

.cart-item-remove .btn-remove {
    color: #f00;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.cart-item-remove .btn-remove:hover {
    color: var(--accent-color);
}

.cart-empty {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.cart-empty h5 {
    margin: 0;
}

.cart-summary {
    width: 300px;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 0.25rem;
    color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.total-amount {
    color: var(--accent-color);
    font-weight: 600;
}

.btn-checkout {
    width: 100%;
    background: var(--accent-color);
    border: none;
    color: #0e0e0e;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #b3003c;
}

/* ——————————————————————————————————————————————————————— */
/* 简单 RWD 支持 */
/* ——————————————————————————————————————————————————————— */
@media (max-width: 767.98px) {
    .cart-items-header {
        display: none;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .cart-item>div {
        flex: none !important;
        width: 100%;
        text-align: left;
    }

    .cart-container {
        flex-direction: column;
    }

    .cart-summary {
        width: 100% !important;
        margin-top: 1.5rem;
    }
}

/* ——————————————————————————————————————————————————————— */
/* Layer 深色主题调整 */
/* ——————————————————————————————————————————————————————— */
.layui-layer-shade {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.layui-layer {
    border-radius: 0.5rem !important;
    
    background: #000000;
    border: 1px solid #800020;
}

.layui-layer-title {
    background-color: var(--main-color) !important;
    color: #f8f9fa !important;
    text-align: center !important;
    padding: 0.75rem 1rem !important;
    font-size: 1.1rem !important;
    line-height: 1.5 !important;
    border-bottom: none !important;
}

.layui-layer-content {
    color: #f8f9fa !important;
    text-align: center !important;
    padding: 1.25rem 1.5rem !important;
    line-height: 1.4 !important;
    font-size: 1rem !important;
}

.layui-layer-dialog .layui-layer-content {
    background-color: #1a1a1a !important;
}

.layui-layer-btn {
    background-color: #1a1a1a !important;
    padding: 1rem !important;
    text-align: center !important;
}

.layui-layer-btn a {
    display: inline-block !important;
    margin: 0 0.5rem !important;
    min-width: 6rem !important;
    background-color: var(--accent-color) !important;
    border: 1px solid var(--accent-color) !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
    text-decoration: none !important;
    transition: opacity 0.2s !important;
}

.layui-layer-btn .layui-layer-btn1 {
    background-color: #444 !important;
    border: 1px solid #444 !important;
    color: #f8f9fa !important;
}

.layui-layer-setwin .layui-layer-close {
    color: #f8f9fa !important;
    opacity: 0.8;
}

.layui-layer-setwin .layui-layer-close:hover {
    opacity: 1;
}

.owl-carousel .card img {
    object-fit: cover;
    height: 200px;
}

.ratio-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 比例 */
    background: #000;
}

.ratio-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-spacer {
    height: 60px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: black;
    overflow: hidden;
}

.video-wrapper .video-js {
    width: 100% !important;
    height: 100% !important;
}

.video-js .vjs-tech {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    background-color: black !important;
}

.video-js .vjs-control-bar {
    display: flex !important;
    opacity: 1 !important;
}

/* 深色主題用於排序下拉選單 */
.form-select {
    background-color: #1a1a1a !important;
    color: #f8f9fa !important;
    border: 1px solid #444 !important;
}

.form-select:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(179, 0, 60, 0.25) !important;
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-accent:hover {
    background-color: #990033;
    border-color: #990033;
    color: #fff;
}

/* 通用訂單卡片樣式（訂閱 / 商品 / 影片 / 點數） */
.order-card,
.point-record-card,
.product-order-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 0.25rem;
    color: #f8f9fa;
}

.order-card .record-item,
.point-record-card .record-item,
.product-order-card .record-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #222;
}

.order-card .record-item:last-child,
.point-record-card .record-item:last-child,
.product-order-card .record-item:last-child {
    border-bottom: none;
}

.order-card .label,
.point-record-card .label,
.product-order-card .label {
    font-weight: 500;
    color: #ccc;
}

.order-card .value,
.point-record-card .value,
.product-order-card .value {
    text-align: right;
    white-space: nowrap;
}

/* 統一卡片樣式 */
.redesigned-cart-item {
    display: flex;
    flex-wrap: wrap;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    gap: 1rem;
}

/* 商品圖片與名稱 */
.cart-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 2;
    min-width: 200px;
}

.cart-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.cart-item-name {
    margin: 0;
    color: #f8f9fa;
    font-size: 1rem;
    word-break: break-word;
}

/* 價格資訊區塊 */
.cart-price-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 120px;
    font-size: 0.95rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    color: #f8f9fa;
}

.price-row .label {
    color: #ccc;
}

/* 控制區塊（數量＋刪除） */
.cart-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    flex: 1;
    min-width: 150px;
    gap: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity .quantity-value {
    color: #f8f9fa;
    min-width: 2rem;
    text-align: center;
}

.cart-item-remove .btn-remove {
    color: #f00;
    font-size: 1.5rem;
    line-height: 1;
}

.cart-item-remove .btn-remove:hover {
    color: var(--accent-color);
}

/* 手機垂直堆疊 */
@media (max-width: 767.98px) {
    .redesigned-cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-controls {
        align-items: flex-start;
        width: 100%;
    }

    .cart-price-group,
    .cart-item-quantity {
        width: 100%;
    }

    .price-row {
        justify-content: space-between;
    }
}

.toast-top-center {
    top: 100px;
}


.video-cover {
    width: 240px;
    height: 135px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767.98px) {
    .order-card {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .video-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

.card.bg-dark.text-white {
    background: linear-gradient(180deg, #222 0%, #000 100%);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}