/* Business77Key Theme - DuJiaoka Integration */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #374151 100%);
    --business-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --business-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 全局样式 */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1e293b;
    background-color: #f8fafc;
}

/* 顶部信息条 */
header {
    font-size: 0.875rem;
    border-bottom: 1px solid #374151;
}

header a:hover {
    color: #fbbf24 !important;
}

/* 导航栏 */
.navbar {
    box-shadow: var(--business-shadow);
    background: var(--gradient-primary) !important;
    border-bottom: 3px solid #1e40af;
}

.navbar-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.navbar-nav {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* 英雄区域 */
.hero-section {
    background: var(--gradient-dark);
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stats .stat-item h3 {
    font-weight: 700;
    font-size: 2rem;
}

.business-icons {
    position: relative;
    z-index: 2;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 999 !important;
    display: block !important;
    text-decoration: none !important;
}

/* 确保没有伪元素阻挡点击 */
.navbar-nav .nav-link::before,
.navbar-nav .nav-link::after {
    pointer-events: none !important;
}

/* 确保导航容器不会阻挡 */
.navbar-content,
.navbar-nav,
.nav-item {
    pointer-events: auto !important;
    z-index: inherit;
}

/* 新的导航链接样式 */
.navigation-link {
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
}

.navigation-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.navigation-link.nav-active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* 导航链接悬停效果 */
.navbar a.text-white:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* 服务卡片 */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--business-shadow);
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--business-shadow-lg);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-features {
    margin-top: 1rem;
    text-align: left;
}

/* 分类标题样式 */
.category-header h3 {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* 产品区域间距 */
#products {
    margin-top: 0.25rem;
}

#products + .row {
    margin-top: 0.25rem;
}

.category-header .badge {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 产品表格 */
.product-table {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--business-shadow);
    overflow: hidden;
}

.product-table thead th {
    background: var(--dark-color) !important;
    color: white;
    font-weight: 600;
    padding: 1rem 0.75rem;
    border: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #e2e8f0;
}

.product-table tbody tr:hover {
    background-color: #f1f5f9;
    transform: scale(1.01);
}

.product-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.product-name {
    color: #1e293b;
    font-weight: 500;
}

.price-tag {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* 通知内容样式 */
.notice-content {
    color: #374151;
    line-height: 1.8;
}

.notice-content h1, .notice-content h2, .notice-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.notice-content p {
    margin-bottom: 1rem;
}

.notice-content ul, .notice-content ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.notice-content a {
    color: var(--info-color);
    text-decoration: none;
}

.notice-content a:hover {
    text-decoration: underline;
}

/* 购买页面样式 */
.page-title-box {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--business-shadow);
}

.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #64748b;
}

.product-info {
    border: 2px solid #e2e8f0;
}

.price-display h3 {
    margin-bottom: 0;
}

.buy-price {
    color: var(--primary-color);
}

/* 支付方式样式 */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(30, 58, 138, 0.05);
}

