:root{
  --up-blue:#0D4C86;--up-blue-dark:#083660;--up-blue-light:#E8F0F8;
  --up-gray:#5B6770;--up-bg:#F5F7FA;--up-text:#222;--up-muted:#6c757d;
  --bs-primary:#0D4C86;--bs-primary-rgb:13,76,134;--bs-link-color:#0D4C86;--bs-link-hover-color:#083660;
  --bs-font-sans-serif:"Noto Sans TC","Microsoft JhengHei","微軟正黑體","PingFang TC",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
body{background:var(--up-bg);color:var(--up-text);}
a{text-decoration:none}
a:hover{text-decoration:underline}
.btn-primary{--bs-btn-bg:#0D4C86;--bs-btn-border-color:#0D4C86;--bs-btn-hover-bg:#083660;--bs-btn-hover-border-color:#083660;--bs-btn-active-bg:#083660}
.btn-outline-primary{--bs-btn-color:#0D4C86;--bs-btn-border-color:#0D4C86;--bs-btn-hover-bg:#0D4C86;--bs-btn-hover-border-color:#0D4C86;--bs-btn-active-bg:#0D4C86}
.text-primary{color:#0D4C86!important}
.bg-primary{background:#0D4C86!important}

/* notice */
.site-notice{background:#FFF4D6;color:#7a4b00;font-size:.9rem;padding:.4rem 0;border-bottom:1px solid #f3dca0}

/* header */
.site-header{background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.08)}
.site-header .navbar-brand img{max-width:min(60vw,320px);height:auto}
.search-form{display:flex;gap:.25rem;min-width:260px}
.search-form .form-control{border-radius:20px 0 0 20px}
.search-form .btn{border-radius:0 20px 20px 0}
.cart-badge{position:absolute;top:-6px;right:-6px;font-size:.65rem}
.brand-bar{background:var(--up-blue);}
.brand-nav .nav-link{color:#fff;font-weight:600;padding:.6rem .9rem;display:flex;align-items:center;gap:.4rem}
.brand-nav .nav-link small{font-weight:400;opacity:.85}
.brand-nav .nav-link:hover,.brand-nav .nav-link.show{background:rgba(255,255,255,.12)}
.brand-nav .dot,.accordion-button .dot{display:inline-block;width:.7rem;height:.7rem;border-radius:50%;background:var(--g,#fff);border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.1)}
.brand-nav .dropdown-menu{border-radius:0 0 .5rem .5rem;border-top:3px solid var(--up-blue)}
.mobile-links li{padding:.5rem 0;border-bottom:1px solid #eee}
.offcanvas .list-group-item a{display:block;color:var(--up-text)}

/* hero */
.hero{position:relative;background:#111;overflow:hidden;border-radius:0 0 1rem 1rem}
.hero img{width:100%;height:auto;display:block;max-height:520px;object-fit:cover;object-position:center}
.hero-carousel .carousel-indicators [data-bs-target]{width:10px;height:10px;border-radius:50%}
@media (max-width:575px){.hero img{min-height:160px}}

/* sections */
.section-title{display:flex;align-items:center;gap:.6rem;margin:0 0 1rem;font-size:1.25rem;font-weight:700;color:var(--up-blue)}
.section-title::after{content:"";flex:1;height:2px;background:linear-gradient(90deg,var(--up-blue),transparent)}
.group-card{background:#fff;border-radius:.75rem;padding:1rem 1.25rem;height:100%;border-top:5px solid var(--g);box-shadow:0 2px 8px rgba(0,0,0,.05)}
.group-card h3{font-size:1.2rem;font-weight:800;margin:0;color:var(--g)}
.group-card h3 small{font-size:.85rem;color:var(--up-muted);font-weight:400;margin-left:.3rem}
.cat-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.75rem}
.cat-chips a{display:inline-block;padding:.3rem .75rem;border-radius:999px;background:var(--up-bg);color:var(--up-text);font-size:.9rem;border:1px solid #e3e6ea}
.cat-chips a:hover{background:var(--g);color:#fff;border-color:var(--g);text-decoration:none}

/* product grid */
.product-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1rem}
@media (max-width:1199px){.product-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media (max-width:991px){.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:767px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}}
@media (max-width:575px){.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}}
.product-card{background:#fff;border-radius:.6rem;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.06);display:flex;flex-direction:column;transition:transform .15s,box-shadow .15s;position:relative}
.product-card:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.1)}
.product-card .thumb{display:block;aspect-ratio:1/1;background:#fff;overflow:hidden}
.product-card .thumb img{width:100%;height:100%;object-fit:contain;padding:.4rem}
.product-card .body{padding:.6rem .7rem .7rem;display:flex;flex-direction:column;gap:.25rem;flex:1}
.product-card .name{font-size:.92rem;font-weight:600;line-height:1.3;color:var(--up-text);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.4em}
.product-card .sku{font-size:.78rem;color:var(--up-muted)}
.product-card .price{font-size:.95rem;margin-top:auto}
.product-card .price .retail{color:var(--up-muted);font-size:.8rem}
.product-card .price .wholesale{color:#c0392b;font-weight:700}
.product-card .badge-new{position:absolute;top:.5rem;left:.5rem;background:#e74c3c;color:#fff;font-size:.7rem;padding:.15rem .45rem;border-radius:3px;z-index:1}
.product-card .badge-out{position:absolute;top:.5rem;right:.5rem;background:#555;color:#fff;font-size:.7rem;padding:.15rem .45rem;border-radius:3px;z-index:1}
.buy-row{display:flex;gap:.3rem;align-items:center;margin-top:.4rem}
.buy-row .form-select{width:auto;min-width:64px;padding:.2rem 1.6rem .2rem .5rem;font-size:.85rem}
.buy-row .btn{padding:.25rem .6rem;font-size:.85rem;flex:1}
.sub-title{font-size:1.05rem;font-weight:700;color:var(--up-blue);border-left:4px solid var(--up-blue);padding-left:.6rem;margin:1.5rem 0 .8rem}

/* product detail */
.detail-img{background:#fff;border-radius:.75rem;padding:1rem;cursor:zoom-in}
.detail-img img{width:100%;height:auto;max-height:520px;object-fit:contain}
.price-box{background:#fff;border-radius:.75rem;padding:1.25rem}
.price-box .wholesale{font-size:1.6rem;color:#c0392b;font-weight:800}

/* tables & cards */
.card-soft{background:#fff;border-radius:.75rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.cart-table img{width:64px;height:64px;object-fit:contain;background:#fff;border:1px solid #eee;border-radius:.4rem}
.qty-input{width:80px}

/* stores */
.store-tabs .nav-link{font-weight:600}
.store-tabs .nav-link.active{background:var(--up-blue);color:#fff}
.store-type{display:inline-block;width:1.5rem;height:1.5rem;line-height:1.5rem;text-align:center;border-radius:4px;color:#fff;font-size:.75rem;font-weight:700}
.store-type.G{background:#5B6770}.store-type.S{background:#0D4C86}

/* footer */
.site-footer{background:var(--up-blue-dark);color:#d9e4ef}
.site-footer a{color:#fff}
.site-footer h6{color:#fff;font-weight:700}
.footer-logo{background:#fff;padding:4px 8px;border-radius:4px}
.footer-bottom{border-top:1px solid rgba(255,255,255,.15);color:#a9bccf}

/* login */
.auth-card{max-width:420px;margin:2rem auto}

/* misc */
.news-item{padding:.75rem 0;border-bottom:1px solid #eee}
.news-item .date{color:var(--up-muted);font-size:.85rem;min-width:6.5rem}
.rich{line-height:1.8}.rich img{max-width:100%;height:auto}
.breadcrumb-item+.breadcrumb-item::before{content:"›"}
#imgModal .modal-content{box-shadow:none}
