/* ═══════════════════════════════════════════════════════════════
   VividHome — Component Styles (Cart Drawer, Back-to-Top, Cookie)
   ═══════════════════════════════════════════════════════════════ */

/* ── Cart Drawer ── */
.vh-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 499;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.vh-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.vh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100%;
  z-index: 500;
  background: #fff;
  box-shadow: -8px 0 48px rgba(244,63,94,0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.vh-drawer.is-open { transform: translateX(0); }

.vh-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(244,63,94,0.1);
  flex-shrink: 0;
}
.vh-drawer-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vh-drawer-title svg { width: 20px; height: 20px; color: #f43f5e; }

.vh-drawer-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(244,63,94,0.08);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.vh-drawer-close:hover { background: rgba(244,63,94,0.18); }

.vh-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.vh-drawer-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--s-muted, #6b7280);
  font-size: 0.9rem;
}

.vh-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(244,63,94,0.07);
}
.vh-drawer-item:last-child { border-bottom: none; }

.vh-drawer-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(244,63,94,0.1);
  flex-shrink: 0;
}
.vh-drawer-item-info { flex: 1; min-width: 0; }
.vh-drawer-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e1b4b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vh-drawer-item-variant { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.vh-drawer-item-price { font-size: 0.88rem; font-weight: 700; color: #1e1b4b; white-space: nowrap; }
.vh-drawer-item-qty { font-size: 0.72rem; color: #9ca3af; margin-top: 3px; }

.vh-drawer-foot {
  padding: 18px 22px;
  border-top: 1px solid rgba(244,63,94,0.1);
  flex-shrink: 0;
  background: #fff5f6;
}
.vh-drawer-total {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 14px;
}
.vh-drawer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.vh-drawer-btn-outline {
  height: 44px;
  border: 2px solid rgba(244,63,94,0.3);
  border-radius: 10px;
  background: transparent;
  color: #f43f5e;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.vh-drawer-btn-outline:hover { background: #fff5f6; }

.vh-drawer-btn-fill {
  height: 44px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #f43f5e, #7c3aed, #2563eb);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(244,63,94,0.3);
  transition: opacity 0.2s;
}
.vh-drawer-btn-fill:hover { opacity: 0.9; }

@media (max-width: 440px) {
  .vh-drawer { width: 100vw; }
}

/* ── Back-to-Top Button ── */
.vh-btt {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #7c3aed, #2563eb);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 490;
  box-shadow: 0 4px 20px rgba(244,63,94,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.vh-btt.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.vh-btt:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 28px rgba(244,63,94,0.5); }
.vh-btt svg { width: 20px; height: 20px; }

/* ── Cookie Banner ── */
.vh-cookie {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 550;
  background: rgba(15,23,42,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: vh-ck-slide-in 0.4s ease both;
}
@keyframes vh-ck-slide-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.vh-cookie.is-hiding { animation: vh-ck-slide-out 0.35s ease forwards; }
@keyframes vh-ck-slide-out { to { transform: translateY(100%); } }

.vh-cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
}
.vh-cookie-text a { color: #f43f5e; text-decoration: underline; }
.vh-cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }

.vh-ck-accept {
  padding: 10px 22px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #f43f5e, #7c3aed);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.vh-ck-accept:hover { opacity: 0.88; }

.vh-ck-manage {
  padding: 10px 20px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 9px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.vh-ck-manage:hover { border-color: #fff; color: #fff; }
