/* Rug Kingdom: bag drawer + /checkout/cart redesign (BUILD.md "Bag + drawer redesign", 2 Oct 2026).
   Clean white DENISA skin. Patterns from Kinky Beds BUILD §20/§21 (pill stepper, line total + "each",
   quiet Remove, sticky mobile Checkout bar), restyled for RK: ink #111, muted #5c5c5c, hairline #e6e6e6,
   Playfair display + DM Sans, rug-ratio (5:7) imagery on #f5f2ed.
   Loaded on every page (Magento_Checkout/layout/default.xml). Selectors are doubled/ID-prefixed to beat the
   inherited Encore/KB !important rules in rk-components.css, el-bag.css and el-cart-r18.css. */

/* ---------- Pill qty stepper (drawer + bag): 36px pill, 44px tap targets ---------- */
html body#html-body.rk-site .rk-step {
  display: inline-flex; align-items: center; height: 36px; min-height: 0; padding: 0; gap: 0;
  border: 1px solid #d6d6d6; border-radius: 999px; background: #fff; box-shadow: none; flex: 0 0 auto;
}
html body#html-body.rk-site .rk-step button.rk-step__btn {
  position: relative; width: 38px; height: 34px; min-width: 0 !important; min-height: 0 !important; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center; border: 0 !important; border-radius: 999px !important;
  background: transparent !important; color: #111 !important; box-shadow: none !important; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* invisible hit area: 44 x 44 around each 38 x 34 button */
html body#html-body.rk-site .rk-step button.rk-step__btn::after { content: ""; position: absolute; inset: -5px -3px; }
@media (hover: hover) { html body#html-body.rk-site .rk-step button.rk-step__btn:hover:not(:disabled) { background: #f5f2ed !important; } }
html body#html-body.rk-site .rk-step button.rk-step__btn:focus-visible { outline: 2px solid #111; outline-offset: 1px; }
html body#html-body.rk-site .rk-step button.rk-step__btn:disabled { color: #c4c4c4 !important; cursor: default; }
html body#html-body.rk-site .rk-step button.rk-step__btn svg { stroke: currentColor !important; }
html body#html-body.rk-site .rk-step .rk-step__val,
html body#html-body.rk-site .rk-step input.rk-step__input {
  width: 28px !important; min-width: 0 !important; height: 34px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline-offset: -2px;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font: 500 14px/34px var(--rk-sans, "DM Sans", Arial, sans-serif) !important; color: #111 !important; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
html body#html-body.rk-site .rk-step input.rk-step__input::-webkit-outer-spin-button,
html body#html-body.rk-site .rk-step input.rk-step__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Drawer ---------- */
html body#html-body.rk-site #cart-drawer .dn-drawer__head { padding: .875rem 1.25rem; min-height: 0; }
html body#html-body.rk-site #cart-drawer .dn-drawer__title { font-size: 1.5rem !important; line-height: 1.2; }
html body#html-body.rk-site #cart-drawer .dn-drawer__count { font-size: .9375rem; color: #5c5c5c; margin-left: .375rem; vertical-align: 2px; font-variant-numeric: tabular-nums; }
html body#html-body.rk-site #cart-drawer .rkd-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0 1.25rem .5rem; list-style: none; }
html body#html-body.rk-site #cart-drawer .dn-line.rkd-line {
  display: grid !important; grid-template-columns: 104px minmax(0, 1fr); gap: 1rem; align-items: start;
  padding: 1.125rem 0 !important; border-bottom: 1px solid #e6e6e6 !important; transition: opacity .2s;
}
html body#html-body.rk-site #cart-drawer .dn-line.rkd-line:last-child { border-bottom: 0 !important; }
html body#html-body.rk-site #cart-drawer .rkd-line.is-busy { opacity: .5; pointer-events: none; }
html body#html-body.rk-site #cart-drawer .rkd-line__img { display: block; width: 104px; aspect-ratio: 5 / 7; background: #f5f2ed; overflow: hidden; }
html body#html-body.rk-site #cart-drawer .rkd-line__img img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; border: 0 !important; background: #f5f2ed !important; }
html body#html-body.rk-site #cart-drawer .rkd-line__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
html body#html-body.rk-site #cart-drawer .rkd-line__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
html body#html-body.rk-site #cart-drawer .rkd-line__name {
  margin: 0; font-size: .9375rem; line-height: 1.35; font-weight: 400; color: #111 !important; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html body#html-body.rk-site #cart-drawer a.rkd-line__name:hover { text-decoration: underline; text-underline-offset: 3px; }
