/* ThemeDokan UI v17 - loaded LAST, overrides v15/v16
   1) ONE corner token (--td-r) used by buttons, product image, thumbnails and product grid cards
   2) single product: image moved up into the hero
   3) AI chat bot: no overlap, stays above the mobile bottom nav
   To change the corner shape everywhere, edit ONLY --td-r below. */
:root{--td-r:var(--b-tl,5px) var(--b-tr,0px) var(--b-br,5px) var(--b-bl,0px);--td-nav-h:76px}

/* ---- 1) same radius: buttons = single product image = grid cards ---- */
.td-demo,.td-demo-dash,.td-buy-card button,.td-buy-card .td-btn,.td-buy-card a[class*="btn"],
.td-gallery-box,.td-gallery-btn,.td-gallery-main,.td-gallery-box img,
.td-gallery-box ~ div.flex button,.td-gallery-box ~ div.flex button img,
.td-card,.td-card>a,.td-card>a img,.td-card .td-sq,.td-card button,.td-card .td-btn,
button.td-btn,a.td-btn{border-radius:var(--td-r)!important}
.td-gallery-box,.td-card{overflow:hidden}
.td-zoom-hint{border-radius:var(--td-r)!important}
.td-card .absolute.left-0.top-0 span{border-radius:0 0 8px 0!important}

/* ---- 2) single product image: move up ---- */
.td-pdp-hero{padding-bottom:50px}
.td-pdp-hero + div{margin-top:-34px!important;position:relative;z-index:2}
.td-gallery-box{margin-top:0!important;position:relative;z-index:2}
@media (min-width:640px){.td-pdp-hero{padding-bottom:58px}.td-pdp-hero + div{margin-top:-40px!important}}

/* (AI chat bot overrides removed in v17.10: the widget uses its own CSS) */

/* ---- v17.2: smaller product image ---- */
.td-gallery-box,.td-gallery-box ~ div.flex{width:86%;max-width:440px!important;margin-left:auto!important;margin-right:auto!important}
@media (min-width:1024px){.td-gallery-box,.td-gallery-box ~ div.flex{width:100%;max-width:500px!important;margin-left:0!important}}

/* ---- v17.4: 'Choose an option' boxes = same corner as buttons ---- */
.td-buy-card fieldset label,fieldset label[class*="rounded"],.td-buy-card select,.td-buy-card .td-buy-save,.td-buy-card input:not([type=radio]):not([type=checkbox]){border-radius:var(--td-r)!important}

/* ---- v17.4: product image in YouTube-style 16:9 frame ---- */
.td-gallery-box,.td-gallery-box ~ div.flex{width:92%;max-width:640px!important}
.td-gallery-btn{position:relative;aspect-ratio:16/9;overflow:hidden}
.td-gallery-main,.td-gallery-box img.td-gallery-main{width:100%!important;height:100%!important;aspect-ratio:16/9;object-fit:cover;object-position:center top}
@media (min-width:1024px){.td-gallery-box,.td-gallery-box ~ div.flex{width:100%;max-width:680px!important}}

/* ---- v17.5: every button / select / option box / dropdown uses the SAME corner (--td-r) ---- */
button:not([class*="rounded-full"]):not(.tdw-fab):not([role="switch"]):not([role="checkbox"]),
a[class*="btn"],[role="combobox"],[role="option"],[role="menuitem"],[role="listbox"],[role="menu"],
select,fieldset label,label[class*="rounded"],[class*="SelectTrigger"],[data-radix-popper-content-wrapper]>div{border-radius:var(--td-r)!important}
.td-buy-card [class*="rounded-"]:not([class*="rounded-full"]){border-radius:var(--td-r)!important}

/* ---- v17.5: compact dark title area above the image ---- */
.td-pdp-hero{padding:10px 16px 34px!important}
.td-pdp-hero::after{height:26px!important}
.td-pdp-crumb{font-size:11.5px}
.td-pdp-title{margin-top:8px!important;font-size:20px!important;line-height:1.25!important}
.td-pdp-chips{margin-top:10px;gap:6px}
.td-pdp-chips a,.td-pdp-chips span{padding:4px 10px;font-size:12px}
.td-pdp-hero + div{margin-top:-18px!important}
@media (min-width:640px){.td-pdp-hero{padding:14px 24px 42px!important}.td-pdp-title{font-size:28px!important}.td-pdp-hero + div{margin-top:-22px!important}}

/* v17.6: rating chip scrolls to reviews */
#reviews{scroll-margin-top:84px}
.td-pdp-chips a[href="#reviews"]{cursor:pointer;text-transform:none}

