/* ============================================================
   共通設定
   ============================================================ */

:root {
    --footer-base-padding: 6px;
    --footer-height: 180px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0);
    --footer-total-padding: calc(var(--footer-base-padding) + var(--safe-area-bottom));
}

body.bottomsheet-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .cart-sticky-checkout-btn,
    .cart-sticky-toggle-btn,
    .cart-sticky-toggle-btn .arrow,
    .delete-all-btn,
    .coupon-apply-btn,
    .sticky-footer-option,
    .sticky-footer-cart,
    .segment-btn,
    .segment-btn::before,
    .pack-card,
    .pack-card::before,
    .footer-btn-add,
    .ec-productRole__bottomSheet__close,
    .sticky-purchase-type {
        transition: none !important;
        transform: none !important;
    }
}


/* ============================================================
   カートページ：固定フッター
   ============================================================ */

.ec-cartRole__stickyFooter {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f6f2e8;
    border-top: 1px solid #e0d5c7;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding-bottom: var(--footer-base-padding);
    padding-bottom: var(--footer-total-padding);
    z-index: 1000;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
}

@media screen and (min-width: 992px) {
    .ec-cartRole__stickyFooter {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .ec-cartRole {
        padding-bottom: 200px;
        padding-bottom: calc(var(--footer-height) + var(--safe-area-bottom));
    }
}

.cart-sticky-inner {
    padding: 12px 16px var(--footer-base-padding) 16px;
    padding-bottom: var(--footer-total-padding) !important;
}

.cart-sticky-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px;
    background: #f6f2e8;
    margin-bottom: 12px;
}

.product-info {
    flex: 1;
}

.product-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.type-label {
    font-size: 14px;
    font-weight: bold;
    color: #1d385c;
}

.type-label.subscription,
.type-label.onetime {
    color: #1d385c;
}

.frame-size {
    font-size: 13px;
    color: #666;
}

.trial-badge {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.selection-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 16px;
    color: #525263;
    justify-content: center;
    font-weight: 500;
}

.selection-info .label   {
    font-size: 14px;
    font-weight: 400;
}
.selected-count,
.capacity-count {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 500;
    font-size: 18px;
}

.separator {
    margin: 0 2px;
}

.delete-all-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.09s cubic-bezier(0, 0.43, 0.5, 1),
                color 0.09s cubic-bezier(0, 0.43, 0.5, 1);
    white-space: nowrap;
}

.delete-all-btn:hover {
    background: #dc3545;
    color: white;
}

.delete-all-btn svg {
    width: 16px;
    height: 16px;
}

.cart-sticky-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.cart-sticky-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    background: #ebe5d9;
    border: 1px solid #d4c9b8;
    border-radius: 6px;
    font-size: 13px;
    font-weight:500;
    display: flex;
    color:#414241;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.09s cubic-bezier(0, 0.43, 0.5, 1);
    cursor: pointer;
}

.cart-sticky-toggle-btn:hover {
    background: #dfd5c5;
}

.cart-sticky-toggle-btn.active {
    background-color: #1d385c !important;
    color: white;
    border-color: #1d385c !important;
}

.cart-sticky-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.cart-sticky-toggle-btn .arrow {
    transition: transform 0.3s;
    display: inline-block;
}

.cart-sticky-toggle-btn.active .arrow {
    transform: rotate(180deg);
}