html body#html-body.rk-site #cart-drawer .rkd-line__price { margin: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: 0 0 auto; }
html body#html-body.rk-site #cart-drawer .rkd-line__total, html body#html-body.rk-site #cart-drawer .rkd-line__total .price { font-size: .9375rem !important; font-weight: 500 !important; color: #111 !important; white-space: nowrap; }
html body#html-body.rk-site #cart-drawer .rkd-line__each, html body#html-body.rk-site #cart-drawer .rkd-line__each .price { font-size: .75rem !important; font-weight: 400 !important; color: #5c5c5c !important; white-space: nowrap; margin-top: .125rem; }
html body#html-body.rk-site #cart-drawer .rkd-line__opts { margin: 0; font-size: .8125rem; line-height: 1.4; color: #5c5c5c; }
html body#html-body.rk-site #cart-drawer .rkd-line__sku { display: block; }
html body#html-body.rk-site #cart-drawer .rkd-line__row { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
html body#html-body.rk-site #cart-drawer button.rkd-line__remove,
html body#html-body.rk-site.checkout-cart-index .el-cart-items .el-cart-item .item-actions button.el-cart-remove.rkb-remove {
  display: inline-flex !important; align-items: center; min-height: 44px !important; height: auto !important; margin: -4px 0 !important; padding: 0 .25rem !important;
  background: none !important; border: 0 !important; box-shadow: none !important; width: auto !important;
  font-size: .8125rem !important; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important;
  color: #5c5c5c !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c4c4c4; cursor: pointer;
}
html body#html-body.rk-site #cart-drawer button.rkd-line__remove:hover,
html body#html-body.rk-site.checkout-cart-index .el-cart-items .el-cart-item .item-actions button.el-cart-remove.rkb-remove:hover { color: #111 !important; text-decoration-color: #111; }

/* compact sticky footer */
html body#html-body.rk-site #cart-drawer .dn-drawer__foot.rkd-foot {
  flex: 0 0 auto; position: sticky; bottom: 0; z-index: 2; background: #fff;
  border-top: 1px solid #e6e6e6; box-shadow: 0 -10px 18px -14px rgba(0,0,0,.25);
  padding: .875rem 1.25rem calc(.5rem + env(safe-area-inset-bottom, 0px));
}
html body#html-body.rk-site #cart-drawer .rkd-foot__sub { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 1rem; font-weight: 500; color: #111; }
html body#html-body.rk-site #cart-drawer .rkd-foot__sub dd, html body#html-body.rk-site #cart-drawer .rkd-foot__sub .price { margin: 0; font-size: 1rem !important; font-weight: 500 !important; color: #111 !important; }
html body#html-body.rk-site #cart-drawer .rkd-foot__ship { display: flex; align-items: center; gap: .4rem; margin: .25rem 0 .75rem; font-size: .8125rem; color: #5c5c5c; }
html body#html-body.rk-site #cart-drawer .rkd-foot__ship svg { flex: 0 0 auto; color: #111; }
html body#html-body.rk-site #cart-drawer .rkd-foot__ctas { display: flex; flex-direction: column; gap: 0; }
html body#html-body.rk-site .rkd-btn,
html body#html-body.rk-site #cart-drawer .dn-drawer__btn.rkd-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; min-height: 48px; padding: 0 1rem;
  font-size: .8125rem !important; font-weight: 500 !important; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-radius: 0;
}
html body#html-body.rk-site .rkd-btn--primary,
html body#html-body.rk-site #cart-drawer .dn-drawer__btn--primary.rkd-btn { background: #111 !important; color: #fff !important; border: 1px solid #111 !important; }
html body#html-body.rk-site .rkd-btn--primary:hover { background: #2a2a2a !important; }
html body#html-body.rk-site #cart-drawer .rkd-foot__bag {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: .125rem;
  font-size: .875rem; color: #111; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c4c4c4;
}
html body#html-body.rk-site #cart-drawer .rkd-foot__bag:hover { text-decoration-color: #111; }
html body#html-body.rk-site #cart-drawer .rkd-foot__ctas > div:empty { display: none; }

