/* PakFactory Custom Styles */

:root {
    --primary: #0d6efd;
    --dark: #1a1a2e;
    --warning: #ffc107;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}
.dropdown-mega {
    width: 600px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border-radius: 16px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.hero-image-placeholder {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
}
.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important;
}

/* Cart badge */
.cart-count {
    font-size: 0.65rem;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: rgba(13,110,253,0.05);
    color: var(--primary);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}
.btn-lg {
    border-radius: 12px;
}

/* Blog Content */
.blog-content h2 { margin-top: 2rem; font-weight: 700; }
.blog-content h3 { margin-top: 1.5rem; font-weight: 600; }
.blog-content p { line-height: 1.8; margin-bottom: 1rem; }
.blog-content ul, .blog-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.blog-content img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }

/* Footer */
footer a:hover {
    color: #fff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section { min-height: auto; padding: 3rem 0; }
    .hero-section h1 { font-size: 2rem; }
    .dropdown-mega { width: 100%; }
}

/* Min height utility */
.min-vh-80 { min-height: 80vh; }

/* Generic inline icon action buttons — used across table row-actions (Edit/Delete/View).
   One line, 10px gap, distinct semantics, destructive hover fills red. (2026-08-27) */
.pf-ico-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    line-height: 1;
    border-radius: 6px;
}
.pf-ico-btn + .pf-ico-btn { margin-left: 8px; }
.pf-ico-btn .bi { font-size: .95rem; }
.pf-ico-btn.btn-outline-danger:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

/* Quote cart table column widths — keep non-Process columns on one line (2026-08-26) */
.pf-qctable th,
.pf-qctable td {
    vertical-align: middle;
}
.pf-qctable .pf-qc-check    { width: 36px; }
.pf-qctable .pf-qc-product  { min-width: 160px; white-space: nowrap; }
.pf-qctable .pf-qc-style    { min-width: 90px;  white-space: nowrap; }
.pf-qctable .pf-qc-size     { min-width: 140px; white-space: nowrap; }
.pf-qctable .pf-qc-material { min-width: 140px; white-space: nowrap; }
.pf-qctable .pf-qc-process  { min-width: 220px; }   /* chips wrap — keep available space for them */
.pf-qctable .pf-qc-qty      { width: 110px; }
.pf-qctable .pf-qc-qty .qty { width: 80px; }
.pf-qctable .pf-qc-notes    { min-width: 180px; }
.pf-qctable .pf-qc-notes .notes { min-width: 160px; }
.pf-qctable .pf-qc-action   { width: 96px; text-align: center; white-space: nowrap; }
.pf-qctable .pf-qc-action .d-flex { width: 100%; justify-content: center; gap: 10px; }
.pf-qctable .pf-qc-action .btn {
    padding: 6px 12px;
    line-height: 1;
}
/* Edit/Remove icon buttons on one line, clear gap + distinct semantics (2026-08-26) */
.pf-qctable .pf-qc-action .btn.edit,
.pf-qctable .pf-qc-action .btn.remove { border-radius: 6px; }
.pf-qctable .pf-qc-action .btn.remove:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

/* Process chips — used in quote cart / quote line items (2026-08-26) */
.pf-process-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pf-process-chip {
    display: inline-block;
    background: #f0f3f5;
    color: #333;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1;
    padding: 5px 10px;
    margin: 2px 4px 2px 0;
    border-radius: 20px;
    white-space: nowrap;
}
.pf-process-chip:hover {
    background: #00b894;
    color: #fff;
}

/* ============================================================
   工序展示样式（_ProcessDisplay，只读 chip，无交互）
   (2026-08-27) 所有环节（cart/quote/myquotes/myorders/admin）统一使用。
   ============================================================ */
.pf-proc-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.pf-proc-tag {
    display: inline-block;
    background: #eef2f7;
    color: #3a4656;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ============================================================
   Item 配置明细统一展示（_ItemConfigSummary）
   grid 自动对齐：label muted、冒号对齐、内容正常色
   (2026-08-27) 所有环节一致
   ============================================================ */
.pf-item-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    align-items: baseline;
    font-size: .9rem;
}
.pf-item-row {
    display: contents;
}
.pf-item-label {
    color: #6c7894;
    white-space: nowrap;
}
.pf-item-value {
    color: #1f2733;
    word-break: break-word;
}

