/* =============================================
   PALM HOME SPA – BOOKING PAGE STYLES
   Scoped under .phs-wrap to avoid WP conflicts
   ============================================= */

/* Google Fonts loaded via functions.php */

.phs-wrap {
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --gold-dim: rgba(201,169,110,0.15);
  --dark: #1a1610;
  --dark-2: #22201a;
  --dark-3: #2e2a21;
  --cream: #f5ede0;
  --text: #7a6a50;
  --red: #c0392b;
  --green: #4a7c59;
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--cream);
  min-height: 100vh;
  box-sizing: border-box;
}

.phs-wrap *, .phs-wrap *::before, .phs-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── TOP NAV ── */
.phs-top-nav {
  position: fixed; top: 0; left: 0; width: 100%;
  background: rgba(22,19,13,0.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,169,110,0.18);
  z-index: 9990;
  padding: 0 16px;
}
.phs-nav-brand {
  text-align: center;
  padding: 10px 0 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  letter-spacing: 5px;
  color: #c9a96e;
  font-weight: 300;
  margin: 0;
}
.phs-nav-brand em { font-style: italic; color: #e8d5b0; }

.phs-top-menu {
  display: flex; flex-wrap: wrap; gap: 5px;
  justify-content: center;
  padding: 7px 0 10px;
  list-style: none;
}
.phs-top-menu button {
  padding: 5px 13px;
  border: 1px solid rgba(201,169,110,0.3);
  background: transparent;
  color: #e8d5b0;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  letter-spacing: .4px;
  transition: all .2s;
}
.phs-top-menu button:hover,
.phs-top-menu button.active {
  background: #c9a96e;
  color: #1a1610;
  border-color: #c9a96e;
}

/* ── LAYOUT ── */
.phs-layout {
  display: flex;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 132px 16px 60px;
}
.phs-main-panel { flex: 1; min-width: 0; }
.phs-page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  color: #c9a96e;
  margin-bottom: 3px;
  line-height: 1.2;
}
.phs-page-subtitle {
  font-size: 12px;
  color: #7a6a50;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

/* ── SEARCH ── */
.phs-search-wrap { position: relative; margin-bottom: 26px; }
.phs-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 12px;
  color: #f5ede0;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.phs-search-wrap input:focus { border-color: #c9a96e; }
.phs-search-wrap input::placeholder { color: #7a6a50; }
.phs-s-icon {
  position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%);
  color: #c9a96e; font-size: 16px; pointer-events: none;
}

/* ── SECTION TITLE ── */
.phs-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 400;
  color: #c9a96e;
  margin: 32px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201,169,110,0.18);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── SERVICE CARD ── */