.payment-option.active {
    border-color: var(--primary-color);
    background-color: rgba(30, 58, 138, 0.1);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.payment-icon {
    margin-right: 0.75rem;
}

.payment-name {
    font-weight: 500;
    color: #374151;
}

/* 订单查询页面样式 */
.tips-content .tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tips-content .tip-item i {
    margin-top: 0.25rem;
}

.quick-history-item {
    transition: all 0.3s ease;
}

.quick-history-item:hover {
    background-color: rgba(30, 58, 138, 0.05);
}

.quick-history-item:last-child {
    border-bottom: none !important;
}

/* 联系方式tooltip样式 */
.contact-item {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 订单详情页面样式 */
.product-info-container {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.product-content {
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.help-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.help-item i {
    margin-top: 0.25rem;
}

/* 支付页面样式 */
.qr-code-wrapper {
    position: relative;
    display: inline-block;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.qr-image {
    max-width: 200px;
    height: auto;
}

.qr-placeholder {
    padding: 60px 20px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.payment-status .spinner-border {
    animation: spin 1s linear infinite;
}

/* Toast 容器样式 */
.toast-container {
    z-index: 1060;
}

.toast {
    min-width: 300px;
}

/* 卡片样式 */
.card {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--business-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--business-shadow-lg);
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border-bottom: none;
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: #92400e;
    font-weight: 600;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

/* 表单样式 */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}


.input-group-text {
    border: 2px solid #e2e8f0;
    background: var(--light-color);
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

/* 页脚 */
footer {
    background: var(--gradient-dark) !important;
    border-top: 1px solid #374151;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    /* 修复移动端游戏图标布局 */
    .hero-section .business-icons .row {
        margin: 0 -8px;
        justify-content: center;
    }
    
    .hero-section .business-icons .col-3 {
        padding: 0 8px;
        margin-bottom: 0.5rem;
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .hero-section .business-icons i {
        font-size: 1.2rem !important;
    }
    
    /* 移动端英雄区域内容布局优化 */
    .hero-content {
        padding-top: 1rem;
    }
    
    .hero-content .badge {
        margin-top: 0.5rem;
    }
    
    /* 移动端按钮居中和间距优化 */
    .hero-content .hero-stats {
        margin-bottom: 1.5rem !important;
    }
    
    .hero-content .d-flex {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem !important;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .hero-content .btn {
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }
    
    /* 移动端英雄区域整体调整 */
    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    /* 移动端英雄区域下方间距 */
    .hero-section + main {
        padding-top: 0.5rem;
    }
    
    /* 移动端导航优化 */
    .navbar-brand {
        font-size: 1rem;
        flex-shrink: 0;
        max-width: 55%;
        min-width: 0; /* 允许缩小 */
    }
    
    .navbar-nav .nav-item {
        margin: 0 0.25rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* 移动端隐藏企业级服务优势 */
    .service-advantages {
        display: none;
    }
    
    /* 移动端产品区域间距优化 */
    #products + .row {
        margin-top: 0.5rem;
    }
    
    .row.category {
        margin-bottom: 1rem;
    }
    
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .product-table {
        font-size: 0.875rem;
    }
    
    .product-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .payment-option {
        padding: 0.75rem;
    }
    
    .phone {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    /* 小屏幕增加更多间距 */
    .hero-section + main {
        padding-top: 0.75rem;
    }
    
    /* 小屏幕进一步优化导航 */
    .navbar-brand {
        font-size: 0.85rem;
        max-width: 50%;
        min-width: 0;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
    
    .navbar-nav .nav-item {
        margin: 0 0.1rem;
    }
    
    /* 超小屏幕时隐藏图标，只显示文字 */
    .navbar-nav .nav-link i {
        display: none;
    }
    
    /* 小屏设备进一步优化游戏图标 */
    .hero-section .business-icons .col-3 {
        flex: 0 0 22%;
        max-width: 22%;
        padding: 0 4px;
    }
    
    .hero-section .business-icons i {
        font-size: 1rem !important;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .product-content {
        font-size: 0.75rem;
        max-height: 200px;
    }
}

/* 加载动画 */
.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* 模态框样式增强 */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--business-shadow-lg);
}

.modal-header {
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .navbar-brand {
        font-size: 0.8rem;
        max-width: 45%;
        min-width: 0;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.7rem;
        padding: 0.3rem 0.4rem;
    }
    
    /* 进一步简化导航文字 */
    .navbar-nav .nav-link:first-child::after {
        content: "首页";
    }
    
    .navbar-nav .nav-link:last-child::after {
        content: "查询";
    }
    
    .navbar-nav .nav-link {
        text-indent: -9999px;
        position: relative;
    }
    
    .navbar-nav .nav-link::after {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    .navbar, .footer, .btn, .card-footer, .page-title-box {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
    }
}
/* Key Cartridge preview skin, layered over the stable Business77Key layout. */
:root {
    --kc-ink: #0b1020;
    --kc-paper: #fff5d6;
    --kc-red: #ff3448;
    --kc-yellow: #ffd32a;
    --kc-cyan: #2ef3ff;
    --kc-muted: #6b7280;
}

body {
    color: var(--kc-ink);
    background:
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(180deg, #121a33, #202d52 58%, #101829) !important;
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

.navbar,
.header-section,
.top-header {
    background: rgba(7, 11, 24, .94) !important;
    border-bottom: 4px solid var(--kc-ink);
    box-shadow: 0 8px 0 rgba(0,0,0,.24);
}

.navbar-brand,
.navbar .nav-link,
.header-section a,
.top-header a {
    color: #fffaf0 !important;
    font-weight: 900;
}

.navbar-brand:before {
    content: "KEY";
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border: 3px solid var(--kc-ink);
    border-radius: 6px;
    color: var(--kc-ink);
    background: linear-gradient(135deg, var(--kc-red) 0 42%, var(--kc-paper) 42% 70%, var(--kc-yellow) 70%);
    box-shadow: 4px 4px 0 #000;
    font-size: 14px;
    font-weight: 1000;
}

.hero-section,
.banner-section,
.page-header,
.product-header {
    border: 5px solid var(--kc-ink) !important;
    border-radius: 0 !important;
    color: var(--kc-ink) !important;
    background:
        linear-gradient(135deg, var(--kc-red) 0 26%, transparent 26%),
        linear-gradient(135deg, transparent 0 72%, var(--kc-yellow) 72%),
        var(--kc-paper) !important;
    box-shadow: 10px 10px 0 rgba(0,0,0,.65) !important;
}

.hero-section h1,
.hero-section h2,
.page-header h1,
.product-header h1,
.section-title,
.card-title {
    color: var(--kc-ink) !important;
    font-weight: 1000 !important;
    letter-spacing: 0 !important;
}

.card,
.product-card,
.category-card,
.table-responsive,
.order-card,
.payment-card,
.info-card,
.search-card,
.alert,
.modal-content {
    border: 4px solid var(--kc-ink) !important;
    border-radius: 0 !important;
    background: #fffaf0 !important;
    box-shadow: 7px 7px 0 rgba(0,0,0,.72) !important;
}

.card-header,
.table thead th,
.modal-header {
    border-bottom: 4px solid var(--kc-ink) !important;
    color: var(--kc-ink) !important;
    background: var(--kc-yellow) !important;
    font-weight: 1000 !important;
}

.btn,
.btn-primary,
.btn-outline-primary,
.btn-success,
.btn-warning,
.btn-danger,
.payment-option,
.badge {
    border-radius: 0 !important;
    font-weight: 900 !important;
}

.btn-primary,
.btn-success {
    border: 3px solid var(--kc-ink) !important;
    color: #fff !important;
    background: var(--kc-red) !important;
    box-shadow: 4px 4px 0 var(--kc-ink) !important;
}

.btn-outline-primary,
.btn-warning {
    border: 3px solid var(--kc-ink) !important;
    color: var(--kc-ink) !important;
    background: var(--kc-yellow) !important;
    box-shadow: 4px 4px 0 var(--kc-ink) !important;
}

.btn:hover,
.payment-option:hover {
    transform: translate(-1px, -1px);
}

.form-control,
.form-select,
.input-group-text {
    border: 3px solid var(--kc-ink) !important;
    border-radius: 0 !important;
    color: var(--kc-ink) !important;
    background: #fffdf5 !important;
}

.payment-option {
    border: 3px solid var(--kc-ink) !important;
    background: #fffdf5 !important;
    box-shadow: 4px 4px 0 rgba(0,0,0,.65) !important;
}

.payment-option.active {
    color: var(--kc-ink) !important;
    background: var(--kc-cyan) !important;
}

.price-tag,
.buy-price,
.price,
.text-primary {
    color: var(--kc-red) !important;
    font-weight: 1000 !important;
}

.table,
.table td,
.table th {
    color: var(--kc-ink) !important;
}

.footer,
.site-footer {
    border-top: 5px solid var(--kc-ink);
    color: #fffaf0 !important;
    background: #0b1020 !important;
}

.footer a,
.site-footer a {
    color: var(--kc-cyan) !important;
}

/* Mobile retro cartridge tuning */
@media (max-width: 575.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    header.bg-dark small {
        font-size: .72rem;
        line-height: 1.35;
        white-space: nowrap;
    }

    .navbar .container > .d-flex {
        gap: .45rem;
    }

    .navbar-brand {
        min-width: 0;
        max-width: 9.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .92rem !important;
    }

    .navbar .container > .d-flex > .d-flex {
        flex: 0 0 auto;
        gap: .1rem;
    }

    .navbar .container > .d-flex > .d-flex a {
        padding: .35rem .25rem !important;
        font-size: .86rem;
        white-space: nowrap;
    }

    .navbar .container > .d-flex > .d-flex a:first-child {
        margin-right: .25rem !important;
    }

    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 1.5rem !important;
        border-width: 4px !important;
    }

    .hero-section .container {
        width: 100%;
        max-width: none;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-content h1 {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        color: var(--kc-ink) !important;
        font-size: clamp(2rem, 8.6vw, 2.55rem) !important;
        line-height: 1.08 !important;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .hero-content .lead {
        display: block;
        margin-left: auto;
        margin-right: auto;
        padding: .75rem .8rem;
        max-width: 22rem;
        border: 3px solid var(--kc-ink);
        color: var(--kc-ink) !important;
        background: rgba(255, 247, 207, .9);
        box-shadow: 4px 4px 0 rgba(10, 15, 32, .85);
        font-size: .94rem;
        line-height: 1.7;
    }

    .hero-stats {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero-stats > [class*="col-"] {
        width: auto !important;
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .stat-item {
        min-width: 0;
        padding: .45rem .25rem;
        border: 2px solid rgba(10, 15, 32, .45);
        background: rgba(255, 247, 207, .72);
    }

    .stat-item h3 {
        margin-bottom: .15rem;
        font-size: clamp(1.25rem, 6.3vw, 1.75rem) !important;
        line-height: 1;
        white-space: nowrap;
    }

    .stat-item p {
        margin-bottom: 0;
        color: var(--kc-ink) !important;
        font-size: .7rem;
        white-space: nowrap;
    }

    .hero-content .d-flex.gap-3 {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: .65rem !important;
        width: min(100%, 17rem);
        margin: 0 auto;
    }

    .hero-content .btn {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
    }

    .hero-image {
        display: none;
    }

    .category-header h3,
    .category-header h3 small {
        color: #fffaf0 !important;
    }

    .category-header h3 small {
        display: block;
        margin-top: .45rem;
        color: var(--kc-yellow) !important;
        font-size: .9rem;
    }
}

/* Mobile overflow patch */
@media (max-width: 575.98px) {
    body {
        width: 100vw;
    }

    .navbar-brand {
        max-width: 7.2rem;
    }

    .hero-section {
        overflow: hidden;
    }

    .hero-section *,
    .hero-section *::before,
    .hero-section *::after {
        box-sizing: border-box;
    }

    .hero-content h1 {
        width: min(100%, 17.25rem) !important;
        font-size: 1.66rem !important;
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .hero-content .lead {
        width: min(100%, 18.5rem);
        font-size: .88rem;
    }

    .hero-stats {
        width: min(100%, 20.5rem) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: .35rem;
    }

    .stat-item {
        padding: .42rem .12rem;
    }

    .stat-item h3 {
        font-size: 1.22rem !important;
    }

    .stat-item p {
        font-size: .66rem;
        letter-spacing: 0;
    }
}

/* Mobile nav priority */
@media (max-width: 575.98px) {
    .navbar .container > .d-flex > .d-flex a:first-child {
        display: none !important;
    }

    .navbar .container > .d-flex > .d-flex a:last-child {
        display: inline-flex !important;
        align-items: center;
        padding: .42rem .35rem !important;
    }
}

/* Mobile navbar grid fix */
@media (max-width: 575.98px) {
    .navbar,
    .navbar .container {
        overflow: hidden;
    }

    .navbar .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .navbar .container > .d-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .5rem;
        width: 100% !important;
    }

    .navbar .container > .d-flex > .d-flex {
        display: flex !important;
        justify-content: flex-end;
        min-width: 0;
    }

    .navbar .container > .d-flex > .d-flex a:last-child {
        color: #fff !important;
        font-size: .84rem;
        white-space: nowrap;
    }
}

/* Mobile absolute order link */
@media (max-width: 575.98px) {
    .navbar {
        position: relative;
    }

    .navbar .container > .d-flex > .d-flex a:last-child {
        position: absolute !important;
        right: .75rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        background: transparent;
    }

    .navbar-brand {
        max-width: calc(100vw - 10.5rem);
    }
}

/* Mobile viewport clamp */
@media (max-width: 575.98px) {
    html,
    body,
    .navbar,
    .hero-section {
        max-width: 100vw !important;
    }

    .navbar {
        width: 100vw !important;
        left: 0;
        right: auto;
    }
}

/* Mobile direct order query anchor */
@media (max-width: 575.98px) {
    .navbar a[href$="/find-order"],
    .navbar a[href*="/find-order"] {
        display: inline-flex !important;
        position: fixed !important;
        top: 66px;
        right: 12px;
        z-index: 9999;
        align-items: center;
        color: #fff !important;
        font-size: .84rem;
        white-space: nowrap;
    }
}
