/* =============================
   商品ページ 全体レイアウト
============================= */
.p-main {
    padding: 40px 0;
    background: #f8f8f8;
}

.p-container {
    width: min(1200px, 95%);
    background: #fff;
    padding: 35px 40px;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* =============================
   レイアウト（左右2カラム）
============================= */
.p-product-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* =============================
   ギャラリー
============================= */
.p-gallery {
    flex: 1;
    max-width: 50%;
}

.p-gallery-main img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.p-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.p-thumb {
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    transition: 0.2s;
    padding: 0;
}
.p-thumb.is-active,
.p-thumb:hover {
    opacity: 1;
}

.p-thumb img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
}

/* =============================
   商品情報
============================= */
.p-info {
    flex: 1;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.p-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
}

.p-price-block {
    font-size: 24px;
    font-weight: bold;
    color: #8a0000;
}

.p-desc-block {
    font-size: 16px;
    line-height: 1.4;
    color: #444;
}
.p-desc-block p {
    margin: 6px 0;
}

/* =============================
   数量選択
============================= */
.p-qty-label {
    font-size: 16px;
    margin: 10px 0 6px;
}

.p-qty-area {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.p-qty-area input {
    width: 65px;
    height: 38px;
    font-size: 18px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}
.qty-btn:hover {
    background: #eee;
}

/* =============================
   EC-CUBE標準 カートボタン
============================= */
.ec-cart-btn {
    display: block;
    width: 100%;
    background: #d9534f; /* EC-CUBE標準赤 */
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 14px 0;
    text-align: center;
    border-radius: 6px;
    margin-top: 10px;
    transition: .2s;
    cursor: pointer;
    border: none;
}
.ec-cart-btn:hover {
    background: #c9302c;
}

/* =============================
   EC-CUBE標準 お気に入りボタン
============================= */
.ec-favorite-btn {
    display: block;
    width: 100%;
    background: #4a5568; /* EC-CUBE標準濃紺 */
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 13px 0;
    border-radius: 6px;
    text-align: center;
    margin-top: 10px;
    text-decoration: none;
    transition: .2s;
}
.ec-favorite-btn:hover {
    background: #2d3748;
}

/* =============================
   配送オプション
============================= */
.option-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.option-icon {
    width: 30%;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.25;
    background: #fff;
}

.option-icon .label { font-weight: bold; margin-bottom: 4px; }
.option-icon .sub { font-size: 12px; }

.option-ok { border-color: #2b5d2a; color: #2b5d2a; }
.option-ok.normal { border-color: #e8a63a; color: #b1770a; }
.option-ng { border-color: #d9534f; color: #c9302c; }

/* =============================
   LPフリーエリア
============================= */
.p-freearea {
    margin-top: 50px;
    width: 100%;
}
.p-freearea img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 14px;
}

/* =========================================================
   EC-CUBE 標準：カートに入れるボタン
   （商品ページでもカゴページでも共通で効く）
========================================================= */

.p-cart-btn,
.ec-cart-btn,
.ec-blockBtn--action,
#addToCartBtn {
    display: block;
    width: 100%;
    background: #d9534f !important;   /* 標準赤 */
    color: #fff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    padding: 14px 0 !important;
    text-align: center;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer;
    transition: 0.2s;
}

.p-cart-btn:hover,
.ec-cart-btn:hover,
.ec-blockBtn--action:hover,
#addToCartBtn:hover {
    background: #c9302c !important;   /* hover 色 */
}


/* =========================================================
   EC-CUBE 標準：お気に入りボタン
========================================================= */

.ec-favorite-btn,
.ec-blockBtn--favorite {
    display: block;
    width: 100%;
    background: #4a5568;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 13px 0;
    border-radius: 4px;
    text-align: center;
    margin-top: 10px;
    text-decoration: none;
    transition: 0.2s;
}

.ec-favorite-btn:hover,
.ec-blockBtn--favorite:hover {
    background: #2d3748;
}


/* =============================
   スマホ対応
============================= */
@media(max-width: 900px) {
    .p-product-layout {
        flex-direction: column;
    }
    .p-gallery,
    .p-info {
        max-width: 100%;
    }
    .p-gallery-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media(max-width: 600px) {
    .p-gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
    .ec-cart-btn,
    .ec-favorite-btn {
        font-size: 17px;
    }
}