.phs-service {
  display: grid;
  grid-template-columns: 54px 1fr auto 28px;
  align-items: start;
  column-gap: 14px;
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.1);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.phs-service::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background .25s;
}
.phs-service:hover {
  border-color: rgba(201,169,110,0.38);
  background: #2e2a21;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
}
.phs-service.selected { border-color: #c9a96e; background: rgba(201,169,110,0.07); }
.phs-service.selected::after { background: #c9a96e; }

.phs-svc-icon-box {
  grid-column: 1; grid-row: 1/5;
  width: 50px; height: 50px; border-radius: 13px;
  background: rgba(201,169,110,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  transition: background .25s, transform .25s;
  margin-top: 2px;
}
.phs-service:hover .phs-svc-icon-box { transform: scale(1.07); }
.phs-service.selected .phs-svc-icon-box { background: #c9a96e; }

.phs-svc-name { font-size: 14.5px; color: #f5ede0; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.phs-svc-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.phs-svc-duration { font-size: 11.5px; color: #7a6a50; }
.phs-svc-badge {
  font-size: 10px; padding: 2px 7px; border-radius: 10px;
  background: rgba(201,169,110,0.14); color: #c9a96e;
  letter-spacing: .4px; font-weight: 500;
}
.phs-svc-desc {
  font-size: 12.5px; color: #7a6a50; line-height: 1.6;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .32s ease, opacity .28s ease, margin .28s;
  margin-top: 0;
}
.phs-service:hover .phs-svc-desc,
.phs-service.selected .phs-svc-desc { max-height: 80px; opacity: 1; margin-top: 7px; }

.phs-svc-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .32s ease .04s, opacity .28s ease .04s, margin .28s;
  margin-top: 0;
}
.phs-service:hover .phs-svc-tags,
.phs-service.selected .phs-svc-tags { max-height: 50px; opacity: 1; margin-top: 6px; }
.phs-svc-tag {
  font-size: 10.5px; padding: 2px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,169,110,0.15);
  color: rgba(245,237,224,.55);
}

.phs-svc-price-col {
  grid-column: 3; grid-row: 1/5;
  display: flex; align-items: flex-start;
  justify-content: flex-end; padding-left: 8px; padding-top: 2px;
}
.phs-svc-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; font-weight: 600; color: #c9a96e; white-space: nowrap;
}

.phs-check-mark {
  grid-column: 4; grid-row: 1/5; align-self: start; margin-top: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(201,169,110,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all .2s; color: transparent; flex-shrink: 0;
}
.phs-service.selected .phs-check-mark {
  background: #c9a96e; border-color: #c9a96e; color: #1a1610;
}

/* ── BOOKING FORM ── */
.phs-booking-extras {
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 16px; padding: 22px; margin-top: 32px;
}
.phs-booking-extras h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: #c9a96e; margin-bottom: 18px;
}
.phs-form-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.phs-form-group { flex: 1; min-width: 155px; }
.phs-form-group label {
  display: block; font-size: 10.5px; letter-spacing: 1.2px;
  color: #7a6a50; text-transform: uppercase; margin-bottom: 6px;
}
.phs-form-group input,
.phs-form-group select,
.phs-form-group textarea {
  width: 100%; padding: 11px 14px;
  background: #2e2a21;
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 10px; color: #f5ede0;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s;
}
.phs-form-group input:focus,
.phs-form-group select:focus,
.phs-form-group textarea:focus { border-color: #c9a96e; }
.phs-form-group select option { background: #22201a; }
.phs-form-group textarea { resize: vertical; min-height: 72px; }
.phs-form-group input::placeholder,
.phs-form-group textarea::placeholder { color: #7a6a50; }

/* ── CART PANEL ── */
.phs-cart-panel {
  width: 285px; flex-shrink: 0;
  position: sticky; top: 132px; align-self: flex-start;
}
.phs-cart-box {
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 16px; padding: 20px;
  max-height: calc(100vh - 162px); overflow-y: auto;
}
.phs-cart-box h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; color: #c9a96e; margin-bottom: 3px;
}
.phs-cart-count { font-size: 12px; color: #7a6a50; margin-bottom: 16px; }
.phs-cart-empty { text-align: center; color: #7a6a50; font-size: 13px; padding: 28px 0; }
.phs-cart-empty .phs-ei { font-size: 38px; display: block; margin-bottom: 8px; }

.phs-cart-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid rgba(201,169,110,0.09);
  list-style: none;
}
.phs-cart-item:last-child { border-bottom: none; }
.phs-ci-name { font-size: 12.5px; color: #f5ede0; flex: 1; line-height: 1.4; }
.phs-ci-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px; color: #c9a96e; white-space: nowrap;
}
.phs-ci-rm {
  background: none; border: none; color: #7a6a50;
  cursor: pointer; font-size: 17px; line-height: 1;
  padding: 0 2px; transition: color .15s; flex-shrink: 0;
}
.phs-ci-rm:hover { color: #c0392b; }
.phs-cart-div { border: none; border-top: 1px solid rgba(201,169,110,0.18); margin: 14px 0; }
.phs-cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.phs-ct-label { font-size: 12px; color: #7a6a50; letter-spacing: 1px; text-transform: uppercase; }
.phs-ct-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; color: #c9a96e; font-weight: 600;
}
.phs-confirm-group { display: flex; flex-direction: column; gap: 8px; }

.phs-btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: #25d366; color: white; border: none;
  border-radius: 10px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  transition: all .2s;
}
.phs-btn-wa:hover { background: #1ebe5d; transform: translateY(-1px); }

.phs-btn-em {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: transparent; border: 1px solid #c9a96e; color: #c9a96e;
  border-radius: 10px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  transition: all .2s;
}
.phs-btn-em:hover { background: rgba(201,169,110,0.1); transform: translateY(-1px); }

.phs-err-msg { color: #e07070; font-size: 12px; margin-top: 8px; text-align: center; }
.phs-ok-msg {
  background: rgba(74,124,89,0.15); border: 1px solid #4a7c59;
  color: #a8d5b5; border-radius: 10px; padding: 12px;
  font-size: 12.5px; text-align: center; margin-top: 10px;
}

/* ── CONTACT INFO ── */
.phs-contact-info {
  margin-top: 18px;
  border-top: 1px solid rgba(201,169,110,0.15);
  padding-top: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.phs-contact-row {
  display: flex; align-items: center; gap: 10px;
  color: #7a6a50; font-size: 12.5px;
  text-decoration: none !important;
  padding: 8px 10px; border-radius: 9px;
  border: 1px solid rgba(201,169,110,0.1);
  background: #2e2a21; transition: all .2s;
}
.phs-contact-row:hover { border-color: rgba(201,169,110,0.35); color: #e8d5b0 !important; }
.phs-contact-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }

/* ── ADMIN ── */
#phs-adminToggle {
  position: fixed; bottom: 20px; left: 20px;
  padding: 9px 15px;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.25);
  color: #c9a96e; border-radius: 20px;
  cursor: pointer; font-size: 12px;
  z-index: 9995; transition: all .2s;
}
#phs-adminToggle:hover { background: #c9a96e; color: #1a1610; }

#phs-adminOverlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9996; backdrop-filter: blur(3px);
}
#phs-serviceEditor {
  display: none; position: fixed;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
  z-index: 9997; width: 460px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto;
}
.phs-se-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(201,169,110,0.15);
  position: sticky; top: 0;
  background: #22201a; z-index: 1;
  border-radius: 20px 20px 0 0;
}
.phs-se-header h3 {
  font-family: 'Cormorant Garamond', serif;
  color: #c9a96e; font-size: 22px; margin: 0;
}
.phs-se-close {
  background: none; border: none; color: #7a6a50;
  font-size: 22px; cursor: pointer; padding: 0;
  line-height: 1; transition: color .15s;
}
.phs-se-close:hover { color: #c9a96e; }
.phs-se-body { padding: 20px 24px 24px; }
.phs-se-icon-preview {
  display: flex; align-items: center; gap: 14px;
  background: #2e2a21; border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px;
  border: 1px solid rgba(201,169,110,0.12);
}
.phs-se-icon-big {
  font-size: 38px; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,169,110,0.12); border-radius: 13px; flex-shrink: 0;
}
.phs-se-icon-tip { font-size: 12px; color: #7a6a50; line-height: 1.5; }
.phs-se-icon-tip strong { color: #e8d5b0; display: block; margin-bottom: 3px; font-size: 13px; }

.phs-se-field { margin-bottom: 15px; }
.phs-se-field label {
  display: block; font-size: 10.5px; letter-spacing: 1.2px;
  color: #7a6a50; text-transform: uppercase; margin-bottom: 6px;
}
.phs-se-field input,
.phs-se-field textarea {
  width: 100%; padding: 11px 14px;
  background: #2e2a21;
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 10px; color: #f5ede0;
  font-family: 'DM Sans', sans-serif; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.phs-se-field input:focus,
.phs-se-field textarea:focus { border-color: #c9a96e; }
.phs-se-field textarea { resize: vertical; min-height: 80px; }
.phs-se-field input::placeholder,
.phs-se-field textarea::placeholder { color: #7a6a50; }
.phs-se-row { display: flex; gap: 12px; }
.phs-se-row .phs-se-field { flex: 1; }

.phs-se-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 28px; }
.phs-se-tag-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.2);
  color: #e8d5b0; border-radius: 8px; padding: 3px 8px; font-size: 12px;
}
.phs-se-tag-chip button {
  background: none; border: none; color: #7a6a50;
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 1px;
}
.phs-se-tag-chip button:hover { color: #c0392b; }
.phs-se-add-tag { display: flex; gap: 8px; align-items: center; }
.phs-se-add-tag input {
  flex: 1; padding: 9px 13px;
  background: #2e2a21;
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 9px; color: #f5ede0;
  font-size: 13px; font-family: 'DM Sans', sans-serif; outline: none;
}
.phs-se-add-tag input:focus { border-color: #c9a96e; }
.phs-se-add-tag button {
  padding: 9px 14px;
  background: rgba(201,169,110,0.12);
  border: 1px solid rgba(201,169,110,0.25);
  color: #c9a96e; border-radius: 9px; cursor: pointer;
  font-size: 13px; white-space: nowrap; transition: all .2s;
}
.phs-se-add-tag button:hover { background: #c9a96e; color: #1a1610; }

.phs-se-badge-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.phs-se-badge-opt {
  padding: 5px 12px; border-radius: 10px;
  border: 1px solid rgba(201,169,110,0.2);
  background: transparent; color: #7a6a50;
  cursor: pointer; font-size: 12px; transition: all .2s;
}
.phs-se-badge-opt.active,
.phs-se-badge-opt:hover {
  background: rgba(201,169,110,0.14);
  border-color: #c9a96e; color: #c9a96e;
}
.phs-se-divider { border: none; border-top: 1px solid rgba(201,169,110,0.12); margin: 18px 0; }
.phs-se-footer {
  display: flex; gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(201,169,110,0.12);
  position: sticky; bottom: 0;
  background: #22201a; border-radius: 0 0 20px 20px;
}
.phs-btn-save {
  flex: 1; padding: 12px;
  background: #c9a96e; color: #1a1610;
  border: none; border-radius: 10px;
  cursor: pointer; font-weight: 600;
  font-family: 'DM Sans', sans-serif; font-size: 14px; transition: all .2s;
}
.phs-btn-save:hover { background: #e8d5b0; }
.phs-btn-del {
  padding: 12px 16px;
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.3);
  color: #e07070; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: all .2s;
}
.phs-btn-del:hover { background: rgba(192,57,43,0.25); }
.phs-btn-cancel {
  padding: 12px 16px;
  background: transparent;
  border: 1px solid rgba(201,169,110,0.25);
  color: #c9a96e; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: all .2s;
}
.phs-btn-cancel:hover { background: rgba(201,169,110,0.08); }

/* ── ADMIN LOGIN MODAL ── */
#phs-adminLoginModal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9998; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
#phs-adminLoginModal.phs-show { display: flex; }
.phs-adm-modal-box {
  background: #22201a;
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 18px; padding: 30px 28px;
  width: 320px; text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.phs-adm-modal-icon { font-size: 38px; margin-bottom: 10px; }
.phs-adm-modal-box h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: #c9a96e; margin-bottom: 6px;
}
.phs-adm-modal-box p { font-size: 13px; color: #7a6a50; margin-bottom: 18px; }
.phs-adm-modal-box input {
  width: 100%; padding: 12px 15px;
  background: #2e2a21;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 10px; color: #f5ede0;
  font-size: 15px; font-family: 'DM Sans', sans-serif;
  outline: none; text-align: center; letter-spacing: 3px; margin-bottom: 4px;
}
.phs-adm-modal-box input:focus { border-color: #c9a96e; }
.phs-adm-err { color: #e07070; font-size: 12px; min-height: 18px; margin-bottom: 6px; }
.phs-adm-btns { display: flex; gap: 8px; margin-top: 14px; }

.phs-adm-badge {
  position: fixed; bottom: 60px; left: 20px;
  background: rgba(201,169,110,0.12);
  border: 1px solid rgba(201,169,110,0.25);
  color: #c9a96e; border-radius: 10px;
  padding: 6px 12px; font-size: 11px;
  letter-spacing: .5px; z-index: 9994; display: none;
}
.phs-adm-badge.phs-show { display: block; }

/* ══════════════════════════════════════════════
   RESPONSIVE – TỰ ĐỘNG NHẬN DIỆN MỌI MÀN HÌNH
   ══════════════════════════════════════════════

   Breakpoints:
   XS  Mobile nhỏ    < 380px   (iPhone SE, Galaxy A)
   SM  Mobile lớn    < 576px   (iPhone 14, Pixel)
   MD  Tablet dọc    < 768px   (iPad mini, Tab S)
   LG  Tablet ngang  < 1024px  (iPad Air, Surface)
   XL  Desktop       < 1280px  (Laptop)
   2XL Màn lớn       ≥ 1280px  (iMac, 4K)
   ══════════════════════════════════════════════ */

/* BASE – áp dụng cho tất cả màn hình */
.phs-wrap {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Nav tự co theo chiều rộng */
.phs-top-nav {
  width: 100%;
  left: 0; right: 0;
}

/* Layout flexbox tự điều chỉnh */
.phs-layout {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Service card luôn đầy chiều rộng */
.phs-service { width: 100%; }

/* Form groups co giãn linh hoạt */
.phs-form-group { flex: 1 1 200px; }

/* Cart box không tràn */
.phs-cart-box { width: 100%; }

/* ── 2XL: Màn hình lớn ≥ 1280px (iMac, 27" monitor, 4K TV) ── */
@media (min-width: 1280px) {
  .phs-layout {
    gap: 32px;
    padding: 140px 40px 80px;
  }
  .phs-cart-panel { width: 320px; }
  .phs-page-title { font-size: 48px; }
  .phs-nav-brand { font-size: 26px; letter-spacing: 7px; }
  .phs-top-menu button { font-size: 13px; padding: 7px 18px; }
  .phs-section-title { font-size: 26px; }
  .phs-svc-name { font-size: 16px; }
  .phs-svc-price { font-size: 22px; }
  .phs-svc-icon-box { width: 56px; height: 56px; font-size: 26px; }
  .phs-service { grid-template-columns: 64px 1fr auto 30px; }
  .phs-cart-box { max-height: calc(100vh - 180px); }
  .phs-ct-amount { font-size: 32px; }
}

/* ── XL: Desktop 1024–1279px (Laptop 13"–15") ── */
@media (min-width: 1024px) and (max-width: 1279px) {
  .phs-layout {
    gap: 24px;
    padding: 135px 24px 60px;
  }
  .phs-cart-panel { width: 290px; }
  .phs-page-title { font-size: 40px; }
  .phs-cart-box { max-height: calc(100vh - 165px); }
}

/* ── LG: Tablet ngang 768–1023px (iPad Air ngang, Surface) ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .phs-layout {
    flex-direction: row;
    gap: 18px;
    padding: 145px 20px 60px;
  }
  .phs-cart-panel {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 145px;
    align-self: flex-start;
  }
  .phs-cart-box { max-height: calc(100vh - 175px); }
  .phs-page-title { font-size: 32px; }
  .phs-nav-brand { font-size: 19px; letter-spacing: 4px; }
  .phs-top-menu { gap: 4px; padding: 6px 0 8px; }
  .phs-top-menu button { font-size: 11px; padding: 5px 11px; }
  .phs-section-title { font-size: 20px; }
  .phs-svc-icon-box { width: 46px; height: 46px; font-size: 20px; }
  .phs-service { grid-template-columns: 52px 1fr auto 26px; column-gap: 12px; }
  .phs-svc-name { font-size: 13.5px; }
  .phs-svc-price { font-size: 17px; }
}

/* ── MD: Tablet dọc 576–767px (iPad mini dọc, Tab S dọc) ── */
@media (min-width: 576px) and (max-width: 767px) {
  .phs-layout {
    flex-direction: column;
    padding: 155px 18px 60px;
    gap: 20px;
  }
  .phs-cart-panel { width: 100%; position: static; }
  .phs-cart-box { max-height: none; }
  .phs-page-title { font-size: 28px; }
  .phs-nav-brand { font-size: 17px; letter-spacing: 3px; }
  .phs-top-menu { gap: 5px; padding: 6px 0 9px; }
  .phs-top-menu button { font-size: 11.5px; padding: 5px 11px; }

  /* Cart horizontal trên tablet dọc */
  .phs-confirm-group { flex-direction: row; }
  .phs-btn-wa, .phs-btn-em { flex: 1; }

  /* Form 2 cột */
  .phs-form-row { flex-wrap: nowrap; }
  .phs-form-group { flex: 1; }

  .phs-service { grid-template-columns: 50px 1fr auto 26px; }
  .phs-svc-icon-box { width: 46px; height: 46px; font-size: 20px; }
}

/* ── SM: Mobile lớn 380–575px (iPhone 14, Pixel 7, Samsung S) ── */
@media (min-width: 380px) and (max-width: 575px) {
  .phs-layout {
    flex-direction: column;
    padding: 148px 14px 60px;
    gap: 16px;
  }
  .phs-cart-panel { width: 100%; position: static; }
  .phs-cart-box { max-height: none; }
  .phs-page-title { font-size: 26px; letter-spacing: 0; }
  .phs-page-subtitle { font-size: 11px; letter-spacing: 1.5px; }
  .phs-nav-brand { font-size: 16px; letter-spacing: 3px; padding: 8px 0 3px; }
  .phs-top-menu { gap: 4px; padding: 5px 0 8px; }
  .phs-top-menu button { font-size: 10.5px; padding: 5px 9px; flex: 1 1 auto; }

  .phs-service {
    grid-template-columns: 44px 1fr auto 24px;
    column-gap: 10px;
    padding: 12px 13px;
  }
  .phs-svc-icon-box { width: 42px; height: 42px; font-size: 19px; }
  .phs-svc-name { font-size: 13px; }
  .phs-svc-price { font-size: 16px; }
  .phs-svc-desc { font-size: 12px; }
  .phs-section-title { font-size: 19px; margin: 24px 0 12px; }

  .phs-form-row { flex-wrap: wrap; }
  .phs-form-group { flex: 1 1 100%; min-width: 100%; }

  .phs-booking-extras { padding: 16px; }
  .phs-cart-box { padding: 16px; }
  .phs-ct-amount { font-size: 24px; }

  /* Search */
  .phs-search-wrap input { font-size: 13px; padding: 10px 14px 10px 40px; }
}

/* ── XS: Mobile nhỏ < 380px (iPhone SE, Galaxy A12) ── */
@media (max-width: 379px) {
  .phs-layout {
    flex-direction: column;
    padding: 145px 10px 50px;
    gap: 14px;
  }
  .phs-cart-panel { width: 100%; position: static; }
  .phs-cart-box { max-height: none; padding: 14px; }
  .phs-page-title { font-size: 22px; letter-spacing: 0; }
  .phs-page-subtitle { font-size: 10px; letter-spacing: 1px; }
  .phs-nav-brand { font-size: 14px; letter-spacing: 2px; padding: 7px 0 2px; }
  .phs-top-menu {
    gap: 3px; padding: 4px 0 7px;
    justify-content: flex-start;
  }
  .phs-top-menu button {
    font-size: 10px; padding: 4px 8px;
    flex: 0 0 auto;
  }

  .phs-service {
    grid-template-columns: 38px 1fr auto 22px;
    column-gap: 8px;
    padding: 10px 11px;
    border-radius: 10px;
  }
  .phs-svc-icon-box { width: 36px; height: 36px; font-size: 17px; border-radius: 9px; }
  .phs-svc-name { font-size: 12.5px; }
  .phs-svc-price { font-size: 15px; }
  .phs-svc-badge { font-size: 9px; padding: 2px 5px; }
  .phs-section-title { font-size: 17px; margin: 20px 0 10px; }
  .phs-check-mark { width: 20px; height: 20px; font-size: 10px; }

  .phs-form-row { flex-wrap: wrap; }
  .phs-form-group { flex: 1 1 100%; min-width: 100%; }
  .phs-form-group input,
  .phs-form-group select,
  .phs-form-group textarea { font-size: 13px; padding: 9px 12px; }

  .phs-booking-extras { padding: 13px; }
  .phs-ct-amount { font-size: 22px; }
  .phs-btn-wa, .phs-btn-em { font-size: 13px; padding: 11px; }

  /* Admin editor full screen trên mobile nhỏ */
  #phs-serviceEditor {
    width: 98vw;
    max-height: 95vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* ── TOUCH DEVICE: tăng vùng tap ── */
@media (hover: none) and (pointer: coarse) {
  .phs-top-menu button { min-height: 36px; }
  .phs-service { min-height: 60px; }
  .phs-btn-wa, .phs-btn-em { min-height: 48px; }
  .phs-ci-rm { min-width: 32px; min-height: 32px; font-size: 20px; }
  .phs-form-group input,
  .phs-form-group select,
  .phs-form-group textarea { min-height: 44px; font-size: 16px; } /* tránh zoom iOS */
}

/* ── LANDSCAPE MOBILE: điện thoại xoay ngang ── */
@media (max-width: 767px) and (orientation: landscape) {
  .phs-layout { padding-top: 110px; }
  .phs-top-nav { padding: 0 12px; }
  .phs-nav-brand { font-size: 14px; padding: 6px 0 2px; }
  .phs-top-menu { padding: 3px 0 6px; }
  .phs-top-menu button { padding: 4px 10px; font-size: 10.5px; }
  .phs-cart-box { max-height: 55vh; overflow-y: auto; }
}

/* ── PRINT ── */
@media print {
  .phs-top-nav, #phs-adminToggle, .phs-adm-badge,
  .phs-confirm-group, .phs-search-wrap { display: none !important; }
  .phs-layout { padding-top: 20px; flex-direction: column; }
  .phs-cart-panel { width: 100%; position: static; }
  .phs-wrap { background: white; color: black; }
  .phs-service { border: 1px solid #ccc; }
}

/* Scrollbar */
.phs-wrap ::-webkit-scrollbar { width: 4px; }
.phs-wrap ::-webkit-scrollbar-track { background: #22201a; }
.phs-wrap ::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.25); border-radius: 10px; }

/* Hide WP elements khi dùng shortcode */
.phs-wrap ~ .entry-title,
body.page .phs-wrap + * { display: none; }
.page-template-palm-booking .entry-title,
.page-template-palm-booking .site-header { display: none; }
