/* =====================================================================
   Custom overrides (Vinis) — keep all local tweaks here for easy revert
   ===================================================================== */

/* HERO slideshow: fit to the image's native size (1920x800) so it never
   upscales/blurs on wide screens. Show the whole image (contain), keep
   aspect ratio, cap width at the source width and center it. */
.slideshow {
  max-width: 1920px;
  margin: 0 auto;
  max-height: none !important;
  background: transparent !important;
}
.owl-slideshow,
.owl-slideshow .owl-stage-outer,
.owl-slideshow .owl-stage,
.owl-slideshow .owl-item {
  height: auto !important;
}
.slide-item {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: block !important;
}
.slide-item a {
  display: block;
  width: 100%;
  height: auto;
}
.slide-item img,
.owl-slideshow .slide-item img {
  width: 100% !important;
  height: auto !important;          /* keep 1920x800 aspect ratio */
  max-height: 800px;
  object-fit: contain !important;   /* show the full image, no crop/zoom */
  object-position: center !important;
  display: block !important;
}

/* Video section (self-hosted vertical short) */
#section-video {
  padding: 40px 0 50px;
}
#section-video .video-wrap {
  max-width: 380px;                 /* 9:16 vertical video, keep it slim */
  margin: 0 auto;
}
#section-video .video-wrap video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  background: #000;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
@media (max-width: 767px) {
  #section-video .video-wrap { max-width: 300px; }
}

/* ---- Floating contact buttons (Facebook / Zalo / Cart / Chatbot) ---- */
.ungdung { gap: 12px !important; }
.ungdung li { margin: 0 !important; }
.ungdung .float-btn {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ungdung .float-btn img {
  width: 52px !important;
  height: 52px !important;
  display: block;
}
.ungdung .float-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.30);
}
.ungdung .float-chatbot {
  animation: vnChatPulse 2s infinite;
}
@keyframes vnChatPulse {
  0%   { box-shadow: 0 4px 12px rgba(22, 163, 74, 0.45); }
  70%  { box-shadow: 0 4px 12px rgba(22, 163, 74, 0), 0 0 0 12px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 4px 12px rgba(22, 163, 74, 0); }
}

