﻿/* HEX-S Coffee B2B Portal Styles */

:root {
    --primary-color: #13294b;
    --secondary-color: #2d3748;
    --accent-color: #4a5568;
    --gold: #c9a76c;
    --dark-bg: #1a1a1a;
    --light-bg: #f7fafc;
}

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    background: transparent;
    position: relative;
}

/* Top Navigation */
.top-nav {
    background: var(--primary-color) !important;
    padding: 10px 0;
    position: relative;
    z-index: 9999;
}

.top-nav .container {
    position: relative;
    z-index: 9999;
}

.top-nav .navbar-brand {
    height: 50px;
}

.top-nav .navbar-brand img {
    height: 100%;
    width: auto;
}

.top-nav .nav-left {
    flex: 0 0 auto;
}

.top-nav .nav-right {
    flex: 1;
    justify-content: flex-end;
    padding-left: 100px;
}

.top-nav .nav-link {
    color: #fff !important;
    padding: 8px 18px !important;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.top-nav .nav-link:hover,
.top-nav .nav-item.active .nav-link {
    color: var(--gold) !important;
}

.navbar-contact {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.navbar-contact i {
    margin-right: 4px;
    color: var(--gold);
}

/* 水印图片 - 使用img标签 */
.watermark-img {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    z-index: 1;
    background-image: url('../../images/hero-bg.jpg');
    background-position: center bottom;
    background-size: 100% auto;
    background-repeat: no-repeat;
}

/* Video Container - 全屏 */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Video - 靠右，高度填满，宽度自适应 */
.hero-video {
    position: absolute;
    top: 0;
    right: 0;
    height: 600px;
    width: auto;
    max-width: none;
    object-fit: contain;
    z-index: -1;
}

/* 手机端视频尺寸调整 */
@media (max-width: 768px) {
    .hero-video {
        height: 200px !important;
        width: auto !important;
        top: auto !important;
        bottom: 80px !important;
        right: 0 !important;
        left: auto !important;
        /* 隐藏视频控制条 */
        pointer-events: none;
    }
}

/* 全局隐藏视频控件 */
.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-play-button,
.hero-video::-webkit-media-controls-volume-slider,
.hero-video::-webkit-media-controls-mute-button,
.hero-video::-webkit-media-controls-timeline,
.hero-video::-webkit-media-controls-current-time-display,
.hero-video::-webkit-media-controls-time-remaining-display,
.hero-video::-webkit-media-controls-timeline-container,
.hero-video::-webkit-media-controls-seek-back-button,
.hero-video::-webkit-media-controls-seek-forward-button,
.hero-video::-webkit-media-controls-fullscreen-button,
.hero-video::-webkit-media-controls-rewind-button,
.hero-video::-webkit-media-controls-return-to-realtime-button,
.hero-video::-webkit-media-controls-toggle-closed-captions-button,
.hero-video::-webkit-media-controls-enclosure {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 透明遮罩阻止视频交互 */
.video-blocker {
    position: absolute;
    top: 0;
    right: 0;
    height: 600px;
    width: 600px;
    z-index: 1;
    background: transparent;
}

/* 手机端遮罩 */
@media (max-width: 768px) {
    .video-blocker {
        height: 200px;
        width: 200px;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(19, 41, 75, 0.85) 0%, 
        rgba(19, 41, 75, 0.85) calc(100% - 595px), 
        rgba(19, 41, 75, 0) calc(100% - 575px));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 110px 0 80px;
    width: 100%;
}

/* 手机端下拉菜单层级 */
@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        width: auto !important;
        min-width: 220px !important;
        background: var(--primary-color) !important;
        padding: 15px !important;
        border-radius: 0 0 8px 8px !important;
        z-index: 99999 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-nav {
        text-align: right !important;
    }
    
    .nav-item {
        text-align: right !important;
    }
    
    .nav-link {
        padding: 10px 15px !important;
    }
}

/* 确保视频不会覆盖导航 - 针对MIUI/Chrome移动端 */
.hero-video-container,
.hero-video {
    -webkit-transform: translateZ(-1px);
    transform: translateZ(-1px);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 针对Android WebView和MIUI浏览器的特殊处理 */
@supports (-webkit-touch-callout: none) or (-webkit-tap-highlight-color: rgba(0,0,0,0)) {
    .hero-video-container {
        z-index: -10 !important;
    }
    
    .hero-video {
        z-index: -10 !important;
        opacity: 0.99;
    }
}

/* 手机端GIF背景 - 全屏宽度 */
.hero-gif-container {
    position: relative;
    width: 100%;
    height: auto;
    z-index: 0;
    line-height: 0;
}

.hero-gif {
    width: 100%;
    height: auto;
    display: block;
}

.hero-gif-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 2;
}

/* 手机端调整 */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* 隐藏桌面端的遮罩 */
    .hero-overlay {
        display: none !important;
    }
    
    /* 文字放在图片下方 */
    .hero-content {
        position: relative !important;
        padding: 30px 20px !important;
        background: var(--primary-color);
        z-index: 2;
    }
    
    .hero-title {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
        color: #fff !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
        color: rgba(255,255,255,0.8) !important;
    }
}

/* MIUI浏览器和Android Chrome视频层级修复 */
@media (max-width: 991px) {
    /* 强制下拉菜单在最上层 */
    .navbar-collapse,
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        position: absolute !important;
        z-index: 2147483647 !important;
        background: var(--primary-color) !important;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 30px;
}

.hero-buttons .btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--primary-color);
    font-weight: 600;
    padding: 12px 30px;
}

