
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
}
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1rem;
}
.navbar-brand {
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
}
.navbar-brand img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 6px;
}
.nav-link {
    font-weight: 500;
    color: #555 !important;
    margin-left: 15px;
    font-size: 14px;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px;
}
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.95);
    overflow: hidden;
}
.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border: none;
}
.card-header .card-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}
.card-block {
    padding: 16px 20px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.product-icon {
    height: 185px;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}
.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-body {
    padding: 16px;
}
.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 6px;
}
.product-desc {
    font-size: 12px;
    color: #8e9aaf;
    line-height: 1.45;
    margin-bottom: 8px;
    min-height: 36px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #ff4d4f;
}
.product-price small {
    font-size: 12px;
    font-weight: 400;
    color: #8e9aaf;
}
.product-stock {
    font-size: 12px;
    color: #8e9aaf;
    margin-top: 6px;
}
.stock-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}
.stock-high { background: #e8f7ef; color: #2e7d32; }
.stock-medium { background: #fff8e1; color: #f57c00; }
.stock-low { background: #ffebee; color: #c62828; }
.buy-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 0;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}
.service-float {
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.service-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 22px;
}
.go-top {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}
.layui-layer {
    border-radius: 20px !important;
    overflow: hidden !important;
}
.layui-layer-content {
    border-radius: 0 !important;
}
.layui-layer-setwin {
    right: 35px !important;
    top: 35px !important;
}
.modal-layout {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
}
.modal-product-info {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.modal-product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1f2f3a;
    margin-bottom: 6px;
}
.modal-product-desc {
    color: #8e9aaf;
    font-size: 13px;
    margin-bottom: 12px;
}
.modal-price {
    font-size: 26px;
    font-weight: 700;
    color: #ff4d4f;
}
.modal-form {
    padding: 16px 20px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-weight: 600;
    color: #1f2f3a;
    margin-bottom: 6px;
    font-size: 13px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e4ec;
    border-radius: 12px;
    font-size: 14px;
}
.quantity-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fc;
    border-radius: 12px;
    padding: 4px 10px;
    width: fit-content;
}
.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e0e4ec;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #667eea;
}
.quantity-num {
    font-size: 15px;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}
.quantity-stock {
    font-size: 12px;
    color: #8e9aaf;
    margin-left: 10px;
}
.payment-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.payment-option {
    flex: 1;
    background: #f8f9fc;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
.payment-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea10, #764ba210);
}
.payment-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
}
.payment-name {
    font-size: 11px;
    font-weight: 500;
}
.modal-footer {
    background: #f8f9fc;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.total-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}
.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2f3a;
}
.total-price {
    font-size: 26px;
    font-weight: 700;
    color: #ff4d4f;
}
.confirm-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr; gap: 16px; }
    .product-body { padding: 14px; }
    .container { padding: 16px 12px; }
    .nav-link { margin-left: 12px; font-size: 13px; }
}
