/* The bag panel. Values read off "Bag v2" (d1: 480px slide-over; m1–m3: full 390 × 844 sheet). */

.dv-bagd { position: fixed; inset: 0; z-index: 1200; visibility: hidden; pointer-events: none; }
.dv-bagd.is-open { visibility: visible; pointer-events: auto; }
.dv-bagd__veil { position: absolute; inset: 0; background: rgba(28,20,17,.5); opacity: 0; transition: opacity .3s ease; }
.dv-bagd.is-open .dv-bagd__veil { opacity: 1; }
.dv-bagp { position: absolute; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100%; background: #FDF9F4; border-radius: 28px 0 0 28px; box-shadow: -30px 0 80px -40px rgba(28,20,17,.75); display: flex; flex-direction: column; transform: translateX(104%); transition: transform .34s cubic-bezier(.22,.8,.26,1), visibility 0s .34s; font-family: 'Jost', sans-serif; color: #241D18; line-height: 1.5; }
.dv-bagd.is-open .dv-bagp { transform: none; transition: transform .34s cubic-bezier(.22,.8,.26,1); }
.dv-bagp.is-busy .dv-bagp__lines, .dv-bagp.is-busy .dv-bagp__foot { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
.dv-bagp a { color: inherit; text-decoration: none; }
.dv-bagp button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.dv-bagp p { margin: 0; }
html.dv-bag-lock, html.dv-bag-lock body { overflow: hidden; }

.dv-bagp__head { padding: 28px 30px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dv-bagp__head > div { display: flex; align-items: baseline; gap: 12px; }
.dv-bagp__title { font-family: 'Marcellus', serif; font-size: 30px; line-height: 1; color: #241D18; }
.dv-bagp__count { font-size: 13px; font-weight: 300; color: #6F6158; }
.dv-bagp .dv-bagp__close { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #F3E9DB; box-shadow: inset 0 0 0 1px rgba(156,107,60,.34); display: flex; align-items: center; justify-content: center; }
.dv-bagp__rule { padding: 0 30px; display: flex; align-items: center; gap: 10px; }
.dv-bagp__rule span { flex: 1; height: 3px; border-top: 1px solid rgba(156,107,60,.34); border-bottom: 1px solid rgba(156,107,60,.34); }
.dv-bagp__rule i { width: 6px; height: 6px; flex: 0 0 auto; background: #9C6B3C; opacity: .55; transform: rotate(45deg); }

.dv-bagp__lines { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 6px 30px 10px; overscroll-behavior: contain; }
.dv-bagp__lines::-webkit-scrollbar { display: none; }
.dv-bagp__line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 1px solid #EFE3D3; }
.dv-bagp__mount { display: block; position: relative; background: #F3E9DB; border-radius: 12px; aspect-ratio: 3 / 4; align-self: start; }
.dv-bagp__mount img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-fit: contain; border-radius: 8px; }
.dv-bagp__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; gap: 12px; }
.dv-bagp__top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.dv-bagp__top > div:first-child { min-width: 0; }
.dv-bagp__kind { font-size: 10px; letter-spacing: .22em; color: #7A2233; }
.dv-bagp__name { display: block; font-family: 'Marcellus', serif; font-size: 18px; line-height: 1.2; color: #241D18; margin-top: 5px; }
.dv-bagp__meta { font-size: 13px; font-weight: 300; line-height: 1.45; color: #6F6158; margin-top: 4px; }
.dv-bagp__prices { text-align: right; flex: 0 0 auto; }
.dv-bagp__price { font-family: 'Marcellus', serif; font-size: 18px; color: #7A2233; }
.dv-bagp__mrp { font-size: 12px; font-weight: 300; color: #6F6158; text-decoration: line-through; margin-top: 3px; }
.dv-bagp__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dv-bagp__step { display: inline-flex; align-items: center; border: 1px solid #E4D6C2; border-radius: 999px; background: #FFFFFF; }
.dv-bagp .dv-bagp__step button { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 999px; transition: background .2s ease; }
.dv-bagp .dv-bagp__step button:hover { background: #F3E9DB; }
.dv-bagp .dv-bagp__step button:disabled { opacity: .3; cursor: default; background: none; }
.dv-bagp__step > span { min-width: 22px; text-align: center; font-size: 14px; font-weight: 500; color: #241D18; }
.dv-bagp .dv-bagp__remove { font-size: 12px; color: #6F6158; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.dv-bagp .dv-bagp__remove:hover { color: #7A2233; }

.dv-bagp__foot { padding: 18px 30px 28px; border-top: 1px solid #EFE3D3; display: flex; flex-direction: column; gap: 16px; background: #FDF9F4; }
.dv-bagp__tick { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3A312B; }
.dv-bagp__tick svg { flex: 0 0 auto; }
.dv-bagp__total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 14px; border-top: 1px solid #EFE3D3; }
.dv-bagp__total > div { display: flex; flex-direction: column; gap: 3px; }
.dv-bagp__total span { font-size: 13px; color: #241D18; }
.dv-bagp__total small { font-size: 12px; font-weight: 300; color: #6F6158; }
.dv-bagp__total b { font-family: 'Marcellus', serif; font-weight: 400; font-size: 28px; line-height: 1; color: #7A2233; }
.dv-bagp .dv-bagp__cta { display: block; text-align: center; font-size: 15px; font-weight: 500; background: #7A2233; color: #FDF9F4; padding: 19px 26px; border-radius: 999px; box-shadow: 0 16px 32px -18px rgba(122,34,51,.8); transition: transform .22s ease, background .22s ease; }
.dv-bagp .dv-bagp__cta:hover { background: #8E2A3C; transform: translateY(-2px); }
.dv-bagp__pay { text-align: center; font-size: 12px; font-weight: 300; color: #6F6158; }

.dv-bagp__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 36px 80px; text-align: center; }
.dv-bagp__empty-title { font-family: 'Marcellus', serif; font-size: 26px; line-height: 1.15; color: #241D18; }
.dv-bagp__empty p { font-size: 14px; font-weight: 300; line-height: 1.6; color: #6B5C55; max-width: 300px; }
.dv-bagp__empty > div:last-child { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.dv-bagp__empty a { font-size: 13px; font-weight: 500; color: #241D18; border: 1px solid #241D18; padding: 13px 22px; border-radius: 999px; transition: background .2s ease; }
.dv-bagp__empty a:hover { background: #F3E9DB; }
.dv-bagp__error { margin: 10px 30px 0; font-size: 13px; color: #7A2233; }

/* /cart/ fallback: the same panel, in the page flow */
.dv-bagpage { max-width: 1360px; margin: 0 auto; padding: 26px 52px 76px; display: flex; justify-content: center; }
.dv-bagpage .dv-bagp { position: static; transform: none; width: 560px; min-height: 520px; border-radius: 28px; box-shadow: inset 0 0 0 1px rgba(156,107,60,.34); background: #FFFFFF; }
.dv-bagpage .dv-bagp__foot { background: none; border-radius: 0 0 28px 28px; }
.dv-bagpage .dv-bagp__lines { overflow: visible; }

@media (max-width: 900px) {
	.dv-bagp { width: 100%; border-radius: 0; box-shadow: none; }
	.dv-bagp__head { padding: 16px 16px 12px; gap: 12px; }
	.dv-bagp__head > div { gap: 10px; }
	.dv-bagp__title { font-size: 24px; }
	.dv-bagp__count { font-size: 12px; }
	.dv-bagp .dv-bagp__close { width: 40px; height: 40px; }
	.dv-bagp__rule { padding: 0 16px; }
	.dv-bagp__lines { padding: 2px 16px 8px; }
	.dv-bagp__line { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
	.dv-bagp__mount img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
	.dv-bagp__body { gap: 10px; }
	.dv-bagp__top { gap: 10px; }
	.dv-bagp__kind { font-size: 9px; }
	.dv-bagp__name { font-size: 16px; margin-top: 4px; }
	.dv-bagp__meta { font-size: 12px; margin-top: 3px; }
	.dv-bagp__price { font-size: 16px; }
	.dv-bagp__mrp { font-size: 11px; margin-top: 2px; }
	.dv-bagp__row { gap: 10px; }
	.dv-bagp .dv-bagp__step button { width: 44px; height: 44px; }
	.dv-bagp__step > span { min-width: 20px; }
	.dv-bagp .dv-bagp__remove { padding: 12px 0; }
	.dv-bagp__foot { padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); gap: 13px; }
	.dv-bagp__tick { gap: 7px; font-size: 12px; }
	.dv-bagp__tick svg { width: 13px; height: 13px; }
	.dv-bagp__total { gap: 10px; padding-top: 12px; }
	.dv-bagp__total > div { gap: 2px; }
	.dv-bagp__total span { font-size: 12px; }
	.dv-bagp__total small { font-size: 11px; }
	.dv-bagp__total b { font-size: 24px; }
	.dv-bagp .dv-bagp__cta { font-size: 14px; padding: 16px 20px; }
	.dv-bagp .dv-bagp__cta:hover { transform: none; }
	.dv-bagp__pay { font-size: 11px; }
	.dv-bagp__empty { gap: 12px; padding: 30px 28px 90px; }
	.dv-bagp__empty-title { font-size: 22px; }
	.dv-bagp__empty p { font-size: 13px; max-width: 260px; }
	.dv-bagp__empty > div:last-child { margin-top: 8px; }
	.dv-bagp__empty a { padding: 13px 20px; }
	.dv-bagp__error { margin: 8px 16px 0; }
	.dv-bagpage { padding: 8px 0 24px; }
	.dv-bagpage .dv-bagp { width: 100%; min-height: 60vh; border-radius: 0; box-shadow: none; background: #FDF9F4; }
}
@media (prefers-reduced-motion: reduce) { .dv-bagp, .dv-bagd__veil { transition: none !important; } }

/* Owner-requested (20 Sep 2026): a way back that is as visible as the way forward */
.dv-bagp .dv-bagp__continue { align-self: center; font-size: 13px; font-weight: 500; color: #241D18; text-decoration: underline; text-underline-offset: 4px; padding: 2px 8px; margin-top: -4px; }
.dv-bagp .dv-bagp__continue:hover { color: #7A2233; }

/* Phone quick-add: a small confirmation above the tab bar, not the full sheet — she is mid-browse */
.dv-bagtoast { position: fixed; left: 14px; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: flex; align-items: center; gap: 12px; background: #241D18; color: #FDF9F4; border-radius: 18px; padding: 10px 10px 10px 12px; font-family: 'Jost', sans-serif; box-shadow: inset 0 0 0 1px rgba(212,175,120,.5), 0 18px 36px -12px rgba(28,20,17,.6); transform: translateY(30px); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.9,.25,1), opacity .25s ease; }
.dv-bagtoast.is-on { transform: none; opacity: 1; pointer-events: auto; }
.dv-bagtoast img { width: 36px; height: 48px; object-fit: contain; border-radius: 7px; background: #F3E9DB; flex: 0 0 auto; }
.dv-bagtoast div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dv-bagtoast b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-bagtoast small { font-size: 11px; font-weight: 300; color: #E5D5C7; }
.dv-bagtoast button { flex: 0 0 auto; border: 0; font: inherit; font-size: 13px; font-weight: 500; background: #FDF9F4; color: #241D18; padding: 11px 16px; border-radius: 999px; cursor: pointer; }
body:has(.dv-bagtoast.is-on) .dv-wa { opacity: 0; pointer-events: none; }
