/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: #f76220;
}

/* ===== Top Ad Banner ===== */
.top-ad-banner {
    width: 100%;
    height: 76px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

/* ===== Navigation Bar ===== */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    height: 40px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.nav-user a {
    color: #666;
    padding: 5px 10px;
}

.nav-user a:hover {
    color: #f76220;
}

.user-name {
    color: #f76220;
    font-weight: 500;
}

/* ===== Search Section (Centered - No Results) ===== */
.search-section-centered {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 60px 20px;
}

.search-centered-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.search-title {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

/* ===== Search Section (Top - Has Results) ===== */
.search-section-top {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-top-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Search Box ===== */
.search-box {
    display: flex;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #f76220;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(247, 98, 32, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: #f76220;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #d95318;
}

/* ===== Brand Showcase ===== */
.brand-showcase {
    margin-top: 50px;
    text-align: center;
}

.showcase-subtitle {
    font-size: 24px;
    color: #333;
    font-weight: 600;
    margin-bottom: 35px;
    letter-spacing: 0.5px;
}

.brand-cards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: center;
}

.brand-card {
    background: transparent;
    border-radius: 12px;
    padding: 0;
    width: 140px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: visible;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-card:hover {
    transform: translateY(-8px) scale(1.05);
}

.brand-card-logo-wrapper {
    background: transparent;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    border: none;
    transition: all 0.3s ease;
}

.brand-card:hover .brand-card-logo-wrapper {
    background: transparent;
}

.brand-card-logo {
    max-width: 120px;
    max-height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.brand-card:hover .brand-card-logo {
    filter: drop-shadow(0 4px 16px rgba(247, 98, 32, 0.3));
    transform: scale(1.1);
}

.brand-card-info {
    padding: 15px 0 0;
    text-align: center;
    background: transparent;
}

.brand-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.brand-card-count {
    font-size: 36px;
    font-weight: 700;
    color: #f76220;
    margin-bottom: 6px;
    line-height: 1.2;
    background: linear-gradient(135deg, #f76220 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-card-label {
    font-size: 13px;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.3px;
}


/* ===== Search Suggestions ===== */
.search-suggestions {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #fff;
    border: 2px solid #f76220;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(247, 98, 32, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 12px 25px;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f9f9f9;
    color: #f76220;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* ===== Results Section ===== */
.results-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.results-info {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #666;
}

.results-info span {
    color: #f76220;
    font-weight: 600;
    margin: 0 5px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.error-submit-btn {
    color: #dc0816;
    cursor: pointer;
    font-size: 14px;
}

.error-submit-btn:hover {
    text-decoration: underline;
}

/* ===== Results Table ===== */
.results-table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: #fafafa;
}

.results-table th {
    padding: 15px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #e5e5e5;
    font-size: 14px;
}

.results-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
}

.results-table tbody tr:hover {
    background: #f9f9f9;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.product-img {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
}

.brand-logo {
    max-width: 60px;
    max-height: 30px;
    object-fit: contain;
}

.stock-value {
    color: #28a745;
    font-weight: 600;
}

.price-value {
    color: #f76220;
    font-weight: 600;
}

.pdf-link {
    color: #dc0816;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pdf-icon {
    max-height: 15px;
}

/* Table Links */
.results-table a {
    color: #f76220;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.results-table a:hover {
    color: #d95318;
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ===== Disclaimer ===== */
.disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: #fff9e6;
    border-left: 4px solid #f76220;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.8;
}

.disclaimer b {
    color: #f76220;
}

.disclaimer a {
    color: #dc0816;
}

/* ===== Error Submit Form ===== */
.error-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.error-form-overlay.show {
    display: flex;
}

.error-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.error-form h3 {
    margin-bottom: 20px;
    color: #333;
}

.error-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.error-form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.error-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-submit {
    background: #f76220;
    color: #fff;
}

.btn-cancel {
    background: #e5e5e5;
    color: #666;
}

/* ===== Right Sidebar ===== */
.right-sidebar {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-item {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #666;
}

.sidebar-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #f76220;
}

.sidebar-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.sidebar-item-text {
    font-size: 12px;
}

.sidebar-item.ai-service {
    background: #f76220;
    color: #fff;
}

.sidebar-item.ai-service:hover {
    background: #d95318;
    color: #fff;
}

/* Hotline Popup */
.hotline-popup {
    position: absolute;
    right: 70px;
    bottom: 0;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: none;
    white-space: nowrap;
}

.sidebar-item:hover .hotline-popup {
    display: block;
}

.hotline-popup div {
    margin: 5px 0;
    font-size: 13px;
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .search-title {
        font-size: 32px;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .results-table {
        font-size: 12px;
    }

    .results-table th,
    .results-table td {
        padding: 10px 5px;
    }

    .right-sidebar {
        right: 10px;
        bottom: 50px;
    }

    .sidebar-item {
        width: 50px;
        height: 50px;
    }
}