.hero-buttons .btn-primary:hover {
    background: #b8956a;
    border-color: #b8956a;
    color: var(--primary-color);
}

.hero-buttons .btn-outline-light {
    border: 2px solid #fff;
    padding: 12px 30px;
}

.hero-buttons .btn-outline-light:hover {
    background: #fff;
    color: var(--primary-color);
}

.hero-image-placeholder {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section Styles */
.section-padding {
    padding: 80px 0;
    position: relative;
    z-index: 1;
    background-color: #fff;
}

.section-tag {
    display: inline-block;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-desc {
    color: #718096;
    font-size: 1.1rem;
}

.section-text {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

.section-header {
    margin-bottom: 50px;
}

/* Stat Items */
.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    padding: 20px;
}

.product-sku {
    color: #a0aec0;
    font-size: 0.85rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 5px 0 10px;
}

.product-specs {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* News Card */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.news-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-content {
    padding: 20px;
}

.news-date {
    color: #a0aec0;
    font-size: 0.85rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 10px 0;
}

.news-excerpt {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.news-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.news-link:hover {
    color: var(--gold);
    text-decoration: none;
}

/* Contact Section */
.contact-info {
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-item h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.contact-item p {
    color: #718096;
    margin: 0;
    font-size: 0.95rem;
}

.contact-form {
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-form .form-control {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: #fff;
    position: relative;
    z-index: 2;
}

.footer-brand {
    min-height: 70px;
    display: flex;
    align-items: center;
}

.footer-brand img {
    width: auto;
    max-width: 100%;
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-top h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--gold);
    margin-right: 10px;
    width: 16px;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--gold);
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1a3a6a;
    border-color: #1a3a6a;
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.btn-outline-light {
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--primary-color);
}

.btn-outline-secondary {
    color: #718096;
    border-color: #e2e8f0;
}

.btn-outline-secondary:hover {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    padding: 60px 0;
}

/* Nav Tabs */
.nav-tabs {
    border-bottom: none;
    background: var(--light-bg);
    border-radius: 12px 12px 0 0;
    padding: 10px 10px 0;
}

.nav-tabs .nav-link {
    border: none;
    color: #718096;
    padding: 15px 25px;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: #fff;
    border: none;
    border-bottom: 3px solid var(--gold);
}

.tab-content {
    background: #fff;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tab-pane {
    padding: 30px;
}

/* FAQ */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    background: var(--light-bg);
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.faq-question:hover {
    background: #edf2f7;
}

.faq-answer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Table */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--light-bg);
}

.table th {
    font-weight: 600;
    color: #2d3748;
}

/* Contact Strip */
.contact-strip h3 {
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #718096;
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-section {
        min-height: auto;
    }
}

/* Mobile Dropdown Menu - Separate and Right Aligned */
@media (max-width: 991px) {
    /* 导航栏折叠菜单单独显示 */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 280px;
        max-width: 80vw;
        background: var(--primary-color);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        padding: 10px 0;
        margin-top: 0;
        z-index: 1000;
    }
    
    /* 导航项样式 */
    .navbar-collapse .navbar-nav {
        padding: 0;
        margin: 0;
    }
    
    .navbar-collapse .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-collapse .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse .nav-link {
        padding: 12px 20px !important;
        text-align: right;
        color: #fff !important;
        transition: background 0.3s;
    }
    
    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-item.active .nav-link {
        background: rgba(255,255,255,0.1);
        color: var(--gold) !important;
    }
    
    /* 汉堡按钮样式优化 */
    .navbar-toggler {
        border: none;
        padding: 8px 12px;
        margin-left: auto;
    }
    
    .navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* 容器定位 */
    .top-nav .container {
        position: relative;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .navbar-contact {
        display: none !important;
    }
    
    .hero-content {
        padding: 60px 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Utility */
.text-white-50 {
    color: rgba(255,255,255,0.5) !important;
}
