/* =============================================
 * 商品拡大表示（ライトボックス）共通CSS
 * ショップページ・MENUページ共用
 * ============================================= */

/* ===== オーバーレイ ===== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: lb-fadeIn 0.25s ease;
}

.lightbox-overlay.active { display: flex; }

@keyframes lb-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lb-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 閉じるボタン ===== */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ===== コンテナ（左画像＋右情報） ===== */
.lb-a-container {
    background: #fff !important;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    max-width: 800px;
    width: 100%;
    height: 480px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: lb-slideUp 0.3s ease;
}

/* WordPress グローバルCSS干渉防止 */
.lb-a-container *,
.lb-a-container *::before,
.lb-a-container *::after {
    background-color: transparent;
    box-sizing: border-box;
}

/* 左：画像 */
.lb-a-image {
    flex: 1;
    min-width: 0;
    background: #f5f5f5;
    overflow: hidden;
}

.lb-a-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 右：情報パネル */
.lb-a-info {
    width: 320px;
    flex-shrink: 0;
    min-height: 0;
    padding: 12px 20px 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    background: #fff !important;
    font-family: var(--font-mincho);
}

.lb-a-info::-webkit-scrollbar {
    display: none;
}

/* ===== 商品名 ===== */
.lb-product-name {
    font-family: var(--font-base);
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 5px;
}

/* ===== バッジ ===== */
.lb-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.lb-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    color: #fff;
}

.lb-badge-gf { background: linear-gradient(135deg, #4CAF50, #66BB6A); }
.lb-badge-rice { background: linear-gradient(135deg, #8D6E63, #A1887F); }
.lb-badge-award { background: linear-gradient(135deg, #FFD700, #FFC107); color: #333; }
.lb-badge-frozen { background: linear-gradient(135deg, #E0E0E0, #B8B8B8); }
.lb-badge-normal { background: linear-gradient(135deg, #FF9800, #FFB74D); }
.lb-badge-seasonal { background: linear-gradient(135deg, #E91E63, #F06292); }

/* ===== 説明文 ===== */
.lb-desc {
    font-family: var(--font-mincho);
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 4px;
    white-space: pre-line;
}

/* ===== 詳細情報 ===== */
.lb-details-area {
    margin-bottom: 3px;
}

.lb-detail {
    font-family: var(--font-mincho);
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-gray);
    margin-bottom: 4px;
}

.lb-detail-label {
    font-family: var(--font-base);
    font-weight: 600;
    color: var(--color-brown);
    margin-right: 5px;
}

/* ===== 価格 ===== */
.lb-price {
    font-family: var(--font-base);
    font-size: 22px;
    font-weight: 600;
    color: var(--color-brown);
    margin: 3px 0;
    text-align: right;
}

.lb-price-tax {
    font-size: 14px;
    color: var(--color-gray);
    font-weight: 400;
}

/* ===== カートエリア ===== */
.lb-cart-area {
    margin-top: auto;
    padding-bottom: 20px;
}

/* カートボタン（数量セレクター付き） */
.lb-cart-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, var(--color-brown), #9a5a3a);
    padding: 6px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(127,63,32,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lb-cart-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(127,63,32,0.45);
}

.lb-cart-label {
    color: #fff;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.lb-cart-icon {
    margin-right: 2px;
}

/* 数量セレクター */
.lb-quantity-selector {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    background: rgba(255,255,255,0.25);
    border-radius: 18px;
    padding: 0;
}

.lb-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    padding-top: 2px;
}

.lb-qty-btn:hover {
    background: #fff;
    color: var(--color-brown);
}

.lb-qty-input {
    width: 32px;
    height: 28px;
    text-align: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    font-family: var(--font-base);
    line-height: 28px;
    padding: 0;
    -moz-appearance: textfield;
}

.lb-qty-input::-webkit-outer-spin-button,
.lb-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 売り切れ / 準備中 */
.lb-sold-out {
    text-align: center;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 25px;
    color: #999;
    font-family: var(--font-base);
    font-size: 15px;
    font-weight: 500;
}

/* カートステータスメッセージ */
.lb-cart-status {
    text-align: center;
    font-size: 14px;
    margin-top: 3px;
    min-height: 6px;
    font-family: var(--font-mincho);
}

.lb-cart-status.success { color: #4CAF50; }
.lb-cart-status.error { color: #f44336; }

/* 最低注文数の案内 */
.lb-min-quantity-notice {
    font-size: 14px;
    color: var(--color-gray);
    margin-bottom: 8px;
    font-family: var(--font-mincho);
}

/* ===== オンラインショップで見るボタン（MENUページ用） ===== */
.lb-shop-link {
    display: block;
    text-align: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, var(--color-brown), #9a5a3a);
    color: #fff !important;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(127,63,32,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lb-shop-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(127,63,32,0.45);
}

/* ===== モバイル対応 ===== */
@media (max-width: 768px) {
    .lightbox-overlay {
        padding: 10px;
    }

    .lb-a-container {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }

    .lb-a-image {
        height: 250px;
        flex: none;
    }

    .lb-a-info {
        width: 100%;
        flex: 1;
        min-height: 0;
        padding: 20px;
        overflow-y: auto;
    }

    .lb-product-name {
        font-size: 18px;
    }

    .lb-price {
        font-size: 20px;
    }
}