/* ---- Chatbot popup box ---- */
.vn-chatbot {
  position: fixed;
  right: 84px;
  bottom: 135px;
  width: 320px;
  max-width: calc(100vw - 100px);
  height: 430px;
  max-height: 70vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1001;
}
.vn-chatbot.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.vn-chatbot-header {
  background: #872c5d;
  color: #fff;
  padding: 12px 15px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vn-chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.vn-chatbot-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f7f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vn-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.vn-msg-bot {
  background: #fff;
  border: 1px solid #ececf0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.vn-msg-user {
  background: #872c5d;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.vn-chatbot-input {
  display: flex;
  border-top: 1px solid #ececf0;
  background: #fff;
}
.vn-chatbot-input input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: transparent;
}
.vn-chatbot-input button {
  background: #872c5d;
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  font-size: 15px;
}
.vn-chatbot-input button:hover { background: #7c2654; }
@media (max-width: 767px) {
  .vn-chatbot { right: 12px; left: 12px; bottom: 80px; width: auto; max-width: none; }
}

/* Lead-capture form inside chatbot */
.vn-lead-card { align-self: stretch; }
.vn-lead-card form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid #ececf0;
  border-radius: 12px;
  padding: 12px;
}
.vn-lead-card input {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  outline: none;
}
.vn-lead-card input:focus { border-color: #872c5d; }
.vn-lead-card button {
  background: #872c5d;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.vn-lead-card button:hover { background: #7c2654; }
.vn-lead-card button:disabled { opacity: 0.6; cursor: default; }

/* ===================== CART SYSTEM ===================== */
/* Buttons */
.vn-btn { display:inline-block; text-align:center; text-decoration:none; border:none; border-radius:8px; padding:11px 18px; font-size:14px; font-weight:700; cursor:pointer; transition:background .2s, opacity .2s; }
.vn-btn-primary { background:#872c5d; color:#fff !important; }
.vn-btn-primary:hover { background:#7c2654; }
.vn-btn-ghost { background:#f1f1f4; color:#555 !important; }
.vn-btn-ghost:hover { background:#e6e6ea; }
.vn-btn-block { display:block; width:100%; margin-top:10px; }

/* Menu cart icon */
.menu-cart { position:relative; display:inline-flex; align-items:center; gap:7px; margin-left:14px; color:#872c5d !important; font-weight:700; text-decoration:none; white-space:nowrap; }
.menu-cart i { font-size:18px; }
.menu-cart .vn-cart-count { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 5px; background:#872c5d; color:#fff; border-radius:20px; font-size:12px; line-height:1; }
.mobile-cart-btn { position:relative; }
.mobile-cart-btn .vn-cart-count { position:absolute; top:-6px; right:-8px; min-width:18px; height:18px; padding:0 4px; background:#e11; color:#fff; border-radius:20px; font-size:11px; display:inline-flex; align-items:center; justify-content:center; }

/* Toast */
#vn-toast { position:fixed; left:50%; bottom:40px; transform:translateX(-50%) translateY(20px); background:#222; color:#fff; padding:12px 20px; border-radius:30px; font-size:14px; box-shadow:0 8px 24px rgba(0,0,0,.28); opacity:0; visibility:hidden; transition:all .3s; z-index:3000; }
#vn-toast.show { opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }
#vn-toast i { color:#3ddc84; }

/* Cart page */
.vn-cart-empty { text-align:center; padding:50px 20px; color:#777; }
.vn-cart-empty i { font-size:54px; color:#d5b3c5; display:block; margin-bottom:14px; }
.vn-cart-empty p { margin-bottom:18px; font-size:16px; }
.vn-cart-list { border:1px solid #eee; border-radius:12px; overflow:hidden; margin-bottom:20px; }
.vn-cart-head { display:grid; grid-template-columns:1fr 130px 130px 44px; gap:10px; padding:12px 16px; background:#f7f7fa; font-weight:700; font-size:13px; color:#666; }
.vn-cart-head span:nth-child(2),.vn-cart-head span:nth-child(3){ text-align:center; }
.vn-cart-item { display:grid; grid-template-columns:1fr 130px 130px 44px; gap:10px; align-items:center; padding:14px 16px; border-top:1px solid #f0f0f0; }
.vn-ci-img{ display:none; }
.vn-cart-item .vn-ci-name{ display:flex; gap:12px; align-items:center; }
.vn-cart-item{ position:relative; }
.vn-ci-name{ font-weight:600; }
.vn-ci-name a{ color:#333; text-decoration:none; }
.vn-ci-name .vn-ci-price{ display:block; font-weight:400; font-size:13px; color:#872c5d; margin-top:3px; }
.vn-cart-item .vn-ci-img{ display:block; width:64px; height:64px; flex:0 0 64px; }
.vn-ci-img img{ width:64px; height:64px; object-fit:cover; border-radius:8px; }
.vn-ci-qty{ display:flex; align-items:center; justify-content:center; }
.vn-ci-qty button{ width:30px; height:32px; border:1px solid #ddd; background:#fafafa; cursor:pointer; font-size:16px; }
.vn-ci-qty button:first-child{ border-radius:8px 0 0 8px; }
.vn-ci-qty button:last-child{ border-radius:0 8px 8px 0; }
.vn-qval{ width:44px; height:32px; text-align:center; border:1px solid #ddd; border-left:none; border-right:none; }
.vn-ci-total{ text-align:center; font-weight:700; color:#872c5d; }
.vn-ci-del{ border:none; background:none; color:#c33; cursor:pointer; font-size:16px; }
.vn-cart-foot{ display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:16px; }
.vn-cart-summary{ width:320px; max-width:100%; margin-left:auto; background:#faf6f9; border:1px solid #f0e3ec; border-radius:12px; padding:16px; }
.vn-sum-row{ display:flex; justify-content:space-between; padding:7px 0; font-size:14px; }
.vn-sum-total{ border-top:1px dashed #ddc7d6; margin-top:6px; padding-top:12px; font-size:17px; }
.vn-sum-total b{ color:#872c5d; }

/* Checkout page */
.vn-checkout-grid{ display:grid; grid-template-columns:1fr 360px; gap:24px; align-items:start; }
.vn-checkout-form h3,.vn-checkout-summary h3{ font-size:17px; margin:0 0 14px; color:#333; }
.vn-checkout-form label{ display:block; font-size:13px; font-weight:600; color:#555; margin-bottom:12px; }
.vn-checkout-form input,.vn-checkout-form textarea{ display:block; width:100%; margin-top:5px; border:1px solid #ddd; border-radius:8px; padding:10px 12px; font-size:14px; font-weight:400; outline:none; }
.vn-checkout-form input:focus,.vn-checkout-form textarea:focus{ border-color:#872c5d; }
.vn-checkout-summary{ background:#faf6f9; border:1px solid #f0e3ec; border-radius:12px; padding:18px; }
.vn-co-item{ display:flex; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid #f0e3ec; }
.vn-co-item img{ width:50px; height:50px; object-fit:cover; border-radius:6px; flex:0 0 50px; }
.vn-co-info{ flex:1; font-size:13px; }
.vn-co-info span{ font-weight:600; display:block; }
.vn-co-info small{ color:#888; }
.vn-co-item b{ color:#872c5d; font-size:13px; white-space:nowrap; }
.vn-checkout-summary .vn-sum-row:first-of-type{ margin-top:10px; }

/* Thank-you page */
.vn-thankyou{ text-align:center; padding:50px 20px; }
.vn-thankyou i{ font-size:66px; color:#3ddc84; }
.vn-thankyou h2{ margin:16px 0 10px; color:#333; }
.vn-thankyou p{ color:#666; margin:6px 0; }
.vn-ty-code{ margin-top:14px !important; }
.vn-thankyou .vn-btn{ margin-top:22px; }

@media (max-width:767px){
  .vn-checkout-grid{ grid-template-columns:1fr; }
  .vn-cart-head{ display:none; }
  .vn-cart-item{ grid-template-columns:64px 1fr; grid-template-areas:"img name" "img qty" "img total"; row-gap:6px; }
  .vn-cart-item .vn-ci-img{ grid-area:img; }
  .vn-ci-name{ grid-area:name; }
  .vn-ci-qty{ grid-area:qty; justify-content:flex-start; }
  .vn-ci-total{ grid-area:total; text-align:left; }
  .vn-ci-del{ position:absolute; top:12px; right:12px; }
  .vn-cart-summary{ width:100%; }
}
