/*
Theme Name: OTRO.VN - Flatsome Child (Optimized)
Theme Name: OTRO.VN - Flatsome Child Theme URI: https://otro.vn 
Description: Child theme tùy chỉnh cho Flatsome, dùng để hiển thị thông tin phòng trọ (ACF, popup, v.v) 
Author: OTRO.VN Team Author URI: https://otro.vn 
Template: flatsome
Author: OTRO.VN Team
*/

/* ===================================
   1. DEVICE TABS
   =================================== */
.ot-device-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ot-device-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #ccc;
  border-radius: 25px;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ot-device-tab i { font-size: 16px; }
.ot-device-tab.ot-active {
  background-color: #dff0e9;
  color: #006b52;
  border-color: #d0e7db;
  font-weight: 600;
}
.ot-device-tab:hover {
  background-color: #eef8f4;
  border-color: #b9e3cd;
  transform: translateY(-2px);
}

/* ===================================
   2. KHUNG SẢN PHẨM
   =================================== */
.product-small.box {
  background: #fff;
  border: 1px solid #e3e9f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  margin-bottom: 10px;
  position: relative;
}
.product-small.box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  border-color: #d0e3ff;
}

/* ẢNH */
.box-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.box-image img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.4s ease;
  will-change: transform;
}
.box-image:hover img { transform: scale(1.03); }
.box-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(90deg, #ff8800, #ffcc00, #ff8800);
  background-size: 250% 250%;
  animation: borderRunWarm 3s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.box-image:hover::before { opacity: 1; }
@keyframes borderRunWarm {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* TIÊU ĐỀ + GIÁ */
.box-text-products { padding: 10px 14px 12px; }
.box-text-products .product-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 6px;
  padding-left: 8px;
  display: flex;
  align-items: center;
  letter-spacing: 0.4px;
}
.box-text-products .product-title a {
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}
.box-text-products .product-title a:hover {
  color: #007bff;
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(0,158,255,0.25);
}
.box-text-products .product-title a::after {
  content: "🔥";
  margin-left: 8px;
  font-size: 17px;
  animation: glow 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255,120,0,0.7));
}
@keyframes glow {
  0%,100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* GIÁ */
.box-text-products .price {
  display: inline-block;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 15px;
  background: linear-gradient(90deg, #e6f9f0, #f0fff9);
  color: #008252;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.box-text-products .price:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===================================
   3. KHỐI THÔNG TIN PHÒNG
   =================================== */
.otro-room-card,
.otro-room-detail-box {
  background: linear-gradient(180deg,#fff 0%,#f9fbfd 100%);
  border: 1px solid #e3e9f0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  font-size: 15px;
  padding: 14px 16px;
}
.otro-room-card:hover,
.otro-room-detail-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.07);
}
.otro-room-card .info-row,
.otro-room-detail-box .info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-radius: 10px;
  margin-bottom: 8px;
  gap: 10px;
  transition: all 0.25s ease;
}
.otro-room-card [data-type],
.otro-room-detail-box [data-type] {
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  flex: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 1px 2px rgba(0,0,0,0.03);
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Nền riêng cho từng loại */
[data-type="dia_chi"] { width: 100%; background: linear-gradient(90deg, #e8faf2, #f3fff9); font-weight: 500; }
[data-type="dien_tich"] { background: linear-gradient(90deg, #fff8e6, #fff3c8); }
[data-type="so_luong_nguoi"] { background: linear-gradient(90deg, #e9f2ff, #f4f9ff); }
[data-type="loai_phong"] { background: linear-gradient(90deg, #f3ebff, #f9f4ff); }
[data-type="qua_tang"] { background: linear-gradient(90deg, #ffeaf3, #fff3f8); }

[data-type]:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* ICON & TEXT */
.info-icon { margin-right: 6px; font-size: 17px; opacity: 0.85; }
.otro-room-card strong,
.otro-room-detail-box strong { color: #111; font-weight: 600; }

/* BUTTONS */
.room-buttons,
.otro-room-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.room-buttons .btn,
.otro-room-buttons .button {
  flex: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #dfe3eb;
  transition: all 0.3s ease;
}
.btn-zalo,
.btn-datphong-otro {
  background: linear-gradient(90deg,#0068ff,#009cff);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,104,255,0.2);
}
.btn-zalo:hover,
.btn-datphong-otro:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,104,255,0.3);
}
.btn-detail,
.btn-nhanqua-otro {
  background: #fff;
  color: #333;
}
.btn-detail:hover,
.btn-nhanqua-otro:hover {
  background: #f3f6fa;
  transform: translateY(-2px);
}

/* EXTRA ROW */
.room-extra .extra-row {
  background: #f7faff;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
.room-extra .extra-row:hover {
  background: #f0f5ff;
  transform: translateY(-1px);
}

/* ===================================
   4. TIÊU ĐỀ + GIÁ TRANG CHI TIẾT
   =================================== */
.single-product .product_title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 10px;
  padding-left: 8px;
  display: flex;
  align-items: center;
  color: #333;
}
.single-product .product_title::after {
  content: "🔥";
  margin-left: 10px;
  font-size: 18px;
  animation: glowDetail 1.6s ease-in-out infinite;
}
@keyframes glowDetail {
  0%,100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.single-product .price-wrapper {
  margin-bottom: 20px;
  padding-left: 8px;
}
.single-product .price-wrapper p.price.product-page-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 17px;
  background: linear-gradient(90deg, #e6f9f0, #f0fff9);
  color: #008252;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.single-product .price-wrapper p.price.product-page-price span.price { all: unset; }
.single-product .price-wrapper p.price.product-page-price:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===================================
   5. POPUP FORM & SUCCESS BOX
   =================================== */
.otro-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.otro-popup.active { display: flex; }
.otro-popup .popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
}
.otro-popup .popup-content {
  position: relative;
  background: #fff;
  padding: 30px 25px;
  border-radius: 18px;
  max-width: 480px;
  width: 90%;
  z-index: 10;
  animation: popupFade 0.35s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.otro-popup .popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  transition: 0.2s;
}
.otro-popup .popup-close:hover { color: #0073ff; }
@keyframes popupFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* SUCCESS BOX */
.otro-success-box {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #e7fff1;
  border-left: 5px solid #00b865;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 99999;
}
.otro-success-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   6. RESPONSIVE
   =================================== */
@media (max-width: 768px) {
  .box-text-products { padding: 10px 12px; }
  .otro-room-card .room-buttons,
  .otro-room-buttons { flex-direction: column; }
  .otro-room-card .btn,
  .otro-room-buttons .button { font-size: 14px; }
  .single-product .product_title { font-size: 20px; margin-bottom: 8px; }
  .single-product .price-wrapper p.price.product-page-price { font-size: 15px; padding: 6px 12px; }
  .otro-popup .popup-content { padding: 20px; }
  .otro-room-detail-box { padding: 14px; border-radius: 12px; }
  .otro-room-detail-box .info-row.two-columns { flex-direction: column; gap: 8px; }
  .otro-room-detail-box .info-icon { font-size: 16px; }
  .otro-room-detail-box strong,
  .otro-room-detail-box .extra-row { font-size: 14.5px; }
}


@media (max-width: 480px) {
  .product-small.box .product-title a { font-size: 16px; }
  .single-product .product_title { font-size: 18px; }
}
