/* ============================================================
   Naturavika – Custom CSS overrides
   Mục đích: tinh chỉnh header trên mobile
   ============================================================ */

/* ============================================================
   Header trên MỌI thiết bị: ẩn icon Tìm kiếm + Popup 9-dots
   (giữ lại Giỏ hàng)
   ============================================================ */
.sc_layouts_search,
.elementor-widget-trx_sc_layouts_search,
.sc_layouts_item.elementor-widget-trx_sc_layouts_search,
.elementor-widget-icon a.elementor-icon[href="#popup-2"],
.elementor-widget-icon:has(a[href="#popup-2"]) {
    display: none !important;
}

/* ---------- MOBILE (≤ 767px) ---------- */
@media (max-width: 767px) {

  /* 1) Trên mobile ẩn LUÔN icon giỏ hàng (theo thiết kế trước đó) */
  .sc_layouts_cart,
  .elementor-widget-trx_sc_layouts_cart,
  .sc_layouts_item.elementor-widget-trx_sc_layouts_cart {
    display: none !important;
  }

  /* 2) Bố cục header mobile:  [LOGO ─ trái] ........ [BURGER ─ phải] */
  .sc_layouts_row .elementor-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-direction: row !important;
    justify-content: space-between !important;
  }

  /* Cột chứa LOGO (DOM bên trái) → giữ ở TRÁI */
  .sc_layouts_row .elementor-column:has(.elementor-widget-trx_sc_layouts_logo) {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    text-align: left !important;
  }

  /* Cột chứa BURGER (DOM bên phải) → giữ ở PHẢI */
  .sc_layouts_row .elementor-column:has(.sc_layouts_menu_mobile_button) {
    order: 2 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 60px !important;
    text-align: right !important;
  }

  .sc_layouts_logo,
  .sc_layouts_logo_default {
    display: inline-block !important;
    float: none !important;
    margin: 0 !important;
  }
  .elementor-widget-trx_sc_layouts_logo,
  .elementor-widget-trx_sc_layouts_logo > .elementor-widget-container {
    text-align: left !important;
  }

  /* 3) Logo thu nhỏ còn ~70% (50px → 35px) */
  img.logo_image {
    max-height: 35px !important;
    height: auto !important;
    width: auto !important;
  }
}

/* ============================================================
   Footer subscribe form: input + arrow button (như theme gốc)
   ============================================================ */
form#subscribe {
  max-width: 360px;
}

/* Bọc input + nút trong 1 hàng riêng */
form#subscribe .sub-row {
  position: relative;
}
form#subscribe input[type="email"] {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  padding: 10px 40px 10px 0 !important;
  width: 100% !important;
  font-size: 14px !important;
  height: 42px !important;
  outline: none !important;
  box-shadow: none !important;
}
form#subscribe input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
form#subscribe input[type="email"]:focus {
  border-bottom-color: rgba(255, 255, 255, 0.6) !important;
}

/* Nút submit dạng mũi tên — đặt trong .sub-row, canh giữa theo input */
form#subscribe .sub-row button[type="submit"] {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 0 !important;
  cursor: pointer;
  padding: 0 6px !important;
  margin: 0 !important;
  line-height: 1 !important;
  height: 32px !important;
  width: auto !important;
  min-width: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
form#subscribe .sub-row button[type="submit"]::after {
  content: "→";
  font-size: 22px;
  display: inline-block;
  line-height: 1;
  transition: transform .15s, color .15s;
}
form#subscribe .sub-row button[type="submit"]:hover::after {
  transform: translateX(4px);
  color: #c5a48e;
}

/* Hàng "Tôi đồng ý" - block riêng, cách input một khoảng */
form#subscribe .sub-consent {
  display: block;
  margin-top: 22px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
form#subscribe .sub-consent input[type="checkbox"] {
  vertical-align: middle;
  margin: 0 6px 0 0;
}
form#subscribe .sub-consent label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: inline;
  vertical-align: middle;
  margin: 0;
}
form#subscribe .sub-consent label a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

/* ============================================================
   Footer cột "Liên hệ": email không xuống dòng (desktop)
   ============================================================ */
.footer_wrap a[href^="mailto:"] {
  white-space: nowrap;
  word-break: keep-all;
  font-size: 14px;
}
.footer_wrap a[href^="tel:"] {
  white-space: nowrap;
  font-size: 15px;
}

/* ============================================================
   FOOTER MOBILE: stack 4 cột, spacing rộng
   ============================================================ */
