/* product_detail_simple.css */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* 防止水平溢出 */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f7fafc;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 32px;
    padding-bottom: 32px;
    box-sizing: border-box;
}

.product-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    padding: 24px;
    margin-top: 10px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 100%; /* 确保容器宽度受控 */
    box-sizing: border-box;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.space-x-4 > :not(:last-child) {
    margin-right: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 5px;
}

.mt-8 {
    margin-top: 12px;
}

.mr-2 {
    margin-right: 8px;
}

.ml-2 {
    margin-left: 8px;
    color: #99a1af;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-2xl {
    font-size: 24px;
    line-height: 32px;
}

.text-xl {
    font-size: 20px;
    line-height: 28px;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-600 {
    color: #4a5568;
}

.text-gray-800 {
    color: #2d3748;
}

.text-orange-600 {
    color: #e53e3e;
}

.text-white {
    color: #fff;
}

.text-center {
    text-align: center;
}

.bg-orange-600 {
    background: linear-gradient(135deg, #186df9, #186df9);
    border: none;
    width: 130px;
    height: 40px;
    padding: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-blue-600 {
    background: #000;
    border: none;
    width: 130px;
    height: 40px;
    padding: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.rounded-md {
    border-radius: 8px;
}

.hover\:bg-blue-700:hover {
    background: #075eec;
}

.focus\:outline-none:focus {
    outline: none;
}

.w-32 {
    width: 128px;
}

.h-32 {
    height: 128px;
}

.max-w-full {
    max-width: 100%;
    width: 100%;
}

.h-auto {
    height: auto;
    border-radius: 10px;
}

.md\:w-1\/2 {
    max-width: 100%;
    overflow: hidden;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
    object-fit: cover;
}

.shipping-tip {
    color: #28a745;
    font-size: 14px;
    /*! margin-top: 8px; */
}

.spec-button {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    box-sizing: border-box;
}

.spec-button.selected {
    background-color: #f91616;
    color: #fff;
    border-color: #f91616;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.recommended {
    position: relative;
}

.recommended::after {
    content: '90%用户选择';
    position: absolute;
    top: -10px;
    right: 0;
    background: #ffc107;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.package-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-price {
    margin-left: 8px;
    flex-shrink: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

.close {
    color: #a0aec0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #2d3748;
}

.bg-orange-600,
.bg-blue-600 {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.bg-orange-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(229, 62, 62, 0.3);
}

.bg-blue-600:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(43, 108, 176, 0.3);
}

@media (min-width: 768px) {
    .container {
        max-width: 956px; /* 电脑端最大宽度 */
    }
    .md\:flex-row {
        flex-direction: row;
    }
    .md\:w-1\/2 {
        width: 50%;
        max-width: 50%;
        overflow: hidden;
    }
    .md\:pl-6 {
        padding-left: 24px;
    }
    .md\:mt-0 {
        margin-top: 0;
    }
    .spec-button {
        padding: 8px 16px;
        height: 48px;
        max-width: 600px;
    }
}

@media (max-width: 640px) {
    .container {
        max-width: 100%; /* 手机端强制最大宽度为 100% */
        padding-left: 8px;
        padding-right: 8px;
    }
    .modal-content {
        width: 85%;
        margin: 20% auto;
    }
    .spec-button {
        height: 40px;
        padding: 6px 10px;
        font-size: 14px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .package-name {
        font-size: 13px;
        max-width: 70%;
    }
    .package-price {
        font-size: 13px;
    }
    .product-container {
        padding: 16px;
    }
    .product-image {
        width: 100%;
        max-width: none;
        height: auto;
    }
    .max-w-full {
        max-width: 100%;
        width: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}