.cart-sticky-expandable {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cart-sticky-coupon {
    padding: 12px;
    background: #ebe5d9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.cart-sticky-coupon__title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.coupon-input-group input[type="text"] {
    flex: 1;
    min-width: 0; /* これが重要！ */
    font-size: 16px !important;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.coupon-input-group button,
.coupon-apply-btn {
    flex-shrink: 0; /* ボタンが縮まないように */
    white-space: nowrap; /* テキストを折り返さない */
    padding: 10px 16px;
}

/* スマホ・タブレット用の調整 */
@media (max-width: 991px) {
    .coupon-input-group {
        gap: 6px;
    }
    
    .coupon-input-group input[type="text"] {
        font-size: 16px !important;
        padding: 10px 12px;
    }
    
    .coupon-input-group button,
    .coupon-apply-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

.coupon-apply-btn {
    padding: 10px 16px;
    background: #1d385c;
    color: white;
    border: 1px solid #1d385c;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.09s cubic-bezier(0, 0.43, 0.5, 1),
                border-color 0.09s cubic-bezier(0, 0.43, 0.5, 1);
}

.coupon-apply-btn:hover {
    background: #2d5a8f;
    border-color: #1b3a60;
}

.coupon-apply-btn:active {
    background: #173251;
    border-color: #142a44;
}

.applied-coupon-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d4c9b8;
}

.coupon-name {
    flex: 1;
    font-size: 13px;
}

.coupon-name strong {
    color: #1d385c;
}

.coupon-discount {
    color: #666;
    font-size: 12px;
    margin-left: 6px;
}

.coupon-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 20px;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
    transition: color 0.3s;
}

.coupon-remove-btn:hover {
    color: #c82333;
}

.cart-sticky-detail {
    padding: 12px;
    background: #ebe5d9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 14px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #525263;
    font-weight: 500;
}

.detail-value {
    text-align: right;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.discount-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
}

.discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.original-price {
    text-decoration: line-through;
    color: #999;
}

.sale-price {
    font-size: 16px;
    color: #1d385c;
}

.text-primary {
    color: #1d385c;
}

.cart-sticky-total {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: none;
    justify-content: center;
}

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

.total-price {
    font-size: 26px;
    font-weight: bold;
    color: #1d385c;
}

.total-tax {
    font-size: 12px;
    color: #666;
}

.cart-sticky-button-area {
    margin-top: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-sticky-checkout-btn {
    width: 100%;
    padding: 16px;
    background: #1d385c;
    color: white;
    border: 1px solid #1d385c;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none !important;
    transition: background-color 0.09s cubic-bezier(0, 0.43, 0.5, 1),
                border-color 0.09s cubic-bezier(0, 0.43, 0.5, 1);
}

.cart-sticky-button-area .cart-sticky-checkout-btn {
    flex: 1;
    padding: 16px 20px;
    white-space: nowrap;
    border-radius: 48px;
    font-weight: 700;
}

.cart-sticky-checkout-btn:hover:not(:disabled) {
    background: #2d5a8f;
    border-color: #1b3a60;
}

.cart-sticky-checkout-btn:active:not(:disabled) {
    background: #173251;
    border-color: #142a44;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset !important;
}

.cart-sticky-checkout-btn:focus-visible {
    outline: 2px solid rgba(29, 56, 92, 0.45);
    outline-offset: 3px;
}

.cart-sticky-checkout-btn:disabled {
    background-color: #9aa7b8;
    border-color: #9aa7b8;
    color: #eef2f6;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

.cart-sticky-warning {
    margin-top: 8px;
    text-align: center;
    color: #dc3545;
    font-size: 12px;
    width: 100%;
}

.cart-sticky-coupon .alert {
    font-size: 12px;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@media (max-width: 991px) {
    .ec-cartRole__side__coupon {
        display: none;
    }
}

.ec-cartRole__clearLink {
    max-width: 1130px;
    margin: 0 auto 10px;
    padding: 0 15px;
}

.ec-cartRole__clearLink__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.ec-cartRole__clearLink .product-name {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.ec-cartRole__clearLink .clear-link {
    color: #333;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
}

.ec-cartRole__clearLink .clear-link:hover {
    color: #666;
    text-decoration: none;
}

@media (max-width: 991px) {
    .ec-cartRole__clearLink {
        padding: 0;
    }
}

@media (max-width: 991px) and (orientation: landscape) {
    :root {
        --footer-base-padding: 16px;
    }
    
    .cart-sticky-inner {
        padding-top: 8px;
    }
    
    .cart-sticky-product-header {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .cart-sticky-total .total-price {
        font-size: 22px;
    }
}



/* ============================================================
   商品詳細ページ：固定フッター
   ============================================================ */

.ec-productRole__stickyFooter {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f6f2e8;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 12px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #f6f2e8;
}

.ec-productRole__stickyFooter.-trial {
    background: #f6f2e8;
    padding: 16px 12px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

@media screen and (max-width: 991px) {
    .ec-productRole__stickyFooter {
        display: block;
    }
    
    body.has-sticky-footer {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
}

.ec-productRole__stickyFooter__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sticky-footer-title {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}

.sticky-footer-layout {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.sticky-footer-option {
    flex: 1;
    background: #fff;
    border: 1px solid #414241;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    color:#414241;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.sticky-footer-option:hover {
    color:#414241;
    background: #ebebeb;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.sticky-footer-option:active {
    background: #e0e0e0;
        color:#414241;
}

.sticky-footer-option:focus-visible {
    outline: 2px solid rgba(33, 37, 41, 0.35);
    outline-offset: 3px;
        color:#414241;
}

.option-label {
font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    display: flex
;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.option-label .arrow {
    font-size: 10px;
    margin-left: 4px;
}

.option-detail {
font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    
}

.sticky-footer-cart {
    flex: 0 0 auto;
    min-width: 120px;
    background: #1d385c;
    border: 1px solid #1d385c;
    border-radius: 8px;
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: none !important;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.sticky-footer-cart:hover:not(:disabled) {
    background: #2d5a8f;
    border-color: #1b3a60;
    box-shadow: none !important;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.sticky-footer-cart:active:not(:disabled) {
    background: #173251;
    border-color: #142a44;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset !important;
}

.sticky-footer-cart:focus-visible {
    outline: 2px solid rgba(29, 56, 92, 0.45);
    outline-offset: 3px;
}

.sticky-footer-cart:disabled {
    background-color: #9aa7b8;
    border-color: #9aa7b8;
    color: #eef2f6;
    cursor: not-allowed;
    pointer-events: none;
}

.cart-label {
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 500;
}

.cart-price {
    font-size: 16px;
    font-weight: bold;
}

.sticky-footer-select-mode {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.sticky-purchase-type {
    flex: 1;
    background: #ffffff;
    border: 1px solid #414241;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
    font-size: 16px;
    font-weight: 700;
    color: #525263;
}

.sticky-purchase-type:hover {
    background: #f9f9f9;
    border-color: #666;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.sticky-purchase-type:active {
    transform: scale(0.98);
}

.sticky-purchase-type:focus-visible {
    outline: 2px solid rgba(233, 79, 42, 0.45);
    outline-offset: 3px;
}

.sticky-purchase-type.-recommend {
    overflow: visible;
}

.purchase-type-badge {
    position: absolute;
    top: -12px;
    right: -5px;
    z-index: 1;
    pointer-events: none;
}

.purchase-type-badge img {
    display: block;
    width: 89px;
    height: 28px;
}

.purchase-type-label {
    display: block;
}

.sticky-footer-detail-mode {
    display: flex;
    gap: 8px;
    align-items: stretch;
}


/* ============================================================
   商品詳細ページ：ボトムシート
   ============================================================ */

.ec-productRole__bottomSheet {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.ec-productRole__bottomSheet__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ec-productRole__bottomSheet.is-open .ec-productRole__bottomSheet__overlay {
    opacity: 1;
}

.ec-productRole__bottomSheet__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    max-height: 89vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.ec-productRole__bottomSheet.is-open .ec-productRole__bottomSheet__content {
    transform: translateY(0);
}

.ec-productRole__bottomSheet__handle {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    cursor: pointer;
    flex-shrink: 0;
}

.ec-productRole__bottomSheet__handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.ec-productRole__bottomSheet__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.ec-productRole__bottomSheet__title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.ec-productRole__bottomSheet__close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.ec-productRole__bottomSheet__close:hover {
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.ec-productRole__bottomSheet__close:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.ec-productRole__bottomSheet__close:focus-visible {
    outline: 2px solid rgba(29, 56, 92, 0.45);
    outline-offset: 2px;
}

.ec-productRole__bottomSheet__fixed-area {
    padding: 20px 20px 0;
    padding-top: 30px;
    flex-shrink: 0;
    background: #f6f2e8;
    position: relative;
    z-index: 1;
}

.ec-productRole__bottomSheet__scroll-area {
    padding: 20px 20px 40px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
    background: #f6f2e8;
}

.ec-productRole__bottomSheet__body {
    padding: 20px;
    min-height: 300px;
}

@media screen and (min-width: 992px) {
    .ec-productRole__bottomSheet {
        display: none !important;
    }
}

.purchase-segment {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: 1px solid #414241;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.subscription-info {
    margin-top:18px;
}
.segment-btn {
    flex: 1;
    padding: 16px;
    background: #ffffff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
    position: relative;
    color: #525263;
}

.segment-btn:first-child {
    border-right: 1px solid #414241;
}

.segment-btn:hover:not(.active) {
    background: #f9f9f9;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.segment-btn.active {
    background: #ffffff;
    box-shadow: none;
}

.segment-btn::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="9" fill="white" stroke="%23cccccc" stroke-width="2"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.segment-btn:hover::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="9" fill="%23f7f7f7" stroke="%23aaaaaa" stroke-width="2"/></svg>');
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.segment-btn.active::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="9" fill="white" stroke="%23e94f2a" stroke-width="2"/><circle cx="10" cy="10" r="4.5" fill="%23e94f2a"/></svg>');
}

.segment-btn:focus-visible {
    outline: 2px solid rgba(233, 79, 42, 0.45);
    outline-offset: 2px;
}

.segment-btn[data-type="subscription"]::after {
    content: "";
    display: block;
    width: 89px;
    height: 28px;
    background: url(../icon/icon_recommend.svg) no-repeat;
    background-size: contain;
    position: absolute;
    top: -30px;
    right: 8px;
    z-index: 2;
    pointer-events: none;
}

.pack-selection {
    margin-bottom: 0;
}

.pack-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pack-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    padding-left: 50px;
    margin-bottom: 0;
    cursor: pointer;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
    position: relative;
    border: 1px solid #414241;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.pack-card::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="white" stroke="%23cccccc" stroke-width="2"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.pack-card:hover::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%23f7f7f7" stroke="%23aaaaaa" stroke-width="2"/></svg>');
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.pack-card.active::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="white" stroke="%23db5331" stroke-width="2"/><circle cx="12" cy="12" r="5" fill="%23db5331"/></svg>');
}

.pack-card::after,
.pack-card.active::after {
    display: none;
}

.pack-card:active {
    transform: scale(0.98);
}

.pack-card:focus-visible {
    outline: 2px solid rgba(233, 79, 42, 0.45);
    outline-offset: 3px;
}

.pack-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 4px;
}

.pack-label {
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.pack-price {
display: flex;
    align-items: baseline;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    justify-content: flex-end;
}

.pack-discount {
    background: #db5331;
    color: #fff;
    font-size: 10px;
    font-family: serif;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    margin-bottom: 4px;
    width: fit-content;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.pack-price .original-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    line-height: 1.2;
}

.pack-price .sale-price {
    display: flex;
    align-items: baseline;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.price-extended .default  {
    color: #888;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.price-extended .default span {
    text-decoration: line-through;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-weight: 500;
}


.pack-price .yen {
    font-size: 16px;
    margin-right: 2px;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 500;
}

.pack-tax {
    font-size: 11px;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    margin-left: 4px;
}

.price-extended {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pack-custom {
    font-size: 11px;
    margin-top: 2px;
    border: 1px solid #000;
    color: #414241;
    border-radius: 24px;
    padding: 2px 10px;
    letter-spacing: 0;
    margin-top:0px;
    width: fit-content;
    white-space: nowrap;

}

.ec-productRole__bottomSheet__footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.footer-selection {
    font-size: 14px;
    color: #666;
}

.footer-price {
    font-size: 18px;
    font-weight: bold;
    color: #e94f2a;
}

.footer-btn-add {
    width: 100%;
    padding: 16px;
    background: #1d385c;
    color: white;
    border: 1px solid #1d385c;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
            border-radius: 48px;
    font-weight: 700;
    box-shadow: none !important;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
}

.footer-btn-add:hover:not(:disabled) {
    background: #2d5a8f;
    border-color: #1b3a60;
    box-shadow: none !important;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.footer-btn-add:active:not(:disabled) {
    background: #173251;
    border-color: #142a44;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset !important;
}

.footer-btn-add:focus-visible {
    outline: 2px solid rgba(29, 56, 92, 0.45);
    outline-offset: 3px;
}

.footer-btn-add:disabled {
    background-color: #9aa7b8;
    border-color: #9aa7b8;
    color: #eef2f6;
    cursor: not-allowed;
    pointer-events: none;
}

.subscription-info {
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
}

.subscription-points {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.subscription-points li {
    padding-left: 32px;
    margin: 12px 0px;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
}

.subscription-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #4a7c59;
    border-radius: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8L6.5 11.5L13 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.subscription-detail {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
}

.subscription-detail-title {
    border-radius: 32px;
    background: #378a69;
    width: fit-content;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.subscription-detail-text {
    font-size: 13px;
    line-height: 1.8;
    font-weight: 500;
}

.subscription-detail-text br {
    display: block;
    content: "";
    margin-top: 8px;
}


/* ============================================================
   トライアル商品：固定フッター
   ============================================================ */

.sticky-footer-trial-layout {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sticky-footer-trial-price {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trial-badge-limited {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
}

.trial-discount-badge {
    display: inline-block;
    background: #de5d50;
    color: white;
    font-size: 13px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    width: fit-content;
}

.trial-price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
        justify-content: center;
}

.trial-original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.trial-sale-price {
    font-size: 26px;
    font-weight: bold;
    color: #1d385c;
    line-height: 1;
}

.trial-sale-price .yen {
    font-size: 18px;
    margin-right: 2px;
}

.trial-tax-note {
    font-size: 11px;
    color: #666;
}

.sticky-footer-trial-button {
    flex: 0 0 auto;
    min-width: 130px;
    background: #1d385c;
    border: 1px solid #1d385c;
    padding: 14px 20px;
    color: white;
    cursor: pointer;
    font-size: 15px;
    box-shadow: none !important;
    transition: 0.45s cubic-bezier(0.23, 0.2, 0.35, 0.89) !important;
    white-space: nowrap;
        border-radius: 48px;
    font-weight: 700;
}

.sticky-footer-trial-button:hover:not(:disabled) {
    background: #2d5a8f;
    border-color: #1b3a60;
    box-shadow: none !important;
    transition: 0.09s cubic-bezier(0, 0.43, 0.5, 1) !important;
}

.sticky-footer-trial-button:active:not(:disabled) {
    background: #173251;
    border-color: #142a44;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset !important;
}

.sticky-footer-trial-button:focus-visible {
    outline: 2px solid rgba(29, 56, 92, 0.45);
    outline-offset: 3px;
}

.sticky-footer-trial-button:disabled {
    background-color: #9aa7b8;
    border-color: #9aa7b8;
    color: #eef2f6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 適用されたクーポンタグのスタイル */
.cart-sticky-coupon .alert a {
    color:#414241;
    font-weight:500;
    text-decoration: underline;
}

    .cart-sticky-coupon .applied-coupon-tag {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 12px;
        padding: 5px 8px 5px 28px;
        background: #e94f2a;
        border-radius: 0 8px 8px 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        width: fit-content;
        max-width: 100%;
        clip-path: polygon(
            12px 0,  
            100% 0,   
            100% 100%,
            12px 100%,
            0 50%     
        );
    }

    .cart-sticky-coupon .applied-coupon-tag::after {
        content: '';
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 5px;
        background: #fff;
        border-radius: 50%;
    }

    .cart-sticky-coupon .coupon-tag-content {
        flex-shrink: 0;
        min-width: 0;
    }

    .cart-sticky-coupon .coupon-details {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .cart-sticky-coupon .coupon-name {
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }

    .cart-sticky-coupon .coupon-discount {
        color: #ffd700;
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
    }

    .cart-sticky-coupon .coupon-remove-form {
        margin: 0;
        margin-left: 8px;
    }

    .cart-sticky-coupon .coupon-close-btn {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: #fff;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 0; 
        font-weight: bold;
        line-height: 1;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .cart-sticky-coupon .coupon-close-btn::before {
        content: "\f00d" !important;
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        font-size: 14px !important;
        margin-right: 0 !important;
        display: inline-block !important;
    }

    .cart-sticky-coupon .coupon-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }

    .cart-sticky-coupon .coupon-close-btn:active {
        transform: scale(0.95);
    }
    
    
/* ============================================================
   注文手続きページ：固定フッター
   ============================================================ */

@media (max-width: 991px) {
    .ec-shoppingRole__stickyFooter {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f6f2e8;
        border-top: 1px solid #e0d5c7;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        padding-bottom: var(--footer-base-padding);
        padding-bottom: var(--footer-total-padding);
        z-index: 1000;
        max-height: 80vh;
        max-height: 80dvh;
        overflow-y: auto;
    }

    .ec-cartRole__wrap {
        padding-bottom: 200px;
        padding-bottom: calc(var(--footer-height) + var(--safe-area-bottom));
    }
    
    /* デスクトップ用のサイドバーを非表示 */
    .ec-cartRole__side {
        display: none !important;
    }

    .shopping-sticky-inner {
        padding: 12px 16px var(--footer-base-padding) 16px;
        padding-bottom: var(--footer-total-padding) !important;
    }

    /* ヘッダー行：購入タイプと合計金額 */
    .shopping-sticky-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        margin-bottom: 12px;
        border-bottom: 1px solid #d4c9b8;
    }

    .shopping-sticky-title {
        flex: 1;
    }

    .shopping-sticky-title .purchase-type-text {
        font-size: 16px;
        font-weight: 600;
    }

    .shopping-sticky-total-price {
        display: flex;
        align-items: baseline;
        gap: 6px;
        flex-shrink: 0;
    }

    .shopping-sticky-total-price .total-label {
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }

    .shopping-sticky-total-price .price-value {
        font-size: 24px;
        font-weight: 700;
        color: #1d385c;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-optical-sizing: auto;
        font-weight: 600;
        font-style: normal;
    }

    /* 詳細表示（常時表示） */
    .shopping-sticky-detail-content {
        padding: 12px;
        background: #ebe5d9;
        border-radius: 8px;
        margin-bottom: 18px;
    }

    .shopping-sticky-detail-content .detail-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .shopping-sticky-detail-content .detail-row:last-of-type {
        margin-bottom: 0;
    }

    .shopping-sticky-detail-content .detail-label {
        color: #525263;
        font-weight: 500;
    }

    .shopping-sticky-detail-content .detail-value {
        text-align: right;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-optical-sizing: auto;
        font-weight: 500;
        font-style: normal;
    }

    .shopping-sticky-detail-content .discount-info {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 4px;
        font-size: 12px;
        justify-content: flex-end;
    }

    .shopping-sticky-detail-content .discount-badge {
    background: #db5331;
    color: #fff;
    font-size: 11px;
    font-family: serif;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
    margin-bottom: 4px;
    width: fit-content;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    }

    .shopping-sticky-detail-content .original-price {
        text-decoration: line-through;
        color: #999;
    }

    .shopping-sticky-detail-content .sale-price {
        font-size: 16px;
        color: #1d385c;
    }

    .shopping-sticky-detail-content .text-success {
        color: #4a7c59;
        font-weight: 600;
    }

    .shopping-sticky-detail-content .detail-tax-note {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #d4c9b8;
        font-size: 12px;
        color: #666;
        text-align: center;
    }

    /* ボタンエリア */
    .shopping-sticky-button-area {
        margin-bottom: 8px;
    }

    .shopping-sticky-submit-btn {
        width: 100%;
        padding: 16px 20px;
        background: #1d385c;
        color: white;
        border: 1px solid #1d385c;
        border-radius: 48px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        box-shadow: none !important;
        transition: background-color 0.09s cubic-bezier(0, 0.43, 0.5, 1),
                    border-color 0.09s cubic-bezier(0, 0.43, 0.5, 1);
    }

    .shopping-sticky-submit-btn:hover:not(:disabled) {
        background: #2d5a8f;
        border-color: #1b3a60;
    }

    .shopping-sticky-submit-btn:active:not(:disabled) {
        background: #173251;
        border-color: #142a44;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset !important;
    }

    .shopping-sticky-submit-btn:focus-visible {
        outline: 2px solid rgba(29, 56, 92, 0.45);
        outline-offset: 3px;
    }

    .shopping-sticky-submit-btn:disabled {
        background-color: #9aa7b8;
        border-color: #9aa7b8;
        color: #eef2f6;
        cursor: not-allowed;
        pointer-events: none;
        opacity: 1;
    }
}

@media (max-width: 991px) and (orientation: landscape) {
    .shopping-sticky-inner {
        padding-top: 8px;
    }
    
    .shopping-sticky-header-row {
        padding: 8px 0;
        margin-bottom: 8px;
    }
    
    .shopping-sticky-total-price .price-value {
        font-size: 20px;
    }
}

/* 固定フッターのローディングオーバーレイ */
.sticky-footer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85); /* 白色系の半透明 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.sticky-footer-loading-overlay .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
    border-color: #1d385c; /* メインカラー */
    border-right-color: transparent; /* 回転効果のため右側を透明に */
}

/* ローディング中はボタンを無効化 */
.sticky-footer-detail-mode.loading .sticky-footer-option,
.sticky-footer-detail-mode.loading .sticky-footer-cart {
    pointer-events: none;
    opacity: 0.6;
}