/* Y-ID 系列网格：只写布局，字号/颜色/边框/圆角一律走 Astra */

.yxs-yid-wrap { margin: 2em 0; }

/* 从网关卡「挑选并购买」跳转过来时，让网格避开固定头部 */
#yxs-yid-list { scroll-margin-top: 100px; }
html:has(#yxs-yid-list) { scroll-behavior: smooth; }

/* 系列页标题：只留文字，居中 */
.yxs-yid-hero {
    margin: 0 0 2rem;
    text-align: center;
}
.yxs-yid-hero-title { margin: 0; }
.yxs-yid-hero-intro { margin: .75em 0 0; }

/* 筛选 tab —— 文字型，避免被 Astra 全局 button 染成黑底白字 */
.yxs-yid-tabs { display: flex; gap: 2em; margin-bottom: 1.5em; overflow-x: auto; }
.yxs-yid-tab,
button.yxs-yid-tab {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 .4em !important;
    color: inherit !important;
    cursor: pointer;
    position: relative;
}
.yxs-yid-tab.active,
.yxs-yid-tab:hover { font-weight: var(--font-weight-strong); }
.yxs-yid-tab.active::after {
    content: '';
    position: absolute; left: 50%; bottom: 0;
    width: 100%; height: 2px;
    background: currentColor;
    transform: translateX(-50%);
}

/* 网格 */
.yxs-yid-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}
@media (max-width: 1024px) { .yxs-yid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .yxs-yid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.yxs-yid-card {
    display: flex; flex-direction: column;
    color: inherit; text-decoration: none;
    border: 1px solid var(--ast-border-color);
    overflow: hidden;
}
.yxs-yid-card[hidden] { display: none; }
.yxs-yid-thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.yxs-yid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 已售：图片正常显示，hover 淡入深色遮罩（对齐老站 vp fade 效果） */
.yxs-yid-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .4em; padding: 1em; text-align: center;
    background: rgba(23, 22, 22, .84);
    color: #fff;
    opacity: 0;
    transition: opacity .25s ease;
}
.yxs-yid-card:hover .yxs-yid-overlay { opacity: 1; }
.yxs-yid-overlay-title { font-weight: var(--font-weight-strong); }
.yxs-yid-overlay-holder { font-size: .9em; }
.yxs-yid-info {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5em; padding: .6em .75em;
}
.yxs-yid-number { font-weight: var(--font-weight-strong); }
/* 已售：比价格更弱，避免抢视觉 */
.yxs-yid-sold { color: #aaa; font-size: 13px; font-weight: 400; }

/* 商品详情页：持有者展示 */
.yxs-yid-holder-box {
    margin: 1em 0;
    padding: 14px 16px;
    background: var(--ast-global-color-4, #f8f8f8);
    border-radius: 8px;
}
.yxs-yid-holder-label {
    display: block;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--ast-global-color-7, #6b7280);
}
.yxs-yid-holder-name {
    display: block;
    margin-top: 2px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ast-global-color-1, #222);
}
.yxs-yid-holder-label--now { margin-top: 12px; }
.yxs-yid-holder-name--now { font-size: 18px; }

/* 编号商品页：返回系列列表 */
.yxs-yid-back {
    display: inline-block;
    margin-bottom: .6em;
    font-size: 13px;
    text-decoration: none;
    color: var(--ast-global-color-7, #6b7280);
}
.yxs-yid-back:hover { text-decoration: underline; }

/* 网关卡：挑选并购买，通栏大按钮 */
.yxs-yid-gateway-btn {
    display: flex !important;
    width: 100% !important;
    margin: 1.25em 0 0 !important;
    padding: 16px 20px !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
}

/* 编号商品页：加入购物车同样通栏 */
.yxs-yid-single form.cart .single_add_to_cart_button,
.yxs-yid-single form.cart .button {
    display: flex !important;
    width: 100% !important;
    padding: 16px 20px !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
}
.yxs-yid-empty { padding: 3em 1em; text-align: center; }