/* empty state */
html body#html-body.rk-site #cart-drawer .rkd-empty { padding: 2.5rem 1.5rem; gap: 0; }
html body#html-body.rk-site #cart-drawer .rkd-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 999px; background: #f5f2ed; color: #111; margin-bottom: 1.25rem; }
html body#html-body.rk-site #cart-drawer .rkd-empty .dn-drawer__empty-copy { max-width: 18rem; line-height: 1.5; }
html body#html-body.rk-site #cart-drawer .rkd-empty__links { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: .25rem 1.25rem; justify-content: center; flex-wrap: wrap; }
html body#html-body.rk-site #cart-drawer .rkd-empty__links a { display: inline-flex; min-height: 44px; align-items: center; font-size: .875rem; color: #111; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #c4c4c4; }
html body#html-body.rk-site #cart-drawer .rkd-assure { margin-top: 1.25rem; color: #5c5c5c; }

/* ---------- Bag page (/checkout/cart) ---------- */
html body#html-body.rk-site.checkout-cart-index .rkb-title {
  margin: .5rem 0 1.25rem; text-align: left; font-family: var(--rk-serif, "Playfair Display", Georgia, serif) !important;
  font-size: 1.875rem !important; font-weight: 400 !important; line-height: 1.15; color: #111;
}
html body#html-body.rk-site.checkout-cart-index .rkb-title__count { font-family: var(--rk-sans, "DM Sans", Arial, sans-serif); font-size: 1rem; color: #5c5c5c; vertical-align: 4px; margin-left: .25rem; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { html body#html-body.rk-site.checkout-cart-index .rkb-title { font-size: 2.25rem !important; margin: 1rem 0 2rem; } }

