@charset "UTF-8";

/**
 * カートコンポーネント専用CSS
 * BEM命名規則に従い、親要素に依存しない独立したスタイル
 */

/* ==========================================================================
   コンポーネントルート
   ========================================================================== */
.cart-component {
    width: 100%;
    margin: 2rem 0;
    background-color: #f0f0ed;
    padding: 2rem 2.5%;
    box-sizing: border-box;
}

/* ==========================================================================
   プランリスト
   ========================================================================== */
.cart-component__plan-list {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   プランアイテム（共通）
   ========================================================================== */
.cart-component__plan {
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    border: 3px solid #fff;
    transition: all ease 0.3s 0s;
    -webkit-transition: all ease 0.3s 0s;
    -moz-transition: all ease 0.3s 0s;
    cursor: pointer;
}

.cart-component__plan:not(:last-of-type) {
    margin-bottom: 2.5%;
}

/* アクティブ状態 */
.cart-component__plan.is-active {
    border: 3px solid #d19ab4;
    background-color: #fff0f7;
}

/* プランコンテンツ */
.cart-component__plan-content {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
}

.cart-component__plan-header {
    width: 100%;
}

.cart-component__plan-title-wrap {
    font-size: 14px;
    font-weight: normal;
}

.cart-component__plan-name {
    font-size: 1.2em;
    width: 100%;
    display: block;
    padding: 8.5px 8.5px;
    border-bottom: 1px solid #b6b6b6;
    font-weight: 500;
}

.cart-component__plan-price {
    padding: 8.5px 8.5px;
    width: 100%;
    display: block;
    font-weight: 500;
    font-size: 1.2em;
}

.cart-component__plan-price span {
    font-weight: bold;
}

.cart-component__plan-price em {
    font-style: normal;
    font-size: 2em;
    line-height: 100%;
}

.cart-component__plan-discount {
    font-size: 13px;
    border: 1px solid;
    display: inline-block;
    padding: 3px 5px;
    font-weight: bold;
    margin-top: 5px;
    color: #f00;
}

.cart-component__plan-description {
    font-size: 14px;
    padding: 0px 8.5px 8.5px;
    font-weight: 500;
}

.cart-component__plan-badge {
    width: 100%;
}

.cart-component__plan-badge span {
    font-size: 13px;
    border: 1px solid #c5c5c5;
    padding: 2.5px 7px;
    border-radius: 3px;
}

/* ==========================================================================
   オプション行（サイズ/カラー/共通オプション）
   ========================================================================== */
.cart-component__option-row {
    width: 100%;
    background: none;
    border: 0;
}

.cart-component__option-row:not(:last-of-type) {
    margin-bottom: 2.5%;
}

.cart-component__option-row .cart-component__plan-content {
    align-items: flex-start;
    padding: 8px 0;
}

.cart-component__option-row .cart-component__plan-header {
    width: auto;
    margin-bottom: 5px;
}

.cart-component__option-row .cart-component__plan-title-wrap span {
    display: block;
}

.cart-component__option-value {
    width: auto;
    padding-right: 5px;
    position: relative;
    z-index: 0;
}

.cart-component__option-select {
    border-radius: 7px;
    padding: 10px;
    padding-right: 30px;
}

/* ==========================================================================
   複数選択オプション
   ========================================================================== */
.cart-component__option-multiple {
    border-radius: 7px;
    border: 1px solid #ccc;
    background-color: #fff;
    padding: 0;
    height: auto;
    max-height: 220px;
    overflow-y: auto;
}

.cart-component__option-item {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.cart-component__option-item:not(:last-of-type) {
    border-bottom: 1px dashed #ccc;
}

.cart-component__option-item.is-selected {
    background: #d19ab4;
    color: #fff;
}

.cart-component__option-item-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.cart-component__option-item-left {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cart-component__option-item-img {
    width: 100px;
    height: 50px;
    background-color: #000;
    border-radius: 5px;
}

.cart-component__option-item-img img {
    width: 100px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
}

.cart-component__option-item-txt {
    margin-left: 5px;
    width: calc(100% - 85px);
}

.cart-component__option-item-txt .cart-component__option-item-price {
    display: none;
}

/* ==========================================================================
   オプション品（セット購入）
   ========================================================================== */
.cart-component__option-items-row {
    width: 100%;
    background: none;
    border: 0;
}

.cart-component__option-items-row:not(:last-of-type) {
    margin-bottom: 2.5%;
}

.cart-component__option-items-row .cart-component__option-value {
    width: 100%;
}

.cart-component__set-item {
    padding: 8px 15px;
    cursor: pointer;
}

.cart-component__set-item:not(:last-of-type) {
    border-bottom: 1px dashed #ccc;
}

.cart-component__set-item.is-selected {
    background: #d19ab4 !important;
    color: #fff !important;
}

.cart-component__set-item.is-selected .cart-component__set-item-name,
.cart-component__set-item.is-selected .cart-component__set-item-price {
    color: #fff !important;
}

.cart-component__set-item-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-component__set-item-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.cart-component__set-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-component__set-item-name {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    min-width: 0;
}

.cart-component__set-item-price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
    margin-left: auto;
}

/* ==========================================================================
   アクションエリア
   ========================================================================== */
.cart-component__actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-between;
    align-items: stretch;
}

/* カートボタン */
.cart-component__add-btn {
    background-color: #D19AB4;
    color: #fff;
    text-align: center;
    width: calc(100% - 70px);
    max-width: 80%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    padding: 15px 20px;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.cart-component__add-btn:hover {
    opacity: 0.8;
}

.cart-component__add-btn span {
    position: relative;
    z-index: 0;
    padding-left: 23px;
}

.cart-component__add-btn span::before {
    content: "";
    position: absolute;
    background-image: url(../img/cart_w.png);
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center;
    width: 20px;
    height: 20px;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
}

/* 再入荷通知ボタン */
.cart-component__notify-btn {
    background-color: #D19AB4;
    color: #fff;
    text-align: center;
    width: calc(100% - 70px);
    max-width: 80%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    padding: 15px 20px;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.cart-component__notify-btn:hover {
    opacity: 0.8;
}

/* お気に入りボタン */
.cart-component__favorite {
    background-color: #d2d2d2;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 5px;
    position: relative;
    z-index: 0;
    transition: all ease 0.3s 0s;
    -webkit-transition: all ease 0.3s 0s;
    -moz-transition: all ease 0.3s 0s;
    cursor: pointer;
}

.cart-component__favorite.is-active {
    background-color: #d19ab4;
}

.cart-component__favorite::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    bottom: 0;
    right: 0;
    margin: auto;
    background-image: url(../img/heat_w.png);
    background-repeat: no-repeat;
    background-size: 100%;
    background-position: center;
    transition: all ease 0.3s 0s;
    -webkit-transition: all ease 0.3s 0s;
    -moz-transition: all ease 0.3s 0s;
}

.cart-component__favorite.is-active::before {
    background-image: url(../img/heat_w2.png);
}

/* ==========================================================================
   配送通知
   ========================================================================== */
.cart-component__shipping-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cart-component__shipping-icon {
    font-size: 18px;
    margin-right: 8px;
    animation: cart-component-truck-bounce 2s infinite;
    display: inline-block;
}

.cart-component__shipping-text {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes cart-component-truck-bounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(3px);
    }
}

/* ==========================================================================
   在庫なしメッセージ
   ========================================================================== */
.cart-component__out-of-stock-message {
    color: #f00;
    margin-bottom: 10px;
}

.cart-component__restock-notice {
    color: #f00;
    margin-top: 10px;
}

/* ==========================================================================
   アフィリエイトリンク
   ========================================================================== */
.cart-component__affiliate-links {
    margin: 15px 0;
}

.cart-component__affiliate-link {
    display: block;
    margin-bottom: 8px;
}

.cart-component__affiliate-btn {
    width: 100%;
    padding: 12px;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.cart-component__affiliate-btn:hover {
    opacity: 0.8;
}

.cart-component__affiliate-btn--amazon {
    background: #ff9900;
}

.cart-component__affiliate-btn--rakuten {
    background: #bf0000;
}

.cart-component__affiliate-btn--yahoo {
    background: #ff0033;
}

/* ==========================================================================
   ユーティリティ
   ========================================================================== */
.cart-component__hidden {
    display: none !important;
}

/* ==========================================================================
   レスポンシブ（タブレット）
   ========================================================================== */
@media screen and (max-width: 1200px) {
    /* 必要に応じて追加 */
}

/* ==========================================================================
   レスポンシブ（モバイル）
   ========================================================================== */
@media screen and (max-width: 800px) {
    .cart-component {
        margin: 2rem 0;
        padding: 2rem 5%;
    }

    .cart-component__plan:not(:last-of-type) {
        margin-bottom: 10px;
    }

    .cart-component__plan-title-wrap {
        font-size: 13px;
    }

    .cart-component__plan-name {
        font-size: 1.1em;
    }

    .cart-component__plan-price span {
        font-size: 1.05em;
    }

    .cart-component__plan-description {
        font-size: 13px;
    }

    .cart-component__plan-discount {
        font-size: 12px;
    }

    /* オプション行 */
    .cart-component__option-row .cart-component__plan-header {
        width: 100%;
        margin-bottom: 5px;
    }

    .cart-component__option-value {
        width: 100%;
    }

    .cart-component__option-items-row .cart-component__option-value {
        width: 100%;
    }

    .cart-component__option-multiple {
        max-height: 310px;
    }

    .cart-component__option-item {
        padding: 10px 5px;
    }

    .cart-component__option-item-img {
        width: 80px;
        height: 80px;
    }

    .cart-component__option-item-img img {
        width: 80px;
        height: 80px;
        object-fit: cover;
    }

    .cart-component__option-item-flex .cart-component__option-item-right {
        display: none;
    }

    .cart-component__option-item-txt .cart-component__option-item-price {
        display: block;
        text-align: right;
    }

    /* セット購入オプション品 */
    .cart-component__set-item-img {
        width: 60px;
        height: 60px;
    }

    .cart-component__set-item-name {
        font-size: 13px;
    }

    .cart-component__set-item-price {
        font-size: 13px;
    }

    /* 配送通知 */
    .cart-component__shipping-notice {
        flex-direction: row;
        padding: 8px 12px;
        margin-top: 10px;
    }

    .cart-component__shipping-icon {
        font-size: 16px;
        margin-right: 6px;
    }

    .cart-component__shipping-text {
        font-size: 12px;
        text-align: left;
    }
}
