/*!
 * DreamTheme Core — styles for the WooCommerce front-end modules that main.css does not already have
 * (form fields, loading states, variation states, link styles, sticky add to cart, inline checkout, FBT on the product page).
 * Uses theme tokens only.
 */

/* Form fields (same as the approved preview) */
.fld{display:grid;gap:6px;min-width:0}
.fld label{font-size:12px;font-weight:700}
.fld input,.fld textarea,.fld select{border:1px solid var(--line);border-radius:var(--rad);padding:11px 12px;background:var(--bg);outline:none;width:100%;min-width:0}
.fld input:focus,.fld textarea:focus,.fld select:focus{border-color:var(--pri)}
.fld .err,.co .err{color:var(--sale);font-size:12px}
.fld.bad input,.fld.bad textarea,.fld.bad select,.fld.bad .ap-ph,.fld.bad .ap-pw{border-color:var(--sale)}
.ap .fld .ap-ph input,.ap .fld .ap-pw input,.co .fld .ap-ph input{padding:0 14px}

/* Busy / loading */
.dt-busy{opacity:.6;pointer-events:none;cursor:progress}
.citem.dt-busy{opacity:.45}
.dt-qv-load{min-height:260px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--ink-2);font-size:13px;padding:40px 20px}
.dt-spin{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--pri);animation:dtspin .8s linear infinite}
@keyframes dtspin{to{transform:rotate(360deg)}}
#qvBody.dt-loading .pv-wrap{opacity:.45;pointer-events:none;transition:opacity .2s}
.dt-shake{animation:dtshake .45s ease}
@keyframes dtshake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}

/* Product popup additions */
.pv-gal.dt-one{grid-template-columns:minmax(0,1fr)}
.pv-short p{margin:0}
.pv-short>*+*{margin-top:8px}
.pv-var button,.pv-sw button{position:relative;transition:opacity .2s,border-color .2s}
.pv-var button.dt-off{opacity:.5;text-decoration:line-through}
.pv-sw button.dt-off{opacity:.45}
.pv-sw button.dt-off::after{content:"";position:absolute;left:50%;top:-2px;bottom:-2px;width:2px;background:var(--sale);transform:translateX(-50%) rotate(45deg);border-radius:1px}
.pv-var button:disabled,.pv-sw button:disabled{opacity:.25;cursor:not-allowed}
.pv-btns .btn:disabled,.pv-sticky .btn:disabled,.pv-btns .btn.dt-off{opacity:.5;cursor:not-allowed;filter:grayscale(.4)}
.pv-links a{display:flex;align-items:center;gap:6px}
.pv-links a:hover{color:var(--pri)}
.pv-share a{padding:6px 12px;border-radius:20px;background:var(--soft);font-weight:700;font-size:12px}
.pv-share a:hover{background:var(--pri);color:var(--pri-ink)}
.pv-desc img{max-width:100%;height:auto;border-radius:var(--rad)}
.pv-desc iframe{max-width:100%}
.pv-desc ul,.pv-desc ol{margin:0;padding-left:20px;color:var(--ink-2)}
.pv-desc h2,.pv-desc h3,.pv-desc h4{margin:4px 0 0}
.rv-form .fld input,.rv-form .fld textarea{background:var(--surface)}
.fbt-item>a{display:block}

/* Account popup additions */
.ap [data-pane],.ap [data-mode-pane]{display:grid;gap:14px}
.ap [data-pane]{gap:18px}
.ap-stats a{padding:14px 6px;text-align:center;border-right:1px solid var(--line);display:block}
.ap-stats a:last-child{border-right:0}
.ap-grid a{display:grid;justify-items:center;gap:8px;padding:12px 4px;border-radius:12px;font-size:11px;font-weight:700;color:var(--ink);text-align:center;transition:background .2s}
.ap-grid a:hover{background:var(--soft)}
.ap-alt a{height:46px;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:13px;background:var(--surface);transition:border-color .2s}
.ap-alt a:hover{border-color:var(--pri)}
.ap-alt a svg.i{width:18px;height:18px;color:var(--pri)}
.ap-ph.dt-noprefix>span{display:none}
.ap-pw .dt-ap-send{width:auto;padding:0 14px;font-size:12px;font-weight:700;color:var(--pri);white-space:nowrap}
.ap-pw .dt-ap-send:disabled{color:var(--ink-2)}
.ap-row a{font-size:13px}

/* Checkout additions */
.co-it .n .dt-ck-qty{height:30px;width:fit-content;margin-top:6px;background:var(--surface)}
.co-it .n .dt-ck-qty button{width:28px}
.co-it .n .dt-ck-qty input{width:30px;font-size:13px}
.dt-ck-var{display:block;margin-top:6px;max-width:100%;height:34px;border:1px solid var(--line);border-radius:8px;padding:0 8px;background:var(--surface);font-size:13px}
.co-submit .btn>span{display:inline-flex;gap:6px;align-items:center}
.dt-ck-msg{padding:20px;border:1px solid var(--line);border-radius:12px;text-align:center;color:var(--ink-2)}
.dt-inline-checkout{margin-block:24px}
.dt-inline-checkout .co{border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--sh-card)}
.dt-inline-checkout .co-top{position:static}
.dt-inline-checkout .dt-qv-load{border:1px solid var(--line);border-radius:16px}
.dt-wallet-note{background:var(--soft);border-left:4px solid var(--pri);border-radius:var(--rad);padding:14px 16px;margin:0 0 20px}
.dt-wallet-note p{margin:0}

/* Frequently bought together on the product page */
.dt-fbt{margin-top:10px}
.dt-fbt-h{font-size:20px;margin-bottom:16px}

/* Sticky add to cart */
.dt-satc{position:fixed;left:0;right:0;bottom:0;z-index:140;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(17,24,39,.08);transform:translateY(110%);transition:transform .3s cubic-bezier(.2,.8,.2,1);padding-bottom:env(safe-area-inset-bottom,0px)}
.dt-satc.on{transform:none}
.dt-satc-in{display:flex;align-items:center;gap:14px;padding-block:10px}
.dt-satc img{width:46px;height:52px;object-fit:cover;border-radius:4px;flex:none}
.dt-satc .t{flex:1;min-width:0}
.dt-satc .t b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-h)}
.dt-satc .t .price{font-size:14px}
.dt-satc .btn{height:44px;white-space:nowrap}
.dt-satc .btn.order{background:var(--sale)}
body.dt-satc-on .wa{bottom:calc(92px + env(safe-area-inset-bottom,0px))}
body.dt-satc-on .totop{bottom:calc(164px + env(safe-area-inset-bottom,0px))}

@media (max-width:991px){
	body:has(.mbar) .dt-satc{bottom:calc(60px + env(safe-area-inset-bottom,0px));padding-bottom:0}
	body:has(.mbar).dt-satc-on .wa{bottom:calc(140px + env(safe-area-inset-bottom,0px))}
	body:has(.mbar).dt-satc-on .totop{bottom:calc(212px + env(safe-area-inset-bottom,0px))}
	body:has(.mbar) .dt-inline-checkout .co-submit{bottom:calc(60px + env(safe-area-inset-bottom,0px))}
	.dt-inline-checkout .co-sum{border-radius:0}
}
@media (max-width:640px){
	.dt-satc-in{gap:8px;padding-block:8px}
	.dt-satc img,.dt-satc .t{display:none}
	.dt-satc .btn{flex:1;min-width:0;padding:0 10px;font-size:12px}
	.dt-inline-checkout{margin-inline:-16px}
	.dt-inline-checkout .co{border-radius:0;border-inline:0}
}
