/* Trường Thịnh Robotics — shared site header/footer shell for every frontend page. */
body.tt-robotics-site-shell {
    --ttr-blue: #0758e8;
    --ttr-blue-2: #0b83ff;
    --ttr-cyan: #24c7ff;
    --ttr-navy: #031633;
    --ttr-navy-2: #061f48;
    --ttr-ink: #06152f;
    --ttr-text: #43506a;
    --ttr-muted: #71809a;
    --ttr-line: #dce7f7;
    --ttr-surface: #f6f9ff;
    --ttr-white: #fff;
    --ttr-radius: 18px;
    --ttr-shadow: 0 18px 50px rgba(17, 65, 135, .11);
    --ttr-container: 1280px;
    overflow-x: hidden;
}

/* v3.3.1: Flatsome parent header/footer markup is not rendered at all.
   The old display:none workaround was removed. */

.ttr-site-shell,
.ttr-footer {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.ttr-site-shell *, .ttr-footer * { box-sizing: border-box; }
.ttr-site-shell img, .ttr-footer img { max-width: 100%; height: auto; }
.ttr-site-shell a, .ttr-footer a { text-decoration: none; }
.ttr-container { width: min(calc(100% - 48px), var(--ttr-container)); margin-inline: auto; }

/* Topbar + header: exactly the same shell used by the homepage. */
.ttr-site-shell { position: relative; z-index: 10000; }
.ttr-topbar { background: #031736; color: rgba(255,255,255,.82); font-size: 12px; }
.ttr-topbar__inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ttr-topbar__left { display: flex; gap: 24px; }
.ttr-topbar a { color: rgba(255,255,255,.88); }
.ttr-topbar a:hover { color: #fff; }
.ttr-header { background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(8,62,150,.08); position: sticky; top: 0; z-index: 10001; backdrop-filter: blur(14px); box-shadow: 0 8px 30px rgba(19,61,119,.05); }
.admin-bar .ttr-header { top: 32px; }
.ttr-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.ttr-logo { display: flex; align-items: center; flex: 0 0 230px; }
.ttr-logo img { width: 230px; max-height: 58px; object-fit: contain; object-position: left center; }
.ttr-nav { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 2.2vw, 34px); margin-left: auto; }
.ttr-nav a { color: #101d36; font-size: 14px; font-weight: 700; position: relative; padding: 25px 0; }
.ttr-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 16px; height: 2px; background: linear-gradient(90deg,var(--ttr-blue),var(--ttr-cyan)); transition: .25s ease; }
.ttr-nav a:hover { color: var(--ttr-blue); }
.ttr-nav a:hover::after { right: 0; }
.ttr-header__actions { display: flex; align-items: center; gap: 12px; }
.ttr-header-phone { color: #fff !important; background: linear-gradient(135deg,var(--ttr-blue),var(--ttr-blue-2)); padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 800; box-shadow: 0 8px 22px rgba(7,88,232,.25); }
.ttr-menu-toggle { display: none; width: 42px; height: 42px; border: 0 !important; border-radius: 11px !important; background: #edf4ff !important; padding: 10px !important; box-shadow: none !important; margin: 0 !important; }
.ttr-menu-toggle span { display: block; height: 2px; background: var(--ttr-navy); margin: 4px 0; border-radius: 3px; }
.ttr-mobile-nav { display: none; }

/* Footer: exact homepage footer partial, shared globally. */
.ttr-footer { background: #03142f; color: rgba(255,255,255,.65); padding: 52px 0 18px; position: relative; z-index: 20; }
.ttr-footer__grid { display: grid; grid-template-columns: 1.45fr .85fr .85fr 1.25fr; gap: 44px; }
.ttr-footer__brand img { width: 230px; max-height: 78px; object-fit: contain; object-position: left center; margin-bottom: 13px; }
.ttr-footer__brand p { margin: 0 0 9px; font-size: 12px; line-height: 1.65; }
.ttr-footer__brand strong { color: #fff; }
.ttr-footer__small { color: rgba(255,255,255,.42); }
.ttr-footer h3 { color: #fff !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .06em; margin: 5px 0 16px !important; }
.ttr-footer a { display: block; color: rgba(255,255,255,.67); font-size: 12px; margin-bottom: 9px; }
.ttr-footer a:hover { color: #fff; }
.ttr-footer__contact p { margin: 0 0 9px; font-size: 12px; line-height: 1.55; }
.ttr-footer__contact p a { display: inline; }
.ttr-footer__bottom { border-top: 1px solid rgba(255,255,255,.09); margin-top: 34px; padding-top: 17px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: rgba(255,255,255,.42); }

@media (max-width: 1100px) {
    .ttr-nav { gap: 17px; }
    .ttr-header-phone { display: none; }
}

@media (max-width: 849px) {
    .ttr-container { width: min(calc(100% - 30px), var(--ttr-container)); }
    .ttr-topbar { display: none; }
    .ttr-header__inner { min-height: 64px; }
    .ttr-logo { flex-basis: 190px; }
    .ttr-logo img { width: 190px; max-height: 52px; }
    .ttr-nav { display: none; }
    .ttr-menu-toggle { display: block; }
    .ttr-header { position: sticky; }
    .ttr-mobile-nav { display: grid; position: absolute; left: 0; right: 0; top: 64px; background: rgba(255,255,255,.99); padding: 10px 16px 18px; border-top: 1px solid #e9f0fa; box-shadow: 0 20px 45px rgba(18,49,91,.14); transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none; transition: .22s ease; }
    .ttr-mobile-nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
    .ttr-mobile-nav a { color: #14213a; padding: 11px 7px; border-bottom: 1px solid #edf2f9; font-size: 14px; font-weight: 700; }
    .ttr-mobile-nav__cta { margin-top: 9px; background: var(--ttr-blue); color: #fff !important; border-radius: 9px; text-align: center; border-bottom: 0 !important; }
    .ttr-footer__grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 782px) {
    .admin-bar .ttr-header { top: 46px; }
}

@media (max-width: 549px) {
    .ttr-container { width: min(calc(100% - 24px), var(--ttr-container)); }
    .ttr-header__inner { min-height: 58px; }
    .ttr-logo { flex-basis: 165px; }
    .ttr-logo img { width: 165px; max-height: 47px; }
    .ttr-menu-toggle { width: 40px; height: 40px; }
    .ttr-mobile-nav { top: 58px; }
    .ttr-footer { padding-top: 38px; }
    .ttr-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
    .ttr-footer__brand { grid-column: 1/-1; }
    .ttr-footer__contact { grid-column: 1/-1; }
    .ttr-footer__bottom { display: grid; text-align: center; justify-content: center; }
}

/* =========================================================
   v3.3.1 — WooCommerce Product Mega Menu / Lazy Category + Infinite Batch Slider
   ========================================================= */
.ttr-products-trigger { display: inline-flex !important; align-items: center; gap: 5px; }
.ttr-products-trigger__chev { font-size: 12px; line-height: 1; transform: translateY(-1px); transition: transform .2s ease; }
.ttr-header.is-products-open .ttr-products-trigger { color: var(--ttr-blue); }
.ttr-header.is-products-open .ttr-products-trigger::after { right: 0; }
.ttr-header.is-products-open .ttr-products-trigger__chev { transform: rotate(180deg); }

.ttr-product-mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 10005; background: rgba(255,255,255,.995); border-top: 1px solid #e8eef8; box-shadow: 0 24px 55px rgba(15,44,89,.18); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
.ttr-header.is-products-open .ttr-product-mega { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.ttr-product-mega__inner { padding-top: 18px; padding-bottom: 20px; }
.ttr-product-mega__top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 13px; border-bottom: 1px solid #edf2f8; }
.ttr-product-mega__top > div { display: grid; gap: 2px; }
.ttr-product-mega__eyebrow { color: var(--ttr-blue); font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.ttr-product-mega__top strong { color: #0a1c3d; font-size: 18px; }
.ttr-product-mega__close { width: 38px; height: 38px; border: 0 !important; border-radius: 10px !important; background: #f0f5fc !important; color: #1a2c49 !important; font-size: 25px !important; line-height: 1 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
.ttr-product-mega__layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 20px; padding-top: 14px; }
.ttr-product-mega__cats { display: flex; flex-direction: column; gap: 5px; max-height: 410px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.ttr-product-mega__cat { appearance: none; width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border: 1px solid transparent !important; background: transparent !important; color: #243751 !important; border-radius: 9px !important; padding: 9px 11px !important; margin: 0 !important; font-size: 12px !important; font-weight: 750 !important; text-align: left !important; box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important; }
.ttr-product-mega__cat:hover { background: #f2f7ff !important; color: var(--ttr-blue) !important; }
.ttr-product-mega__cat.is-active { background: linear-gradient(135deg,#0758e8,#0b83ff) !important; color: #fff !important; box-shadow: 0 8px 18px rgba(7,88,232,.18) !important; }
.ttr-product-mega__cat small { min-width: 24px; padding: 2px 6px; text-align: center; border-radius: 999px; background: rgba(31,54,88,.08); color: inherit; font-size: 9px; }
.ttr-product-mega__cat.is-active small { background: rgba(255,255,255,.18); }
.ttr-product-mega__content { min-width: 0; }
.ttr-product-mega__toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.ttr-product-mega__toolbar > div:first-child { display: grid; gap: 1px; }
.ttr-product-mega__toolbar strong { color: #0b1d3c; font-size: 14px; }
.ttr-product-mega__toolbar span { color: #8290a6; font-size: 10px; }
.ttr-product-mega__nav { display: flex; gap: 6px; }
.ttr-product-mega__nav button { width: 34px; height: 34px; border: 1px solid #dce6f3 !important; background: #fff !important; color: #102442 !important; border-radius: 9px !important; margin: 0 !important; padding: 0 !important; font-size: 22px !important; line-height: 1 !important; box-shadow: none !important; }
.ttr-product-mega__nav button:hover { border-color: var(--ttr-blue) !important; color: var(--ttr-blue) !important; }
.ttr-product-mega__rail { display: flex; gap: 11px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; min-height: 282px; padding: 3px 2px 8px; overscroll-behavior-inline: contain; }
.ttr-product-mega__rail::-webkit-scrollbar { display: none; }
.ttr-mega-product { flex: 0 0 198px; scroll-snap-align: start; background: #fff; border: 1px solid #e4ebf6; border-radius: 13px; overflow: hidden; box-shadow: 0 8px 22px rgba(25,64,122,.06); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ttr-mega-product:hover { transform: translateY(-2px); border-color: #c9dcfb; box-shadow: 0 13px 28px rgba(25,64,122,.11); }
.ttr-mega-product__image { appearance: none; position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 148px; padding: 11px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: linear-gradient(180deg,#f8fbff,#f0f6ff) !important; box-shadow: none !important; cursor: pointer; }
.ttr-mega-product__image img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.ttr-mega-product:hover .ttr-mega-product__image img { transform: scale(1.035); }
.ttr-mega-product__quickbadge { position: absolute; left: 8px; bottom: 8px; background: rgba(3,22,51,.82); color: #fff; border-radius: 999px; padding: 4px 7px; font-size: 8px; font-weight: 800; opacity: 0; transform: translateY(4px); transition: .18s ease; }
.ttr-mega-product:hover .ttr-mega-product__quickbadge { opacity: 1; transform: none; }
.ttr-mega-product__body { padding: 10px 11px 11px; }
.ttr-mega-product__sku { display: block; color: #8b98aa; font-size: 9px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttr-mega-product h4 { color: #0b1c39 !important; font-size: 12px !important; line-height: 1.35 !important; margin: 0 0 8px !important; height: 32px; overflow: hidden; font-weight: 800 !important; text-transform: none !important; letter-spacing: 0 !important; }
.ttr-mega-product__meta { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ttr-mega-product__price { color: #0758e8; font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttr-mega-product__price del { color: #98a4b7; font-size: 9px; margin-right: 3px; }
.ttr-mega-product__price ins { text-decoration: none; }
.ttr-mega-stock { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 4px 6px; font-size: 8px; font-weight: 800; }
.ttr-mega-stock.is-in { color: #087b50; background: #e7f8f1; }
.ttr-mega-stock.is-backorder { color: #a56000; background: #fff4db; }
.ttr-mega-stock.is-out { color: #a73535; background: #fff0f0; }
.ttr-mega-product__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.ttr-mega-product__actions > * { min-height: 29px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px !important; font-size: 9px !important; font-weight: 850 !important; line-height: 1 !important; text-align: center; text-transform: none !important; margin: 0 !important; box-shadow: none !important; letter-spacing: 0 !important; }
.ttr-mega-product__actions > *:only-child { grid-column: 1/-1; }
.ttr-mega-quick-btn { border: 0 !important; background: linear-gradient(135deg,#0758e8,#0b83ff) !important; color: #fff !important; padding: 0 7px !important; }
.ttr-mega-product__actions a { border: 1px solid #dce6f4; color: #23405f; background: #fff; }
.ttr-mega-product__actions a:hover { color: var(--ttr-blue); border-color: #aacbff; }
.ttr-product-mega__footer { min-height: 28px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf2f8; padding-top: 9px; margin-top: 1px; }
.ttr-product-mega__footer span { color: #8492a8; font-size: 10px; }
.ttr-product-mega__footer a { color: var(--ttr-blue); font-size: 10px; font-weight: 850; }
.ttr-mega-loading, .ttr-mega-empty { flex: 1 0 100%; min-height: 200px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #667892; font-size: 12px; background: #f8fbff; border: 1px dashed #d7e5f8; border-radius: 12px; }
.ttr-mega-loading i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ccdef9; border-top-color: var(--ttr-blue); animation: ttr-spin .7s linear infinite; }
@keyframes ttr-spin { to { transform: rotate(360deg); } }

/* Quick view modal. */
.ttr-quickview { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.ttr-quickview.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.ttr-quickview__backdrop { position: absolute; inset: 0; background: rgba(2,14,34,.68); backdrop-filter: blur(6px); }
.ttr-quickview__dialog { position: relative; width: min(920px, calc(100vw - 40px)); max-height: min(720px, calc(100vh - 50px)); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(1,16,43,.35); transform: translateY(10px) scale(.985); transition: transform .22s ease; }
.ttr-quickview.is-open .ttr-quickview__dialog { transform: none; }
.ttr-quickview__close { position: sticky; float: right; top: 12px; right: 12px; z-index: 4; width: 38px; height: 38px; border: 0 !important; border-radius: 50% !important; background: #eef4fb !important; color: #172a49 !important; font-size: 25px !important; line-height: 1 !important; padding: 0 !important; margin: 12px 12px -50px 0 !important; box-shadow: none !important; }
.ttr-quickview__content { min-height: 360px; }
.ttr-quickview__content > .ttr-mega-loading { min-height: 360px; border: 0; }
.ttr-qv-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 34px; padding: 38px; }
.ttr-qv-main { height: 360px; display: flex; align-items: center; justify-content: center; border-radius: 15px; background: linear-gradient(180deg,#f9fbff,#eef5ff); overflow: hidden; }
.ttr-qv-main img { width: 100%; height: 100%; object-fit: contain; }
.ttr-qv-thumbs { display: flex; gap: 7px; margin-top: 9px; overflow-x: auto; }
.ttr-qv-thumbs button { flex: 0 0 56px; width: 56px; height: 56px; padding: 3px !important; margin: 0 !important; border: 1px solid #dfe8f5 !important; border-radius: 8px !important; background: #fff !important; box-shadow: none !important; }
.ttr-qv-thumbs button.is-active { border-color: var(--ttr-blue) !important; box-shadow: 0 0 0 1px var(--ttr-blue) inset !important; }
.ttr-qv-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.ttr-qv-info { padding-top: 12px; }
.ttr-qv-sku { color: #7789a3; font-size: 10px; font-weight: 800; }
.ttr-qv-info h2 { color: #081b3b !important; font-size: clamp(22px,2vw,30px) !important; line-height: 1.18 !important; margin: 7px 44px 13px 0 !important; text-transform: none !important; letter-spacing: -.02em !important; }
.ttr-qv-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ttr-qv-price { color: var(--ttr-blue); font-size: 21px; font-weight: 900; }
.ttr-qv-price del { color: #98a4b7; font-size: 13px; }
.ttr-qv-price ins { text-decoration: none; }
.ttr-qv-short { color: #53627a; font-size: 13px; line-height: 1.65; }
.ttr-qv-short p { margin: 0 0 12px; }
.ttr-qv-attrs { margin-top: 13px; border: 1px solid #e2eaf5; border-radius: 11px; overflow: hidden; }
.ttr-qv-attrs > div { display: grid; grid-template-columns: 40% 60%; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #edf2f8; font-size: 10px; }
.ttr-qv-attrs > div:last-child { border-bottom: 0; }
.ttr-qv-attrs span { color: #73829a; }
.ttr-qv-attrs strong { color: #182d4b; }
.ttr-qv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.ttr-qv-actions a { min-height: 43px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 11px; font-weight: 850; }
.ttr-qv-primary { background: linear-gradient(135deg,#0758e8,#0b83ff); color: #fff !important; }
.ttr-qv-secondary { border: 1px solid #bfd3ef; color: #0b4fae !important; background: #fff; }
html.ttr-qv-open, html.ttr-qv-open body, html.ttr-mega-open, html.ttr-mega-open body { overflow: hidden; }

.ttr-mobile-products-toggle { display: none; }

@media (max-width: 1100px) {
    .ttr-product-mega__layout { grid-template-columns: 190px minmax(0,1fr); }
    .ttr-mega-product { flex-basis: 184px; }
}

@media (max-width: 849px) {
    .ttr-mobile-products-toggle { appearance:none; display:flex; align-items:center; justify-content:space-between; width:100%; min-height:43px; border:0 !important; border-bottom:1px solid #edf2f9 !important; border-radius:0 !important; background:transparent !important; color:#14213a !important; padding:11px 7px !important; margin:0 !important; box-shadow:none !important; font-size:14px !important; font-weight:700 !important; text-transform:none !important; letter-spacing:0 !important; }
    .ttr-mobile-products-toggle b { font-size: 15px; }
    .ttr-header.is-products-open .ttr-mobile-products-toggle b { transform: rotate(180deg); }
    .ttr-product-mega { position: absolute; top: 100%; bottom: auto; max-height: calc(100vh - 64px); overflow-y: auto; transform: translateY(12px); border-top: 1px solid #e2eaf5; }
    .ttr-product-mega__inner { width: 100%; padding: 12px 14px 18px; }
    .ttr-product-mega__top { position: sticky; top: -12px; z-index: 3; background: #fff; padding: 10px 0 11px; }
    .ttr-product-mega__top strong { font-size: 15px; }
    .ttr-product-mega__layout { grid-template-columns: 1fr; gap: 10px; }
    .ttr-product-mega__cats { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0 0 3px; scrollbar-width: none; }
    .ttr-product-mega__cats::-webkit-scrollbar { display: none; }
    .ttr-product-mega__cat { flex: 0 0 auto; width: auto; min-height: 36px; padding: 7px 10px !important; }
    .ttr-product-mega__cat small { min-width: 20px; }
    .ttr-product-mega__toolbar { align-items: center; }
    .ttr-product-mega__toolbar span { display: none; }
    .ttr-product-mega__rail { min-height: 316px; gap: 10px; }
    .ttr-mega-product { flex-basis: min(67vw, 230px); }
    .ttr-mega-product__image { height: 178px; }
    .ttr-product-mega__footer { position: sticky; bottom: -18px; background: #fff; padding: 10px 0 12px; }
    .ttr-qv-grid { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
    .ttr-qv-main { height: min(42vh, 330px); }
    .ttr-qv-info { padding-top: 0; }
    .ttr-quickview { padding: 10px; align-items: flex-end; }
    .ttr-quickview__dialog { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
}


@media (max-width: 549px) {
    .ttr-product-mega { top: 100%; max-height: calc(100vh - 58px); }
    .ttr-product-mega__top { top: -12px; }
    .ttr-product-mega__nav button { width: 32px; height: 32px; }
    .ttr-mega-product { flex-basis: min(72vw, 224px); }
    .ttr-qv-actions { grid-template-columns: 1fr; }
    .ttr-qv-info h2 { font-size: 22px !important; }
}
