/* cart.css — CartDrawer · Hornitos del Cruce
   Scoped to #hc-overlay and #hc-drawer; no external dependencies */

/* Skip link — accesibilidad WCAG 2.4.1 */
.skip-link {
  position: absolute; left: -9999px; top: 4px; z-index: 9999;
  background: #91401D; color: #fff;
  padding: 8px 16px; border-radius: 4px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  transition: left .1s;
}
.skip-link:focus { left: 4px; }

/* Overlay */
#hc-overlay {
  position: fixed; inset: 0;
  background: rgba(10,6,3,.55);
  z-index: 399;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
#hc-overlay.open { opacity: 1; pointer-events: all; }

/* Drawer */
#hc-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100vw;
  background: #1A110A; z-index: 400;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 48px rgba(0,0,0,.5);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.25,.46,.45,.94);
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #EDDDC9;
  -webkit-font-smoothing: antialiased;
}
#hc-drawer.open { transform: translateX(0); }
#hc-drawer *, #hc-drawer *::before, #hc-drawer *::after { box-sizing: border-box; margin: 0; padding: 0; }
#hc-drawer a { text-decoration: none; color: inherit; }
#hc-drawer button { cursor: pointer; font-family: inherit; }

/* Header */
.hc-dh {
  padding: 16px 24px 14px;
  border-bottom: 1px solid rgba(237,221,201,.12);
  flex-shrink: 0;
}
.hc-dh-brand {
  font-size: 8px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(237,221,201,.32); margin-bottom: 10px;
}
.hc-dh-rule-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.hc-dh-rule {
  flex: 1; height: 1px; background: rgba(237,221,201,.18);
}
.hc-dh-eyebrow {
  font-size: 8px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(237,221,201,.5); white-space: nowrap;
}
.hc-dh-bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
}
.hc-dh-date-lbl {
  font-size: 8px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(237,221,201,.28); margin-bottom: 2px;
}
.hc-dh-date { font-family: monospace; font-size: 12px; color: rgba(237,221,201,.55); }
.hc-dh-close {
  font-size: 22px; color: rgba(237,221,201,.3); line-height: 1;
  background: none; border: none; padding: 2px 4px;
  transition: color .12s;
}
.hc-dh-close:hover { color: #EDDDC9; }

/* Lines — área crema */
.hc-lines { flex: 1; overflow-y: auto; background: #F5EDE3; padding: 6px 0; }
.hc-lines::-webkit-scrollbar { width: 4px; }
.hc-lines::-webkit-scrollbar-track { background: transparent; }
.hc-lines::-webkit-scrollbar-thumb { background: #D8C4B4; border-radius: 2px; }
.hc-line {
  padding: 12px 20px; border-bottom: 1px solid #EDE0CE;
  display: flex; align-items: center; gap: 12px;
  background: #FDFAF7; transition: background .12s;
}
.hc-line:last-child { border-bottom: none; }
.hc-line:hover { background: #FBF5EE; }
.hc-line-thumb {
  width: 52px; height: 52px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  background: #EDE0CE; border: 1px solid #DDD0BC;
}
.hc-line-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-line-num { display: none; }
.hc-line-body { flex: 1; min-width: 0; }
.hc-line-name {
  font-family: 'Young Serif', 'Georgia', serif;
  font-size: 14px; color: #1A110A; line-height: 1.2; margin-bottom: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-line-meta { font-size: 10px; color: #A08060; margin-bottom: 8px; }
.hc-line-qty { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.hc-qty-dec {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1.5px solid #C4A98A; background: transparent;
  font-size: 17px; line-height: 1; font-weight: 400; color: #7A5C3A;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: border-color .12s, color .12s, background .12s;
}
.hc-qty-dec:hover { border-color: #91401D; color: #91401D; background: rgba(145,64,29,.06); }
.hc-qty-inc {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1.5px solid #91401D; background: #91401D;
  font-size: 17px; line-height: 1; font-weight: 400; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .12s, border-color .12s;
}
.hc-qty-inc:hover { background: #7A3518; border-color: #7A3518; }
.hc-qty-val {
  min-width: 22px; text-align: center;
  font-family: 'Young Serif', Georgia, serif;
  font-size: 16px; color: #1A110A; line-height: 1;
}
.hc-qty-unit { font-size: 9.5px; color: #A08060; white-space: nowrap; }
.hc-line-uprice { font-size: 10px; color: #A08060; margin-top: 2px; }

.hc-line-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  padding-top: 2px; margin-left: 8px; flex-shrink: 0;
}
.hc-line-price {
  font-family: 'Young Serif', 'Georgia', serif;
  font-size: 15px; color: #1A110A; white-space: nowrap;
}
.hc-line-remove {
  font-size: 9.5px; color: #C4A98A; font-weight: 500;
  background: none; border: none; padding: 0; cursor: pointer;
  transition: color .12s;
}
.hc-line-remove:hover { color: #91401D; }

/* Delivery toggle */
.hc-delivery {
  padding: 12px 24px; border-bottom: 1px solid rgba(237,221,201,.1);
  display: flex; align-items: center; gap: 0; flex-shrink: 0;
}
.hc-del-opt {
  flex: 1; padding: 8px 12px;
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
  text-align: center; border-radius: 4px;
  background: none; border: none;
  transition: background .12s, color .12s;
}
.hc-del-opt.hc-active { background: #EDDDC9; color: #1A110A; }
.hc-del-opt:not(.hc-active) { color: rgba(237,221,201,.4); }

.hc-del-dispatch {
  font-size: 10.5px; color: rgba(237,221,201,.52); line-height: 1.5;
  padding: 8px 24px 10px; border-bottom: 1px solid rgba(237,221,201,.1);
  flex-shrink: 0;
}

/* Resume */
.hc-resume {
  padding: 14px 24px 18px; border-top: 1px solid rgba(237,221,201,.12); flex-shrink: 0;
}
.hc-dots {
  font-family: monospace; font-size: 9px; letter-spacing: .18em;
  color: rgba(237,221,201,.18); margin-bottom: 12px;
  overflow: hidden; white-space: nowrap;
}
.hc-resume-total-row {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px;
}
.hc-resume-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(237,221,201,.4);
}
.hc-resume-total {
  font-family: 'Young Serif', 'Georgia', serif;
  font-size: 34px; color: #EDDDC9; line-height: 1;
}
.hc-resume-sub { font-size: 11px; color: rgba(237,221,201,.35); margin-bottom: 16px; }
.hc-btn-confirm {
  display: block; width: 100%;
  background: #91401D; color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  padding: 14px 24px; border-radius: 6px; text-align: center;
  border: none; margin-bottom: 10px;
  transition: background .15s;
}
.hc-btn-confirm:hover { background: #7a3518; }
.hc-microcopy {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 10px; color: rgba(237,221,201,.38); line-height: 1.55;
}
.hc-microcopy::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: #91401D; flex-shrink: 0; margin-top: 4px;
}
.hc-microcopy strong { color: rgba(237,221,201,.62); font-weight: 600; }

/* Empty state */
.hc-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px; text-align: center; gap: 14px;
}
.hc-empty-text {
  font-family: 'Young Serif', 'Georgia', serif;
  font-size: 20px; color: rgba(237,221,201,.7); font-style: italic;
}
.hc-empty-link {
  font-size: 13px; font-weight: 600; color: #c47a4a;
  transition: color .12s;
}
.hc-empty-link:hover { color: #EDDDC9; }

/* Cart button shared style (injected into each page nav) */
.hc-nav-btn {
  border: 1.5px solid rgba(26,17,10,.2); color: #1A110A;
  font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 5px;
  background: transparent; cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.hc-nav-btn:hover { border-color: #1A110A; background: rgba(26,17,10,.04); }
.hc-nav-btn--old {
  font-size: 0.85rem; padding: 0.4rem 0.9rem;
  border-radius: 4px; border-color: rgba(28,15,6,.2); color: #1C0F06;
}
.hc-nav-btn--old:hover { border-color: #8B2810; color: #8B2810; }

@media (max-width: 768px) {
  .hc-nav-btn--old { margin-left: auto; }
}

@media (max-width: 480px) {
  #hc-drawer { width: 100vw; }
}
