/* ========== Detail Page ========== */
.detail-page {
    margin-top: 16px;
    padding-bottom: 30px;
}

.detail-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.detail-main {
    flex: 1;
    min-width: 0;
}

.detail-sidebar {
    width: 330px;
    flex-shrink: 0;
}

/* ========== Product Info ========== */
.product-info {
    display: flex;
    gap: 28px;
    background: #fff;
    border-radius: 6px;
    padding: 24px;
}

.product-gallery {
    width: 300px;
    flex-shrink: 0;
}

.gallery-main {
    width: 300px;
    height: 300px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-meta {
    flex: 1;
    min-width: 0;
    position: relative;
}

.product-title {
    font-size: 20px;
    color: #333;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-height: 60px;
}

.product-title .brand-tag {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 6px;
    object-fit: contain;
}

.product-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-stats {
    margin-top: 14px;
    font-size: 14px;
    color: #666;
}

.product-stats em {
    font-style: normal;
    color: #ff2d5b;
}

.product-coupon {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-coupon .coupon-label {
    font-size: 14px;
    color: #666;
}

.product-coupon .coupon-tag {
    display: inline-block;
    font-size: 14px;
    color: #ff2d5b;
    border: 1px solid #ff2d5b;
    border-radius: 6px;
    padding: 0px 5px;
    background: #fff;
}

.product-tags {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-tags .tag-item {
    display: inline-block;
    background: #fff0d0;
    color: #ff5900;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.product-price {
    margin-top: 30px;
    display: flex;
    align-items: baseline;
}

.product-price .price-now {
    color: #ff2d5b;
    font-size: 28px;
    font-weight: bold;
}

.product-price .yen {
    color: #ff2d5b;
    font-size: 16px;
    font-weight: bold;
}

.product-price .price-old {
    color: #bbb;
    font-size: 14px;
    text-decoration: line-through;
    padding-left: 8px;
}

.product-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    padding-right: 120px;
}

.product-actions .btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 36px;
    background: #ff2d5b;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    transition: background 0.2s;
}

.product-actions .btn-buy:hover {
    background: #e6194b;
    color: #fff;
}

.product-actions .btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 36px;
    background: #fff;
    color: #ff6b35;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #ff6b35;
    border-radius: 8px;
    transition: all 0.2s;
}

.product-actions .btn-copy:hover {
    background: #fff8f5;
    color: #ff6b35;
}

.product-qrcode {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.product-qrcode #productQrcode {
    width: 100px;
    height: 100px;
}

.product-qrcode #productQrcode img,
.product-qrcode #productQrcode canvas {
    width: 100px !important;
    height: 100px !important;
}

.product-qrcode span {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* ========== Detail Section ========== */
.detail-section {
    background: #fff;
    border-radius: 6px;
    margin-top: 16px;
    overflow: hidden;
}

.detail-main > .detail-section:first-of-type {
    margin-top: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 14px 20px;
    border-left: 4px solid #ff2d5b;
    border-bottom: 1px solid #f0f0f0;
}

.section-body {
    padding: 16px 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.section-body p {
    margin-bottom: 8px;
}

.section-body p:last-child {
    margin-bottom: 0;
}

/* ========== Shop Info ========== */
.shop-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.shop-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-name {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.shop-platform {
    font-size: 14px;
    color: #ff2d5b;
    font-weight: bold;
}

.shop-scores {
    display: flex;
    gap: 50px;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.score-label {
    font-size: 13px;
    color: #999;
}

.score-value {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

/* ========== Detail Images ========== */
.detail-images {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-images img {
    width: 100%;
    display: block;
}

/* ========== Sidebar ========== */
.sidebar-section {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.sidebar-section:last-child {
    margin-top: 16px;
}

.sidebar-section .section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 14px 16px;
    border-left: 4px solid #ff2d5b;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list {
    padding: 12px;
}

.sidebar-item {
    display: flex;
    padding: 10px 0;
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    cursor: pointer;
}

.sidebar-item:hover {
    opacity: .85;
}

.sidebar-item:hover .item-info .item-title span {
    color: #ff2049;
}

.sidebar-item:last-child {
    margin-bottom: 0;
}

.sidebar-item .item-img {
    width: 85px;
    height: 85px;
    /*border-radius: 8px;*/
    background: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-item .item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-item .item-info {
    flex: 1;
    margin-left: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 2px 0;
}

.sidebar-item .item-title {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-item .item-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item .item-title .brand-tag {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px;
    object-fit: contain;
    vertical-align: middle;
}

.sidebar-item .item-promo {
    display: inline-block;
    font-size: 12px;
    color: #ff5900;
    background: #fff7e8;
    padding: 0 5px;
    border-radius: 3px;
    align-self: flex-start;
    line-height: 16px;
}

.sidebar-item .item-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
}

.sidebar-item .price-now {
    color: #fe2e2e;
    font-size: 21px;
    line-height: 24px;
}

.sidebar-item .price-now .yen {
    font-size: 14px;
}

.sidebar-item .price-old {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
}

.sidebar-post {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    transition: all 0.2s;
}

.sidebar-post:last-child {
    border-bottom: none;
}

.sidebar-post:hover .sidebar-post-title {
    color: #ff2d5b;
}

.sidebar-post-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-info {
    flex: 1;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.sidebar-post-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.sidebar-post-date {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

/* ========== Disclaimer ========== */
.detail-disclaimer {
    margin-top: 16px;
    background: #f5f5f5;
    border: 1px solid #fe2e54;
    border-radius: 2px;
    padding: 14px 20px;
    font-size: 12px;
    color: rgb(170, 170, 170);
    line-height: 1.8;
}

.detail-disclaimer .disclaimer-title {
    font-size: 14px;
    color: rgb(102, 102, 102);
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 9999;
    pointer-events: none;
    animation: toast-fade 2s ease forwards;
}

@keyframes toast-fade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}
