.mall-actionsheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
}

.mall-actionsheet.is-visible {
    pointer-events: auto;
    visibility: visible;
}

.mall-actionsheet.is-visible .mall-actionsheet__mask {
    opacity: 1;
}

.mall-actionsheet.is-visible .mall-actionsheet__panel {
    transform: translateY(0);
}

.mall-actionsheet__mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.mall-actionsheet__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 760px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.16);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom);
}

.mall-actionsheet__handle {
    width: 36px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.mall-actionsheet__header {
    position: relative;
    flex-shrink: 0;
    padding: 8px 16px 0;
}

.mall-actionsheet__close {
    position: absolute;
    top: 8px;
    right: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mall-actionsheet__hero {
    display: flex;
    gap: 14px;
    padding-right: 36px;
    margin-bottom: 16px;
}

.mall-actionsheet__thumb {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
}

.mall-actionsheet__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mall-actionsheet__thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.mall-actionsheet__hero-info {
    flex: 1;
    min-width: 0;
}

.mall-actionsheet__price {
    color: #ef4444;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.mall-actionsheet__price small {
    font-size: 14px;
    font-weight: 600;
}

.mall-actionsheet__name {
    margin: 10px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.mall-actionsheet__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 16px 12px;
    -webkit-overflow-scrolling: touch;
}

.mall-actionsheet__spec-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.mall-actionsheet__spec-group {
    margin-bottom: 16px;
}

.mall-actionsheet__spec-label {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 14px;
}

.mall-actionsheet__spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mall-actionsheet__spec-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 96px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.mall-actionsheet__spec-chip:hover {
    border-color: #cbd5e1;
}

.mall-actionsheet__spec-chip.is-active {
    border-color: #2563eb;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.04);
    font-weight: 600;
}

.mall-actionsheet__tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 16px;
}

.mall-actionsheet__tab {
    position: relative;
    padding: 0 2px 12px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 15px;
    font-weight: 500;
}

.mall-actionsheet__tab.is-active {
    color: #111827;
    font-weight: 700;
}

.mall-actionsheet__tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: #2563eb;
}

.mall-actionsheet__content {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-wrap;
    padding-bottom: 12px;
}

.mall-actionsheet__loading {
    padding: 48px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.mall-actionsheet__footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #eef2f7;
}

.mall-actionsheet__service {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 48px;
    color: #6b7280;
    font-size: 11px;
    flex-shrink: 0;
}

.mall-actionsheet__service-icon {
    font-size: 22px;
    line-height: 1;
}

.mall-actionsheet__service[data-mall-cs-open] {
    cursor: pointer;
}

.mall-actionsheet__service[data-mall-cs-open]:hover {
    color: #2563eb;
}

.mall-actionsheet__pay {
    flex: 1;
    display: flex;
    gap: 10px;
}

.mall-actionsheet__pay-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 15px;
    font-weight: 600;
    cursor: not-allowed;
}

.mall-actionsheet__pay-btn.is-ready {
    color: #fff;
    cursor: pointer;
}

.mall-actionsheet__pay-btn--alipay.is-ready {
    background: #1677ff;
}

.mall-actionsheet__pay-btn--wechat.is-ready {
    background: #07c160;
}

body.mall-sheet-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    .mall-actionsheet {
        display: none !important;
    }

    .mall-actionsheet.mall-actionsheet--renew {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 24px;
    }

    .mall-actionsheet.mall-actionsheet--renew .mall-actionsheet__panel {
        width: min(520px, 100%);
        border-radius: 16px;
        max-height: min(88vh, 720px);
        transform: translateY(16px);
    }

    .mall-actionsheet.mall-actionsheet--renew.is-visible .mall-actionsheet__panel {
        transform: translateY(0);
    }
}
