/* =========================================================
 * Sticky Add-to-Cart - phần giao diện mobile (<= 849px)
 * Desktop (>= 850px) giữ nguyên style cũ trong style.css
 * ====================================================== */

.devvn-sticky-mobile {
  display: none;
}

/* ---------- Thanh 3 nút ---------- */
@media (max-width: 849px) {
  .sticky-add-to-cart-wrapper {
    display: block;
  }

  .devvn-sticky-cart .devvn-sticky-inner {
    display: none !important;
  }

  .devvn-sticky-cart.sticky-add-to-cart--active {
    background-color: #fff;
    box-shadow: 0 -2px 12px rgba(0, 39, 102, 0.08);
  }

  .devvn-sticky-cart .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .devvn-sticky-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 12px;
  }

  .devvn-sticky-mobile .devvn-sticky-contact {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #500f14;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .devvn-sticky-mobile .devvn-sticky-contact:hover {
    color: #fff;
  }

  .devvn-sticky-mobile .button {
    flex: 1 1 0;
    margin: 0;
    min-height: 52px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: unset;
    text-transform: none;
    padding: 6px 12px;
  }

  .devvn-sticky-mobile .button.btn_find_pharmacy {
    color: #500f14;
    background-color: #eaeffa;
    border: unset;
  }

  .devvn-sticky-mobile .button.devvn-sticky-choose {
    background-color: #500f14;
    border-color: #500f14;
    color: #f5b358;
  }
}

/* ---------- Popup dùng chung ---------- */
.devvn-popup .devvn-popup-head {
  padding: 16px 44px;
  border-bottom: 1px solid #eef0f2;
  text-align: center;
}

.devvn-popup .devvn-popup-title {
  font-size: 18px;
  font-weight: 700;
  color: #020b27;
}

.devvn-popup .devvn-popup-body {
  padding: 16px;
}

/* ---------- Popup liên hệ ---------- */
.devvn-popup-contact .devvn-popup-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.devvn-popup-contact .devvn-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 12px;
  background: #eaeffa;
  color: #333;
  font-size: 17px;
  font-weight: 600;
}
.devvn-popup-contact .devvn-popup-btn svg {
  color: #500f14;
}
.devvn-popup-contact .devvn-popup-btn:hover {
  background: #dde5f7;
  color: #500f14;
}

/* ---------- Popup chọn số lượng, đơn vị ---------- */
.devvn-popup-buy .devvn-buy-product {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.devvn-popup-buy .devvn-buy-thumb {
  flex: 0 0 72px;
}

.devvn-popup-buy .devvn-buy-thumb img {
  width: 72px;
  height: auto;
  border: 1px solid #eef0f2;
  border-radius: 8px;
  margin: 0;
}

.devvn-popup-buy .devvn-buy-name {
  font-size: 15px;
  line-height: 1.4;
  color: #020b27;
  margin-bottom: 4px;
}

.devvn-popup-buy .devvn-buy-price {
  font-size: 17px;
  font-weight: 700;
  color: #500f14;
  line-height: 1.3;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.devvn-popup-buy .devvn-buy-price del {
  font-size: 14px;
  font-weight: 400;
  color: #98a2b3;
  margin-left: unset;
}

.devvn-popup-buy .devvn-buy-price ins {
  text-decoration: none;
}

.devvn-popup-buy .devvn-buy-form {
  margin-top: 14px;
}

.devvn-popup-buy .devvn-buy-total {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef0f2;
}

.devvn-popup-buy .devvn-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: #657384;
  padding: 3px 0;
}

.devvn-popup-buy .devvn-buy-row strong {
  font-size: 17px;
  color: #500f14;
}

.devvn-popup-buy .devvn-buy-row-save strong {
  color: #e60000;
}

.devvn-popup-buy .devvn-popup-foot {
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px;
}

.devvn-popup-buy .devvn-popup-foot .button {
  flex: 1 1 0;
  margin: 0;
  min-height: 52px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: unset;
  text-transform: none;
}

.devvn-popup-buy .devvn-popup-foot .devvn-buy-addcart {
  background: #eaeffa;
  border-color: #eaeffa;
  color: #500f14;
}

.devvn-popup-buy .devvn-popup-foot .devvn-buy-now {
  background: #500f14;
  border-color: #500f14;
  color: #f5b358;
}

/* ---------- Form add-to-cart khi được chuyển vào popup ---------- */
.devvn-sticky-form.in-popup form.cart {
  display: block;
  margin: 0;
}

.devvn-sticky-form.in-popup .single_add_to_cart_button,
.devvn-sticky-form.in-popup .prod_page_actions {
  display: none !important;
}

/* bảng biến thể: hiện lại nhãn "Chọn đơn vị" và xếp dọc */
.devvn-sticky-form.in-popup table.variations,
.devvn-sticky-form.in-popup table.variations tbody,
.devvn-sticky-form.in-popup table.variations tr,
.devvn-sticky-form.in-popup table.variations td {
  display: block;
  width: 100%;
}

.devvn-sticky-form.in-popup table.variations {
  margin: 0 0 14px;
}

.devvn-sticky-form.in-popup table.variations .label {
  display: block !important;
  padding: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #020b27;
}

.devvn-sticky-form.in-popup table.variations .label label {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #020b27;
  text-transform: none;
}

.devvn-sticky-form.in-popup table.variations td select {
  width: 100%;
  min-width: 0;
  height: 44px;
  border-radius: 8px;
}

.devvn-sticky-form.in-popup table.variations .reset_variations {
  display: inline-block !important;
  font-size: 13px;
}

.devvn-sticky-form.in-popup .single_variation_wrap,
.devvn-sticky-form.in-popup .woocommerce-variation-add-to-cart {
  display: block;
  width: 100%;
  gap: 0;
}

.devvn-sticky-form.in-popup .woocommerce-variation-price {
  display: block !important;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #500f14;
}

/* nhãn "Chọn số lượng" cho ô số lượng */
.devvn-sticky-form.in-popup form.cart .quantity {
  position: relative;
  margin: 30px 0 0;
}

.devvn-sticky-form.in-popup form.cart .quantity:before {
  content: "Chọn số lượng";
  position: absolute;
  top: -30px;
  left: 0;
  font-size: 15px;
  font-weight: 600;
  color: #020b27;
  white-space: nowrap;
}

/* ---------- Lightbox ---------- */
.lightbox-content.devvn-lightbox {
  border-radius: 14px;
  overflow: hidden;
}