/* ============================================================
   Global container width — progressive widening for large screens
   (2026-08-25) All front pages share Bootstrap .container.
   Only affects >=1200px; tablets/mobile keep Bootstrap defaults.
   Nav widths (.pf-site-nav/.pf-nav-utility) are covered in _Navbar.cshtml.
   ============================================================ */
@media (min-width: 1200px) {
    .container { max-width: 1320px; }
}
@media (min-width: 1600px) {
    .container { max-width: 1600px; }
}
@media (min-width: 1920px) {
    .container { max-width: 1920px; }
}

/* ============================================================
   Quote Item Configurator (shared)
   (2026-08-25) 产品详情页 + admin Quote/Order 弹窗共用。
   来自原 Products/Detail.cshtml 的 .pf-config-* 样式。
   ============================================================ */
:root {
    --pf-primary: #1a3a5c;
    --pf-accent: #00b894;
    --pf-dark: #16213e;
    --pf-light: #fafbfc;
}
.pf-config-card {
    background: var(--pf-light);
    border-radius: 10px;
    padding: 22px;
    border: 1px solid #e0e4ea;
}
.pf-config-label {
    font-size: .82rem;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
    display: block;
}
.pf-config-select-sm::-webkit-outer-spin-button,
.pf-config-select-sm::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-config-select-sm[type=number] { -moz-appearance: textfield; appearance: textfield; }
.pf-qty-hint { font-size: .78rem; color: #999; margin: -4px 0 10px; }
.pf-config-select-sm {
    max-width: 200px;
    padding: 8px 12px;
    border: 1px solid #d3d8e0;
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
    margin-bottom: 10px;
}
.pf-dim-row { display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pf-dim-row > div { flex: 1; min-width: 90px; }
.pf-dim-row .pf-config-select-sm { width: 100%; max-width: none; }
.pf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 6px; }
.pf-row-2 .pf-config-select-sm { width: 100%; max-width: none; }
.pf-process-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pf-process-chip {
    padding: 7px 16px;
    border: 1.5px solid #d3d8e0;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    color: #555;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pf-process-chip:hover { border-color: var(--pf-accent); color: var(--pf-accent); }
.pf-process-chip.selected {
    background: #fff;
    border-color: var(--pf-accent);
    color: var(--pf-accent);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,184,148,.18);
}
.pf-process-chip .pf-check { display: none; font-size: .8rem; }
.pf-process-chip.selected .pf-check { display: inline; }
.pf-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 12px;
    padding-top: 14px;
    border-top: 1px solid #dde2ea;
}
.pf-price-label { font-weight: 600; color: #333; }
.pf-btn-quote {
    background: var(--pf-accent);
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 6px;
    font-weight: 700;
    font-size: .95rem;
    width: 100%;
    cursor: pointer;
    transition: background .2s;
}
.pf-btn-quote:hover { background: #00a381; }

/* ===== 产品缩略图 + 悬停大图（交易流程 items 通用） ===== */
.pf-img-thumb {
    display: inline-block;
    position: relative;
    cursor: zoom-in;
}
.pf-thumb-img {
    display: block;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eef1f6;
}
.pf-img-zoom {
    position: fixed;
    z-index: 1085;
    display: none;
    pointer-events: none;
    width: 260px;
    max-width: 60vw;
    background: #fff;
    border: 1px solid #e0e5ec;
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0,0,0,.18);
    padding: 10px;
}
.pf-img-zoom .pf-zoom-img {
    width: 100%;
    height: 210px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}
.pf-zoom-name {
    display: block;
    font-size: .75rem;
    color: #666;
    margin-top: 8px;
    text-align: center;
    line-height: 1.3;
}
.pf-img-zoom.is-empty { display: none !important; }

/* 交易流程 item 明细里的 Product 链接：默认与正文同色，hover 明显变色 */
.pf-item-product-link {
    color: inherit;
    text-decoration: none;
}
.pf-item-product-link .bi {
    color: #8a93a2;
}
.pf-item-product-link:hover {
    color: var(--pf-accent);
    text-decoration: underline;
}
.pf-item-product-link:hover .bi {
    color: var(--pf-accent);
}