html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table > ul,
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table > ul > li {
  padding: 1.25rem 0 !important; border: 0 !important; border-bottom: 1px solid #e6e6e6 !important; background: none !important;
}
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table > ul > li:first-child { border-top: 1px solid #e6e6e6 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items .el-cart-item.rkb-line {
  display: grid !important; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem !important; align-items: start;
  padding: 0 !important; margin: 0 !important; background: #fff !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  transition: opacity .2s;
}
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-item.rkb-line.is-busy { opacity: .5; pointer-events: none; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__media {
  display: block; width: 112px !important; height: auto !important; aspect-ratio: 5 / 7; overflow: hidden; background: #f5f2ed !important; border: 0 !important; padding: 0 !important; margin: 0 !important;
}
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__media img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; display: block; mix-blend-mode: normal !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__name, html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__name a {
  margin: 0; font-family: var(--rk-sans, "DM Sans", Arial, sans-serif) !important; font-size: .9375rem !important; line-height: 1.35 !important; font-weight: 400 !important; color: #111 !important; text-decoration: none;
}
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__price { margin: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: 0 0 auto; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__total, html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__total .price { font-size: .9375rem !important; font-weight: 500 !important; color: #111 !important; white-space: nowrap; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__each, html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__each .price { font-size: .75rem !important; font-weight: 400 !important; color: #5c5c5c !important; white-space: nowrap; margin-top: .125rem; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__opts { margin: 0; font-size: .8125rem; line-height: 1.4; color: #5c5c5c; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__row { display: flex; align-items: center; gap: 1rem; margin-top: .625rem; }
html body#html-body.rk-site.checkout-cart-index .rkb .dn-bagline__qty { margin: 0 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__actions { display: flex; align-items: center; gap: 0; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__actions > :not(.el-cart-remove) { display: none !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__msg { font-size: .8125rem; margin-top: .25rem; }
html body#html-body.rk-site.checkout-cart-index .rkb .actions-toolbar.cart { display: none !important; } /* the stepper posts the form; the "Update Shopping Cart" button stays in the DOM */
@media (min-width: 768px) {
  html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items .el-cart-item.rkb-line { grid-template-columns: 140px minmax(0, 1fr); gap: 1.5rem !important; }
  html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__media { width: 140px !important; }
  html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table > ul,
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb .el-cart-items #shopping-cart-table > ul > li { padding: 1.5rem 0 !important; }
  html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__name, html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__name a { font-size: 1rem !important; }
  html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__total, html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__total .price { font-size: 1rem !important; }
}

/* summary: white, hairline, Playfair title, black Checkout */
html body#html-body.rk-site.checkout-cart-index .el-cart-summary.rkb-summary {
  background: #fff !important; border: 1px solid #e6e6e6 !important; padding: 1.25rem !important; border-radius: 0 !important; box-shadow: none !important;
}
@media (min-width: 1024px) { html body#html-body.rk-site.checkout-cart-index .el-cart-summary.rkb-summary { padding: 1.75rem !important; } }
html body#html-body.rk-site.checkout-cart-index .rkb-summary .rkb-summary__title { font-family: var(--rk-serif, "Playfair Display", Georgia, serif) !important; font-size: 1.375rem !important; font-weight: 400 !important; margin: 0 0 .25rem; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary * { border-color: #e6e6e6 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary .coupon-form summary { font-weight: 400 !important; font-size: .875rem; color: #111; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c4c4c4; min-height: 44px; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary #checkout-link-button {
  display: flex; align-items: center; justify-content: center; height: 52px; min-height: 52px; border-radius: 0 !important;
  background: #111 !important; color: #fff !important; border: 1px solid #111 !important;
  font-size: .8125rem !important; font-weight: 500 !important; letter-spacing: .12em; text-transform: uppercase;
}
html body#html-body.rk-site.checkout-cart-index .rkb-summary #checkout-link-button:hover { background: #2a2a2a !important; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary .el-cart-assure ul { display: grid; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary .el-cart-assure li { display: flex; align-items: center; gap: .5rem; color: #333 !important; }
html body#html-body.rk-site.checkout-cart-index .rkb-summary .el-cart-assure a { color: #333 !important; text-decoration: none; }

/* empty bag page */
html body#html-body.rk-site.checkout-cart-index .rkb-empty { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0 3rem; }
html body#html-body.rk-site.checkout-cart-index .rkb-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 999px; background: #f5f2ed; color: #111; margin-bottom: 1.25rem; }
html body#html-body.rk-site.checkout-cart-index .rkb-empty ~ * { text-align: initial; }
html body#html-body.rk-site.checkout-cart-index .cart-empty-page .rkb-title, html body#html-body.rk-site.checkout-cart-index h1.rkb-title:has(+ .rkb-empty) { text-align: center; }

/* mobile sticky Checkout bar (below 1024px, only while the real button is off screen) */
html body#html-body.rk-site .rkb-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid #e6e6e6;
  box-shadow: 0 -10px 18px -14px rgba(0,0,0,.25); padding: .625rem 1rem calc(.625rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .2s ease-out;
}
html body#html-body.rk-site .rkb-sticky.is-on { transform: none; }
html body#html-body.rk-site .rkb-sticky[hidden] { display: none; }
html body#html-body.rk-site .rkb-sticky__in { display: flex; align-items: center; gap: 1rem; max-width: 40rem; margin: 0 auto; }
html body#html-body.rk-site .rkb-sticky__total { margin: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 1rem; font-weight: 500; color: #111; white-space: nowrap; }
html body#html-body.rk-site .rkb-sticky__k { font-size: .75rem; font-weight: 400; color: #5c5c5c; }
html body#html-body.rk-site .rkb-sticky__btn {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; height: 48px; background: #111; color: #fff !important; text-decoration: none;
  font-size: .8125rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
html body#html-body.rk-site.rkb-sticky-on { padding-bottom: 76px; }
@media (min-width: 1024px) { html body#html-body.rk-site .rkb-sticky { display: none !important; } }
@media (prefers-reduced-motion: reduce) { html body#html-body.rk-site .rkb-sticky, html body#html-body.rk-site .rkd-line, html body#html-body.rk-site .rkb-line { transition: none; } }
html body#html-body.rk-site.checkout-cart-index .rkb-empty .el-r20-empty__title { font-family: var(--rk-serif, "Playfair Display", Georgia, serif) !important; font-weight: 400 !important; font-size: 1.625rem !important; }
/* name + size stack on the left, line total (+ "each") on the right */
html body#html-body.rk-site #cart-drawer .rkd-line__info,
html body#html-body.rk-site.checkout-cart-index .rkb .rkb-line__info { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: .25rem; }