/* ======== v17.8 ======== */
/* A) all chips in ONE row (centered if they fit, swipe sideways if not) */
body .td-pdp-chips{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:6px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin-top:10px!important;padding:0 2px}
body .td-pdp-chips::-webkit-scrollbar{display:none}
body .td-pdp-chips>*{flex:0 0 auto!important;white-space:nowrap!important;padding:4px 9px!important;font-size:11.5px!important;line-height:1.35}
body .td-pdp-chips>:first-child{margin-left:auto}
body .td-pdp-chips>:last-child{margin-right:auto}
body .td-pdp-hero{padding:10px 16px 34px!important}
body .td-pdp-title{font-size:20px!important;line-height:1.25!important;margin-top:8px!important}
@media (min-width:640px){body .td-pdp-chips>*{font-size:13px!important;padding:5px 12px!important}body .td-pdp-title{font-size:28px!important}}

/* B) image sits on a dark colour panel over the white page (Themeve style) */
body .td-gallery-box{background:linear-gradient(135deg,#0d1533 0%,#1d1b4d 50%,#4a2468 100%)!important;border:0!important;box-shadow:0 22px 44px -24px rgba(20,16,60,.75)!important;padding:0!important}
body .td-gallery-btn{display:flex!important;align-items:center;justify-content:center;aspect-ratio:16/9;padding:14px!important;background:transparent!important}
body .td-gallery-main,body .td-gallery-box img.td-gallery-main{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;aspect-ratio:auto!important;object-fit:contain!important;border-radius:calc(var(--b-tl,5px) + 3px) 0 calc(var(--b-br,5px) + 3px) 0!important;box-shadow:0 16px 34px -14px rgba(0,0,0,.65)}
body .td-zoom-hint{background-color:rgba(255,255,255,.92)!important}

/* ======== v17.9: image floats ABOVE both backgrounds (dark hero + white page) with a strong shadow ======== */
:root{--td-ov:96px}
@media (min-width:640px){:root{--td-ov:130px}}
@media (min-width:1024px){:root{--td-ov:170px}}
body .td-pdp-hero{padding-bottom:calc(var(--td-ov) + 22px)!important}
body .td-pdp-hero + div{margin-top:calc(var(--td-ov) * -1)!important;position:relative;z-index:1}
@media (min-width:1024px){body .td-pdp-hero + div>div:nth-child(2){margin-top:var(--td-ov)}}
body .td-gallery-box{
  background:hsl(var(--card))!important;border:1px solid rgba(255,255,255,.18)!important;padding:0!important;
  box-shadow:0 34px 60px -22px rgba(6,10,30,.70),0 14px 28px -14px rgba(6,10,30,.45),0 0 0 1px rgba(15,23,42,.06)!important}
body .td-gallery-btn{display:block!important;padding:0!important;aspect-ratio:16/9;background:transparent!important}
body .td-gallery-main,body .td-gallery-box img.td-gallery-main{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center top;border-radius:0!important;box-shadow:none!important}

/* ======== v17.10: icons inside chips ======== */
.td-pdp-chips .td-ic{display:inline-block;width:13px;height:13px;margin-right:5px;vertical-align:-2px;flex:none}

/* ======== v17.12: checkout ======== */
.td-co-trust,.td-co-fine{display:none!important}
body .td-co-pay{border-radius:var(--td-r)!important;min-height:44px!important;padding:10px 16px!important;font-size:14px!important;line-height:1.25!important}
body .td-co-pay svg{width:16px!important;height:16px!important}
body .td-addnote{border:0!important;outline:0;box-shadow:none!important;background:transparent!important;padding:4px 0!important;border-radius:0!important}

/* ======== v17.13: bigger product image ======== */
body .td-gallery-box,body .td-gallery-box ~ div.flex{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}
@media (min-width:640px){body .td-gallery-box,body .td-gallery-box ~ div.flex{max-width:820px!important;margin-left:auto!important;margin-right:auto!important}}
@media (min-width:1024px){body .td-gallery-box,body .td-gallery-box ~ div.flex{max-width:none!important;margin-left:0!important}}
body .td-gallery-box ~ div.flex button.h-16{height:60px;width:60px}

/* ======== v17.14: product info dropdowns (What you get / FAQ / Requirements / Support / Licence) ======== */
.td-acc-group{padding:0 16px}
.td-acc-group>div>[data-state]{border-bottom:1px solid hsl(var(--border))}
.td-acc-group>div>[data-state]:last-child{border-bottom:0}
.td-acc-group [data-state] [data-state]{border-top:0}
.td-acc-group [role=region]>div{padding-bottom:14px}

/* ======== v17.15: dropdown sections (script-driven, works with any bundle) ======== */
.td-dd{border:1px solid hsl(var(--border))!important;border-radius:var(--td-r)!important;background:hsl(var(--card))!important;padding:0!important;overflow:hidden;margin-top:10px!important}
.td-dd>:not(.td-dd-h){display:none!important}
.td-dd.td-open>:not(.td-dd-h){display:block!important;margin:0!important;padding:0 16px 14px!important}
.td-dd-h{display:flex!important;align-items:center;justify-content:space-between;gap:10px;margin:0!important;padding:14px 16px;cursor:pointer;user-select:none;font-size:15px!important;font-weight:600!important;text-transform:none!important;letter-spacing:0!important;color:hsl(var(--foreground))!important;-webkit-tap-highlight-color:transparent}
.td-dd-h::after{content:"";flex:none;width:8px;height:8px;margin-left:auto;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s;opacity:.55}
.td-dd.td-open>.td-dd-h::after{transform:rotate(-135deg)}
.td-wyg>h2{display:none!important}
.td-wyg>div{display:flex!important;flex-direction:column;gap:0!important;margin-top:0!important}
/* FAQ: remove the inner box border = no double border */
.td-dd [data-orientation="vertical"]{border:0!important;background:transparent!important;border-radius:0!important;margin-top:0!important}
.td-dd [data-orientation="vertical"]>[data-state]{padding-left:0!important;padding-right:0!important}

/* ======== v17.19: login-required popup ======== */
.td-gate{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.td-gate-bg{position:absolute;inset:0;background:rgba(8,12,30,.55);backdrop-filter:blur(2px)}
.td-gate-box{position:relative;width:100%;max-width:380px;background:hsl(var(--card));color:hsl(var(--foreground));border:1px solid hsl(var(--border));border-radius:var(--td-r);padding:26px 22px 22px;text-align:center;box-shadow:0 30px 60px -20px rgba(6,10,30,.6)}
.td-gate-x{position:absolute;top:8px;right:12px;font-size:26px;line-height:1;background:none;border:0;color:hsl(var(--muted-foreground));cursor:pointer;padding:4px 8px}
.td-gate-ic{width:54px;height:54px;margin:0 auto 12px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:hsl(var(--primary)/.12);color:hsl(var(--primary))}
.td-gate-box h3{font-size:18px;font-weight:700;margin:0 0 6px}
.td-gate-box p{font-size:14px;line-height:1.5;color:hsl(var(--muted-foreground));margin:0 0 18px}
.td-gate-btns{display:flex;gap:10px}
.td-gate-btns a{flex:1;display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 12px;font-size:14px;font-weight:600;text-decoration:none!important;border-radius:var(--td-r)!important}
.td-gate-pri{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}
.td-gate-sec{border:1px solid hsl(var(--border));color:hsl(var(--foreground))}

/* ======== v17.21: checkout needs login (inline card, rest of the page unchanged) ======== */
html.td-needlogin .td-co-form{display:none!important}
.td-cogate{margin:0 0 16px}
.td-cogate-card{width:100%;max-width:none;text-align:center;background:hsl(var(--card));border:1px solid hsl(var(--border));border-radius:var(--td-r);padding:30px 22px 24px;box-shadow:0 24px 50px -28px rgba(15,23,42,.4)}
.td-cogate-card .td-gate-ic{width:68px;height:68px;margin-bottom:14px}
.td-cogate-card h2{font-size:22px;font-weight:700;margin:0 0 8px;color:hsl(var(--foreground))}
.td-cogate-card p{font-size:14.5px;line-height:1.55;color:hsl(var(--muted-foreground));margin:0 0 20px}
.td-cogate-ul{list-style:none;margin:20px 0 0;padding:16px 0 0;border-top:1px solid hsl(var(--border));display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px;font-size:13px;color:hsl(var(--muted-foreground))}
.td-cogate-ul li::before{content:"\2713";color:#16a34a;font-weight:700;margin-right:6px}

/* ======== v17.22: chips row never clipped on the left ======== */
body .td-pdp-chips>:first-child{margin-left:0}
body .td-pdp-chips>:last-child{margin-right:0}
@supports (justify-content:safe center){body .td-pdp-chips{justify-content:safe center!important}}

/* ======== v17.23: dropdown group = ONE outer border only, items separated by a thin line ======== */
body .td-acc-group{border:1px solid hsl(var(--border))!important;border-radius:var(--td-r)!important;background:hsl(var(--card))!important;padding:0 16px!important;overflow:hidden}
body .td-acc-group [data-orientation="vertical"]{border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;margin:0!important}
body .td-acc-group [data-state]:not(button):not([role="region"]){border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;outline:0!important;margin:0!important}
body .td-acc-group>[data-orientation="vertical"]>[data-state]{border-bottom:1px solid hsl(var(--border))!important}
body .td-acc-group>[data-orientation="vertical"]>[data-state]:last-child{border-bottom:0!important}
body .td-acc-group button:not(.a):not(.b):not(.c):not(.d){border:0!important;border-radius:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;padding-left:0!important;padding-right:0!important;width:100%}
body .td-acc-group h3{margin:0!important;border:0!important}
/* FAQ questions inside: thin line only */
body .td-acc-group [role="region"] [data-orientation="vertical"]>[data-state]{border-bottom:1px solid hsl(var(--border))!important}
body .td-acc-group [role="region"] [data-orientation="vertical"]>[data-state]:last-child{border-bottom:0!important}

/* (v17.24/25 floating bottom bar removed: bottom menu is back to the original design) */

/* ======== v17.26: fly-to-cart ======== */
.td-fly{position:fixed;z-index:300;pointer-events:none;border-radius:16px;background-size:cover;background-position:center;background-color:hsl(var(--primary));border:2px solid #fff;box-shadow:0 14px 30px rgba(8,12,30,.4);will-change:transform}
@keyframes tdBump{0%,100%{transform:scale(1)}35%{transform:scale(1.35)}65%{transform:scale(.92)}}
.td-bump svg{animation:tdBump .55s ease}

/* ======== v17.28: softer shadow on the product image ======== */
body .td-gallery-box{box-shadow:0 10px 22px -14px rgba(6,10,30,.32),0 0 0 1px rgba(15,23,42,.06)!important}

/* ======== v17.29: slimmer Add to Cart / Buy Now ======== */
body .td-buy-btns button,body .td-buy-btns a{min-height:40px!important;height:40px!important;padding:0 14px!important;font-size:14px!important;font-weight:600!important;line-height:1!important;gap:6px}
body .td-buy-btns svg{width:16px!important;height:16px!important}
body .td-buy-btns .td-buy-cart,body .td-buy-btns .td-buy-go{min-height:40px!important;height:40px!important;padding:0 14px!important;font-size:14px!important}
body .td-buy-btns .td-buy-cart svg,body .td-buy-btns .td-buy-go svg{width:16px!important;height:16px!important;margin-right:6px!important}

/* ======== v17.34: header always above page content (profile icon stays clickable after scrolling) ======== */
header.sticky,header[class*="sticky"]{z-index:60!important;pointer-events:auto!important}
header.sticky *{pointer-events:auto}
.td-pdp-hero,.td-pdp-hero + div,.td-gallery-box,.td-gallery-btn{z-index:auto}
body .td-pdp-hero + div,body .td-gallery-box{z-index:1!important}

/* ======== v17.34: product image slightly bigger ======== */
body .td-gallery-btn{aspect-ratio:16/10!important}
@media (min-width:640px){body .td-gallery-box,body .td-gallery-box ~ div.flex{max-width:900px!important}}
@media (min-width:1024px){body .td-gallery-btn{aspect-ratio:16/10!important}}
/* (v17.37: Back-button loading cover removed) */

/* ======== v17.40: product image corner a bit rounder (same diagonal shape as the buttons) ======== */
:root{--td-img-r:12px 0 12px 0}
body .td-gallery-box,body .td-gallery-btn,body .td-gallery-main,body .td-gallery-box img{border-radius:var(--td-img-r)!important}
body .td-gallery-box{overflow:hidden}
body .td-gallery-box ~ div.flex button,body .td-gallery-box ~ div.flex button img{border-radius:8px 0 8px 0!important}

/* ======== v17.42: product image corner rounder again ======== */
:root{--td-img-r:18px 0 18px 0}
body .td-gallery-box ~ div.flex button,body .td-gallery-box ~ div.flex button img{border-radius:12px 0 12px 0!important}

/* ======== v17.43: preview thumbnails (under the main image) = rounder corners, soft border ======== */
:root{--td-thumb-r:16px 0 16px 0}
body .td-gallery-box ~ div.overflow-x-auto > button:not(.z1):not(.z2):not(.z3):not(.z4):not(.z5),
body .td-gallery-box ~ div.overflow-x-auto > .td-vid-tile:not(.z1):not(.z2):not(.z3):not(.z4):not(.z5){
  border-radius:var(--td-thumb-r)!important;overflow:hidden!important;border-width:2px!important;border-style:solid!important}
body .td-gallery-box ~ div.overflow-x-auto > button:not(.border-primary):not(.z2):not(.z3):not(.z4):not(.z5){border-color:hsl(var(--border))!important}
body .td-gallery-box ~ div.overflow-x-auto > button.border-primary{border-color:hsl(var(--primary))!important}
body .td-gallery-box ~ div.overflow-x-auto > button img,
body .td-gallery-box ~ div.overflow-x-auto > .td-vid-tile img{border-radius:0!important;display:block}
body .td-gallery-box ~ div.overflow-x-auto{padding:2px 2px 8px}

/* ======== v17.44: MAIN preview image = rounder on ALL 4 corners; small thumbnails back to a softer corner ======== */
:root{--td-img-r:20px;--td-thumb-r:8px 0 8px 0}
body .td-gallery-box:not(.z1):not(.z2):not(.z3){border-radius:20px!important;overflow:hidden!important}
body .td-gallery-box > button.td-gallery-btn:not(.z1):not(.z2):not(.z3):not(.z4),
body .td-gallery-box img.td-gallery-main:not(.z1):not(.z2):not(.z3){border-radius:0!important}
body .td-gallery-box ~ div.overflow-x-auto > button:not(.z1):not(.z2):not(.z3):not(.z4):not(.z5),
body .td-gallery-box ~ div.overflow-x-auto > .td-vid-tile:not(.z1):not(.z2):not(.z3):not(.z4):not(.z5){border-radius:8px 0 8px 0!important;border-width:1.5px!important}

/* ======== v17.45: main preview image = BUTTON STYLE corners (top-left + bottom-right round, other two square), a bit bigger than buttons ======== */
:root{--td-img-r:16px 0 16px 0}
body .td-gallery-box:not(.z1):not(.z2):not(.z3){border-radius:16px 0 16px 0!important;overflow:hidden!important}

/* ======== v17.46: rating stars = original gold (only change) ======== */
html body:not(#tdx) .td-star,html body:not(#tdx) .td-pdp-chips .td-star,html body:not(#tdx) .td-pdp-chips a[href="#reviews"] b,html body:not(#tdx) .td-rating-link .td-star,html body:not(#tdx) .td-gold-star,html body:not(#tdx) [data-gold]{color:#f5b50a!important;-webkit-text-fill-color:#f5b50a!important;filter:none!important;opacity:1!important;font-style:normal;text-shadow:0 0 1px rgba(224,159,0,.55)}
html body:not(#tdx) .td-pdp-chips a[href="#reviews"] svg,html body:not(#tdx) svg.fill-warning,html body:not(#tdx) svg[class*="fill-warning"]{fill:#f5b50a!important;color:#f5b50a!important;stroke:#f5b50a!important}
html body:not(#tdx) .td-pdp-chips a[href="#reviews"]::before,html body:not(#tdx) .td-pdp-chips a[href="#reviews"]::after{color:#f5b50a!important}
/* the star wrapper is NOT a chip: no box, no padding, no border */
html body:not(#tdx) .td-pdp-chips span.td-gold-star,html body:not(#tdx) span.td-gold-star[data-gold]{display:inline!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important;border-radius:0!important;min-height:0!important;height:auto!important;width:auto!important;font:inherit!important;line-height:inherit!important;letter-spacing:inherit!important;text-transform:none!important;backdrop-filter:none!important;outline:0!important;flex:none!important}

/* ======== v17.47: (1) remove the "Save ... (x%)" badge, (2) product video thumbnail comes FIRST in the gallery strip ======== */
html body:not(#tdx) .td-buy-save,html body:not(#tdx) .td-buy-card .td-buy-save{display:none!important}
html body:not(#tdx) .td-vid-tile{order:-1!important}
html body:not(#tdx) .td-gallery-box ~ div.flex{scroll-snap-type:x proximity}

/* ======== v17.48: remove the "Sold and delivered by ... Files are stored privately ..." note from the buy card ======== */
html body:not(#tdx) .td-buy-card p.border-t.pt-4,html body:not(#tdx) .td-buy-card>p.border-t,html body:not(#tdx) .td-buy>.td-buy-card p.text-xs.text-muted-foreground.border-t{display:none!important}