@media (max-width: 767px) {
  /* Container footer */
  .footer_wrap .elementor-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Container footer dùng flex + wrap để 4 cột linh hoạt */
  .footer_wrap .elementor-container {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  /* Mặc định mọi cột 100% width */
  .footer_wrap .elementor-column.elementor-col-25,
  .footer_wrap .elementor-column.elementor-col-33,
  .footer_wrap .elementor-column.elementor-col-50 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-bottom: 32px !important;
  }
  .footer_wrap .elementor-column:last-child {
    margin-bottom: 0 !important;
  }

  /* Riêng hàng có 4 cột (subscribe / socials / menu / contact):
     - Cột 2 (Mạng xã hội) và cột 3 (Trình đơn) ghép thành 2 cột 50/50 */
  .footer_wrap .elementor-section .elementor-container > .elementor-column.elementor-col-25:nth-child(2),
  .footer_wrap .elementor-section .elementor-container > .elementor-column.elementor-col-25:nth-child(3) {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    margin-bottom: 32px !important;
    padding-right: 12px;
  }
  .footer_wrap .elementor-section .elementor-container > .elementor-column.elementor-col-25:nth-child(3) {
    padding-right: 0;
    padding-left: 12px;
  }

  /* Hàng Logo + Slogan: 2 cột thành 2 hàng (logo trên, slogan dưới), CẢ HAI CĂN GIỮA */
  .footer_wrap .elementor-widget-trx_sc_layouts_logo,
  .footer_wrap .elementor-widget-heading {
    text-align: center !important;
    width: 100% !important;
  }
  /* Wrapper logo */
  .footer_wrap .sc_layouts_logo,
  .footer_wrap .sc_layouts_logo_default {
    display: inline-block !important;
    text-align: center !important;
    margin: 0 auto !important;
    float: none !important;
    width: auto !important;
  }
  .footer_wrap .elementor-widget-trx_sc_layouts_logo > .elementor-widget-container,
  .footer_wrap .elementor-widget-trx_sc_layouts_logo .elementor-widget-wrap {
    text-align: center !important;
    display: block !important;
  }
  .footer_wrap .elementor-widget-trx_sc_layouts_logo img {
    max-height: 42px !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
    margin: 0 auto !important;
  }

  /* Slogan 1 dòng, font vừa phải, KHÔNG xuống dòng */
  .footer_wrap h2.elementor-heading-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    padding: 0 8px !important;
    margin: 12px 0 0 !important;
    white-space: normal !important;
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 500 !important;
  }

  /* Hàng chứa logo + slogan: giảm khoảng cách giữa 2 phần */
  .footer_wrap .elementor-section.sc_layouts_row .elementor-column.elementor-col-50 {
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  /* Logo column trên, slogan column dưới — đảm bảo order đúng */
  .footer_wrap .elementor-section.sc_layouts_row .elementor-column.elementor-col-50:nth-child(1) {
    order: 1;
    padding-top: 8px;
  }
  .footer_wrap .elementor-section.sc_layouts_row .elementor-column.elementor-col-50:nth-child(2) {
    order: 2;
    padding-bottom: 24px;
  }

  /* Heading mỗi cột (Đăng ký, Mạng xã hội, Trình đơn, Liên hệ) */
  .footer_wrap .sc_item_title_text,
  .footer_wrap h6.sc_item_title {
    font-size: 18px !important;
    margin-bottom: 16px !important;
    display: block;
  }

  /* Subscribe form: tăng padding input cho dễ chạm */
  .footer_wrap form#subscribe {
    max-width: 100% !important;
  }
  .footer_wrap form#subscribe input[type="email"] {
    height: 46px !important;
    font-size: 16px !important;
    padding-right: 50px !important;
  }
  .footer_wrap form#subscribe .sub-row button[type="submit"]::after {
    font-size: 26px !important;
  }

  /* Socials: 4 link xếp dọc, font 16px */
  .footer_wrap .socials_wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .footer_wrap .socials_wrap a.social_item {
    font-size: 16px !important;
    padding: 6px 0 !important;
  }

  /* Menu list */
  .footer_wrap ul.custom_links_list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
  .footer_wrap ul.custom_links_list li {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
  }
  .footer_wrap ul.custom_links_list a {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  /* Cột Liên hệ (Address/Email/Hotline) */
  .footer_wrap .elementor-widget-text-editor div[style*="line-height:1.8"] {
    line-height: 1.7 !important;
    font-size: 15px !important;
  }
  .footer_wrap a[href^="mailto:"] {
    white-space: normal !important;
    word-break: break-all !important;
    font-size: 15px !important;
  }
  .footer_wrap a[href^="tel:"] {
    font-size: 17px !important;
    font-weight: 600;
  }

  /* Bỏ spacer ngang quá to giữa các phần footer */
  .footer_wrap .elementor-widget-spacer .elementor-spacer-inner {
    height: 16px !important;
  }

  /* Copyright căn giữa */
  .footer_wrap .elementor-widget-text-editor p {
    text-align: center !important;
    font-size: 13px !important;
  }
}

/* Tablet: 2 cột */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer_wrap .elementor-column.elementor-col-25 {
    width: 50% !important;
    margin-bottom: 32px !important;
  }
}

/* ============================================================
   Shop sidebar: từ khoá (tag cloud) hiển thị chuẩn — đè CSS theme cũ
   ============================================================ */
.widget_product_tag_cloud .tagcloud {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  line-height: 1.4 !important;
}
/* base style cho mọi tag (cả <a> lẫn <span>) */
.widget_product_tag_cloud .tagcloud > a,
.widget_product_tag_cloud .tagcloud > span.tag-cloud-link {
  display: inline-flex !important;
  align-items: center;
  padding: 6px 14px !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid #d6c8b6 !important;
  border-radius: 3px !important;
  color: #3b2a1e !important;
  text-decoration: none !important;
  text-shadow: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  transition: background .15s, color .15s, border-color .15s !important;
  text-transform: none !important;
  opacity: 1 !important;
  white-space: nowrap;
  height: auto !important;
  min-width: 0 !important;
  width: auto !important;
}
.widget_product_tag_cloud .tagcloud > a:hover {
  background: #3b2a1e !important;
  color: #fff !important;
  border-color: #3b2a1e !important;
}
.widget_product_tag_cloud .tagcloud > span.tag-cloud-link.active {
  background: #3b2a1e !important;
  color: #fff !important;
  border-color: #3b2a1e !important;
  gap: 8px;
}
.widget_product_tag_cloud .tagcloud .tag-clear {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  height: 18px !important;
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  margin: 0 !important;
  transition: background .15s;
  flex-shrink: 0;
}
.widget_product_tag_cloud .tagcloud .tag-clear:hover {
  background: rgba(255,255,255,.4) !important;
}

