/*
 * TW Shop: OpenCart 3.8 / default theme
 * Scope: global header/nav, product cards, product detail. Original core CSS is retained.
 * UI does not make shipping, medical or efficacy promises.
 */
:root { --tw-ink:#153453; --tw-deep:#0d315b; --tw-blue:#15518d; --tw-orange:#f28b23; --tw-orange-dark:#db6c0d; --tw-muted:#657789; --tw-line:#e6ecf2; --tw-surface:#f6f9fc; --tw-radius:16px; }
body { background:#f7f9fc; color:var(--tw-ink); font-family:-apple-system,BlinkMacSystemFont,"Noto Sans TC","Microsoft JhengHei","PingFang TC",Arial,sans-serif; }
body #top { background:#0d315b; border-bottom:0; }
body #top, body #top a, body #top span { color:#edf4ff; }
body #top a:hover { color:#fff; }
body header { background:#fff; padding:22px 0; border-bottom:1px solid #edf1f5; }
body header #logo img { max-height:74px; object-fit:contain; }
body #menu.navbar { background:#16518c; border:0; border-radius:0; box-shadow:0 8px 20px rgba(20,59,99,.08); }
body #menu .navbar-nav>li>a { color:#fff; font-weight:700; letter-spacing:.02em; }
body #menu .navbar-nav>li>a:hover, body #menu .navbar-nav>li.open>a { background:#0c3c70; }
body .breadcrumb { background:transparent; padding:15px 0 17px; color:var(--tw-muted); }
body .breadcrumb a { color:#57728b; }
body #content>h2, body .widget-title { color:var(--tw-deep); font-weight:800; letter-spacing:.015em; }
body .btn-primary { background:#17528e; border-color:#17528e; }
body .btn-primary:hover { background:#0d3967; border-color:#0d3967; }

/* Shared product card: featured, latest, category, search, specials, related */
body .product-layout { margin-bottom:24px; }
body .product-thumb.tw-product-card { display:flex; flex-direction:column; height:100%; min-height:410px; overflow:hidden; border:1px solid var(--tw-line); background:#fff; border-radius:var(--tw-radius); box-shadow:0 9px 26px rgba(20,55,85,.045); transition:box-shadow .2s, transform .2s, border-color .2s; }
body .product-thumb.tw-product-card:hover { transform:translateY(-3px); box-shadow:0 16px 36px rgba(15,49,84,.11); border-color:#d5e2ee; }
body .tw-product-card .tw-product-image { position:relative; height:218px; min-height:218px; display:flex; align-items:center; justify-content:center; padding:19px; overflow:hidden; background:linear-gradient(145deg,#f9fcff,#eef4fa); border-radius:16px 16px 0 0; }
body .tw-product-card .tw-product-image>a { display:flex; width:100%; height:100%; align-items:center; justify-content:center; }
body .tw-product-card .tw-product-image>a img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; margin:0 auto; transition:transform .25s; }
body .tw-product-card:hover .tw-product-image>a img { transform:scale(1.035); }
body .tw-product-card .tw-product-image .button-group { display:none; }
body .tw-product-card .tw-special-tag { position:absolute; z-index:2; left:13px; top:13px; padding:6px 10px; font-size:12px; font-weight:800; border-radius:8px; color:#b24f00; background:#fff1df; border:1px solid #ffd8a8; }
body .tw-product-card .tw-product-caption { display:flex; flex:1; flex-direction:column; min-height:0; padding:16px 16px 18px; border:0; text-align:left; }
body .tw-product-card .tw-product-caption .rating { min-height:20px; margin:0 0 6px; }
body .tw-product-card .product-name { min-height:44px; margin:0 0 8px; font-size:16px; font-weight:800; line-height:1.42; overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
body .tw-product-card .product-name a { color:var(--tw-deep); }
body .tw-product-card .product-name a:hover { color:var(--tw-blue); }
body .tw-product-card .product-description { color:#74869a; font-size:12px; line-height:1.6; max-height:40px; overflow:hidden; margin:0 0 10px; }
body .tw-product-card .price { margin:auto 0 13px; font-size:21px; line-height:1.2; font-weight:850; color:#d66d12; letter-spacing:-.015em; }
body .tw-product-card .price .price-new { color:#d66d12; font-weight:850; }
body .tw-product-card .price .price-old { font-size:12px; font-weight:500; color:#9ca8b4; }
body .tw-product-card .price-tax { font-size:11px; font-weight:400; color:#78899a; }
body .tw-card-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; width:100%; margin-top:auto; }
body .tw-action { display:flex; align-items:center; justify-content:center; gap:5px; height:42px; padding:0 6px; font-size:13px; font-weight:800; white-space:nowrap; border-radius:10px; text-decoration:none; border:1px solid #c9d9e9; box-shadow:none; cursor:pointer; transition:background .15s, transform .15s; }
body .tw-action:hover { text-decoration:none; transform:translateY(-1px); }
body .tw-action-cart { color:#17518a; background:#f4f9ff; }
body .tw-action-cart:hover { color:#0d3c70; background:#e5f1ff; }
body .tw-action-buy { color:#fff; background:linear-gradient(135deg,#fa9c31,#ed7915); border-color:#e97d18; box-shadow:0 4px 12px rgba(226,115,21,.18); }
body .tw-action-buy:hover, body .tw-action-buy:focus { color:#fff; background:linear-gradient(135deg,#ed8b22,#d86b0a); }
body .tw-action[disabled],body .tw-action[aria-busy="true"] { opacity:.6; cursor:wait; }

/* Product detail: keep all existing OpenCart option selectors and form names */
body #product-product #content { padding-bottom:32px; }
body #product-product #content>.row:first-of-type { margin:0 -15px 24px; }
body #product-product .tw-detail-gallery .elevate-zoom-preview { min-height:330px; display:flex; align-items:center; justify-content:center; border-radius:20px; background:linear-gradient(145deg,#fff,#f1f6fb); border:1px solid var(--tw-line); padding:20px; overflow:hidden; }
body #product-product .tw-detail-gallery .elevate-zoom-preview>a { display:block; width:100%; }
body #product-product .tw-detail-gallery .elevate-zoom-preview img { max-height:430px; max-width:100%; width:auto; margin:auto; object-fit:contain; }
body #product-product .tw-detail-gallery #product-thumbnail-gallery { display:flex; flex-wrap:wrap; gap:8px; padding:12px 0; margin:0; }
body #product-product .tw-detail-gallery #product-thumbnail-gallery>li { margin:0; padding:0; }
body #product-product .tw-detail-gallery #product-thumbnail-gallery a { border:1px solid var(--tw-line); border-radius:10px; overflow:hidden; }
body #product-product .tw-detail-panel { padding:8px 24px 20px; }
body #product-product .tw-eyebrow { display:inline-block; font-size:11px; font-weight:900; letter-spacing:.12em; color:#3875a8; margin-bottom:10px; }
body #product-product .tw-product-intro h1 { color:var(--tw-deep); font-weight:850; font-size:30px; line-height:1.34; margin:0 0 8px; }
body #product-product .tw-detail-subtitle { font-size:13px; color:#71869b; margin:0 0 17px; line-height:1.7; }
body #product-product .product-price-wrapper { background:#fff9f0; border:1px solid #ffe3c4; border-radius:14px; padding:17px 20px; margin:13px 0 17px; }
body #product-product .product-price-wrapper h2,body #product-product .product-price-wrapper .price-new { color:#d9680a; font-size:31px; font-weight:900; margin:0; }
body #product-product .product-price-wrapper .price-old { margin-left:9px; font-size:16px; color:#9b9b9b; }
body #product-product .product-attribute { padding:0 0 14px; border-bottom:1px solid var(--tw-line); }
body #product-product .product-attribute li { padding:5px 0; color:#52677d; }
body #product-product .product-attribute .title { color:#7a8998; min-width:78px; display:inline-block; }
body #product-product #product { margin-top:14px; }
body #product-product #product .form-control { border-radius:9px; border-color:#d5e0eb; }
body #product-product #product .form-control:focus { border-color:#6199c5; box-shadow:0 0 0 3px rgba(33,111,174,.12); }
body #product-product .tw-product-cart-action { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:17px; }
body #product-product .tw-product-cart-action .quantity-input-wrapper { margin:0 2px 0 0; }
body #product-product .tw-product-cart-action #input-quantity { min-width:48px; }
body #product-product .tw-detail-actions { display:flex; flex:1; min-width:250px; gap:10px; }
body #product-product .tw-detail-actions .btn { display:flex; align-items:center; justify-content:center; gap:8px; flex:1; min-height:51px; border-radius:11px; font-size:16px; font-weight:850; line-height:1.3; padding:11px 13px; white-space:nowrap; }
body #product-product .tw-detail-actions .tw-detail-cart { color:#16518a; border:1px solid #a8c8e4; background:#eef6ff; }
body #product-product .tw-detail-actions .tw-detail-cart:hover { color:#0b396b; background:#deeeff; }
body #product-product .tw-detail-actions .tw-detail-buy { color:#fff; border:1px solid #e77a12; background:linear-gradient(135deg,#fba238,#eb7811); box-shadow:0 7px 18px rgba(223,109,13,.18); }
body #product-product .tw-detail-actions .tw-detail-buy:hover { background:linear-gradient(135deg,#ed9124,#d66a0b); }
body #product-product .tw-detail-actions .btn[disabled] { opacity:.6; }
body #product-product .tw-product-cart-action .wishlist-share { display:flex; gap:6px; margin:0; }
body #product-product .tw-product-cart-action .wishlist-share .btn { border-radius:9px; }
body #product-product .tw-checkout-note { color:#72869b; font-size:12px; line-height:1.6; margin:0 0 18px; }
body #product-product .tw-checkout-note i { color:#6a8fb1; margin-right:3px; }
body #product-product .nav-tabs { margin-top:25px; border-bottom:1px solid #dce7f0; }
body #product-product .nav-tabs>li.active>a { color:#15518d; font-weight:800; border-bottom:3px solid #f18a22; }
body #product-product .tab-content { padding:22px 5px 28px; background:#fff; }
body #product-product .tab-content img { max-width:100%; height:auto; }
body #product-product .text-danger.tw-option-error { color:#b52e28; font-size:12px; padding-top:5px; }
body #product-category #content>h2,body #product-search #content>h2,body #product-special #content>h2 { font-size:28px; padding:8px 0 12px; }
body #product-category .category-description { background:#fff; border:1px solid var(--tw-line); border-radius:13px; padding:12px 4px; margin-bottom:18px; }
@media(min-width:768px){body .product-wrapper { display:flex; flex-wrap:wrap; } body .product-wrapper>.product-layout { display:flex; } body .product-wrapper>.product-layout>.product-thumb { width:100%; }}
@media(max-width:991px){body #product-product .tw-detail-panel { padding:8px 15px 16px; }body #product-product .tw-product-intro h1 { font-size:26px; }body .tw-product-card .tw-product-image { height:190px; min-height:190px; }}
@media(max-width:767px){
 body header { padding:12px 0; } body #menu.navbar { margin-bottom:10px; }
 body .product-layout { margin-bottom:14px; }body .product-thumb.tw-product-card { min-height:360px; border-radius:12px; }
 body .tw-product-card .tw-product-image { height:155px; min-height:155px; padding:10px; border-radius:12px 12px 0 0; }
 body .tw-product-card .tw-product-caption { padding:11px 10px 12px; }
 body .tw-product-card .product-name { font-size:13px; min-height:38px; }
 body .tw-product-card .price { font-size:17px; margin:6px 0 10px; }
 body .tw-card-actions { gap:5px; }
 body .tw-action { height:38px; padding:0 3px; font-size:11px; border-radius:8px; }
 body .tw-action i { display:none; }
 body #product-product .tw-detail-gallery .elevate-zoom-preview { min-height:260px; padding:14px; }
 body #product-product .tw-detail-panel { padding:14px 8px 10px; }
 body #product-product .tw-product-intro h1 { font-size:24px; }
 body #product-product .product-price-wrapper h2,body #product-product .product-price-wrapper .price-new { font-size:27px; }
 body #product-product .tw-product-cart-action { gap:8px; }
 body #product-product .tw-detail-actions { min-width:100%; width:100%; order:2; }
 body #product-product .tw-detail-actions .btn { font-size:15px; min-height:48px; }
 body #product-product .tw-product-cart-action .wishlist-share { order:1; margin-left:auto; }
}
@media(max-width:359px){body .tw-card-actions { grid-template-columns:1fr; }body .tw-action { height:36px; }body .tw-product-card .tw-product-image { height:138px; min-height:138px; }}
@media(prefers-reduced-motion:reduce){body .tw-product-card,body .tw-product-card img,body .tw-action { transition:none!important; }}

/* Overrides for legacy theme hover and product action styles. */
body .tw-product-card:hover .tw-product-image>a { opacity:1 !important; }
body .tw-product-card .product-name { height:auto; white-space:normal; text-overflow:clip; }
body .tw-product-card .product-description { display:block; }
body .tw-product-card .price,body .tw-product-card:hover .price { opacity:1 !important; }
body .tw-product-card .rating { padding:0; }
body #product-product .tw-product-cart-action #button-cart { float:none; margin:0; position:static; padding:11px 13px; height:auto; color:#16518a; border-color:#a8c8e4; background:#eef6ff; }
body #product-product .tw-product-cart-action #button-cart:before { content:none; display:none; }
body #product-product .tw-product-cart-action #button-cart:hover { color:#0b396b; background:#deeeff; }
body #product-product .tw-product-cart-action .wishlist-share { float:none; margin-top:0; }
body #product-product .tw-product-cart-action .wishlist-share button { margin-right:0; }
@media(min-width:768px){body .product-list .tw-product-card { flex-direction:row; min-height:235px; }body .product-list .tw-product-card .tw-product-image { float:none; width:35%; height:auto; min-height:235px; }body .product-list .tw-product-card .tw-product-caption { margin:0; flex:1; }body .product-list .tw-product-card .tw-card-actions { max-width:350px; }}

body #product-product .nav-tabs>li.active>a,body #product-product .nav-tabs>li.active>a:hover { background:#fff !important; color:#15518d !important; border-color:#e4eaf1 #e4eaf1 #f18a22 !important; border-bottom:3px solid #f18a22 !important; border-radius:8px 8px 0 0; }
body #product-product .nav-tabs>li>a { color:#526a82; border-radius:8px 8px 0 0; }
