/* Mobile Button Fix for Memory Pillow Expert */

/* 确保所有按钮在移动端都可以正常点击 */
.pillow-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 15px !important;
    justify-content: space-between !important;
}

.pillow-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    min-height: 44px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    flex: 1 !important;
    text-align: center !important;
    border: none !important;
    outline: none !important;
}

.pillow-button:active {
    transform: scale(0.98) !important;
}

.pillow-button:not(.buy-button) {
    background-color: #f8fafc !important;
    color: #1e40af !important;
    border: 2px solid #1e40af !important;
}

.pillow-button:not(.buy-button):hover,
.pillow-button:not(.buy-button):focus {
    background-color: #1e40af !important;
    color: white !important;
}

.pillow-button.buy-button {
    background-color: #1e40af !important;
    color: white !important;
    border: 2px solid #1e40af !important;
}

.pillow-button.buy-button:hover,
.pillow-button.buy-button:focus {
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

/* 移动端特殊优化 */
@media (max-width: 768px) {
    .pillow-actions {
        flex-direction: row !important;
        gap: 8px !important;
    }
    
    .pillow-button {
        padding: 12px 8px !important;
        font-size: 13px !important;
        min-height: 44px !important;
        width: 48% !important;
        flex: none !important;
    }
}

@media (max-width: 480px) {
    .pillow-button {
        padding: 10px 6px !important;
        font-size: 12px !important;
        min-height: 40px !important;
    }
}

/* 确保按钮在所有设备上都可见和可点击 */
.pillow-card .pillow-actions {
    position: relative !important;
    z-index: 10 !important;
}

.pillow-card .pillow-button {
    position: relative !important;
    z-index: 11 !important;
}

/* 修复可能的覆盖问题 */
.pillow-card:hover .pillow-actions,
.pillow-card:hover .pillow-button {
    pointer-events: auto !important;
}

/* 确保链接功能正常 */
a.pillow-button {
    display: flex !important;
    text-decoration: none !important;
}

a.pillow-button:visited {
    color: inherit !important;
}

/* 修复可能的JavaScript冲突 */
.pillow-button[href] {
    pointer-events: auto !important;
}

.pillow-button[onclick] {
    pointer-events: auto !important;
}