/* =============================================
   STYLE.CSS - Sunmay & Lamay Villa PHP Website
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;600&display=swap');

:root {
  --primary-color: #2A9D8F;
  --secondary-color: #264653;
  --accent-color: #E76F51;
  --bg-light: #F4F9F9;
  --text-dark: #333;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

footer {
  background: #333;
  color: white;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
}

a {
  text-decoration: none;
}

/* ---- INDEX PAGE ---- */
.contact-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
  border-radius: 0 0 50px 50px;
  margin-bottom: 40px;
}

.contact-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 40px;
  opacity: 0.9;
  font-weight: 300;
  font-style: italic;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-top: 30px;
}

.contact-info a {
  color: var(--white);
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  display: inline-flex;
  backdrop-filter: blur(10px);
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: var(--transition);
}

.contact-info a:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: scale(1.05);
}

.phone a {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
}

#villas {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.villa-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 30px;
  padding: 20px 0;
}

.villa-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.villa-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.villa-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.villa-card:hover img {
  transform: scale(1.1);
}

.villa-card h3 {
  margin: 20px 0 10px;
  color: var(--secondary-color);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  padding: 0 15px;
}

.villa-card p {
  padding: 0 20px;
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.villa-card .btn {
  margin-bottom: 25px;
}

.btn {
  background: linear-gradient(45deg, var(--accent-color), #ff9f43);
  color: var(--white);
  padding: 14px 32px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(231, 111, 81, 0.4);
  border: none;
  cursor: pointer;
  display: inline-block;
  min-height: 48px;
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(231, 111, 81, 0.6);
}

#location {
  background: #fff;
  padding: 4rem 1rem;
  text-align: center;
  border-top: 1px solid #eee;
}

/* ---- POPULAR ROOMS ---- */
.popular-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.popular-section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.popular-subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: .95rem;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.popular-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.popular-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.popular-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.popular-card-body {
  padding: 1rem;
  flex: 1;
}

.popular-card-body h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
}

.popular-stars {
  color: #f59e0b;
  font-size: 1.1rem;
}

.popular-meta {
  color: #666;
  font-size: .85rem;
  margin-top: 4px;
}

.popular-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.popular-card a {
  display: block;
  margin: .75rem 1rem 1rem;
  padding: .6rem;
  background: linear-gradient(135deg, var(--primary-color), #3dbfa5);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  transition: .3s;
}

.popular-card a:hover {
  opacity: .9;
}

/* ---- VILLA LIST PAGE ---- */
body.villa-page {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f5f5f5;
}

.villa-page header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

.villa-page header h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 0.5rem;
}

.villa-page header p {
  opacity: .9;
  margin-bottom: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  padding: .5rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  transition: 0.3s;
  background: rgba(255, 255, 255, .1);
  min-height: 44px;
}

.back-link:hover {
  background: white;
  color: #667eea;
}

.villa-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.villa-page .intro {
  text-align: center;
  margin-bottom: 2rem;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
}

.villa-page .intro h2 {
  color: #667eea;
  margin-bottom: .5rem;
  font-size: 1.5rem;
  font-family: 'Segoe UI', sans-serif;
}

.filter-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
}

.filter-section h3 {
  color: #667eea;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.filter-buttons {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.filter-btn {
  white-space: nowrap;
  padding: .6rem 1.2rem;
  border: 1px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 25px;
  cursor: pointer;
  transition: .3s;
  font-weight: 500;
  font-size: .9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: #667eea;
  color: white;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

.room-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .08);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.room-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .15);
}

.room-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.room-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-number {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: .8rem;
  font-weight: bold;
  margin-bottom: .5rem;
  align-self: flex-start;
}

.room-title {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  color: #333;
  margin-bottom: .5rem;
  font-family: 'Segoe UI', sans-serif;
}

.room-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: .5rem 0 1rem;
  color: #666;
  font-size: .9rem;
}

.room-features span {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 6px;
}

.room-price {
  font-size: 1.2rem;
  color: #667eea;
  font-weight: bold;
  margin-top: auto;
  margin-bottom: 1rem;
}

.btn-book {
  display: flex;
  width: 100%;
  padding: .8rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: .3s;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.btn-book:hover {
  opacity: .9;
  transform: scale(1.02);
}

.lamay-card .room-number {
  background: #f5576c;
}

.lamay-card .room-price {
  color: #f5576c;
}

.lamay-card .btn-book {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* ---- ROOM DETAIL PAGE ---- */
body.room-page {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #333;
  background: var(--room-bg, #ebecee);
  padding-bottom: 2rem;
}

.room-page header {
  background: linear-gradient(135deg, var(--room-primary, #5689c0) 0%, var(--room-secondary, #244f62) 100%);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.room-page header h1 {
  font-size: 1.8rem;
  margin-bottom: .5rem;
  font-family: 'Segoe UI', sans-serif;
}

.room-page header p {
  opacity: .9;
  font-size: .9rem;
}

.room-page .back-link {
  border: 2px solid var(--room-accent, #75e2ff);
}

.room-page .back-link:hover {
  background: white;
  color: var(--room-secondary, #244f62);
}

.room-page .container {
  max-width: 1000px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.section {
  background: white;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
}

.section h2 {
  color: var(--room-secondary, #244f62);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  border-bottom: 2px solid rgba(0, 0, 0, .1);
  padding-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Segoe UI', sans-serif;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.gallery img,
.gallery video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .2s;
  background: #eee;
  border: 1px solid #ddd;
}

.gallery img:hover {
  transform: scale(1.02);
}

.contact-box-btn {
  background: var(--room-primary, #5689c0);
  color: white;
  padding: 12px 20px;
  border: 2px solid var(--room-accent, #75e2ff);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-box-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .1);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .95);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
}

.modal.active {
  opacity: 1;
}

.modal img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 2001;
}

/* ---- USER BAR (Header) ---- */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  z-index: 100;
  padding: 0 10px;
}

.header-cart {
  position: relative;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid white;
  padding: 10px 22px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(12px);
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.header-cart:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.header-cart .cart-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-cart .cart-badge {
  background: #ef4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.82rem;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  position: absolute;
  top: -8px;
  right: -4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: bounceBadge 2s infinite;
}

@keyframes bounceBadge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  min-height: 44px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.user-name {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.btn-logout {
  color: #ff8d8c;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  margin-left: 4px;
  transition: 0.3s;
  white-space: nowrap;
}

.btn-logout:hover {
  color: white;
  text-decoration: underline;
}

.btn-google-login {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #333;
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .88rem;
  border: none;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-height: 44px;
}

.btn-google-login:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
}

.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.login-hint-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 5px;
}

.voucher-hint-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
  border: 2px dashed #ff4757;
  padding: 10px 24px;
  border-radius: 12px;
  color: #ff4757;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: voucherPulse 2s infinite;
}

.voucher-hint-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

.voucher-hint-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -150%;
  }

  100% {
    left: 150%;
  }
}

@keyframes voucherPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

/* ---- CART ITEM (cart.php) ---- */
.cart-item-row {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ---- POOL CAROUSEL ---- */
.pool-carousel-container {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pool-carousel-container img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  height: clamp(220px, 40vw, 500px);
}

/* ---- FORM GRIDS (responsive) ---- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- REVIEWS ---- */
.rating-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f8f9fa, #fff);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
}

.rating-big {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--room-primary, #5689c0);
  line-height: 1;
}

.stars-display {
  font-size: 1.4rem;
}

.star.full {
  color: #f59e0b;
}

.star.half {
  color: #f59e0b;
  opacity: .6;
}

.star.empty {
  color: #d1d5db;
}

.rating-count {
  color: #666;
  font-size: .9rem;
  margin-top: 4px;
}

.review-form-wrap {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 2px solid #e9ecef;
}

.review-form-wrap h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--room-secondary, #244f62);
  font-family: 'Segoe UI', sans-serif;
}

/* Star picker (CSS only trick - reversed order) */
.star-picker {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
  margin-bottom: 16px;
  align-items: center;
}

.star-picker input[type=radio] {
  display: none;
}

.star-picker label {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color .15s;
}

.star-picker label:hover,
.star-picker label:hover~label,
.star-picker input:checked~label {
  color: #f59e0b;
}

.star-hint {
  font-size: .85rem;
  color: #888;
  margin-left: 8px;
}

.review-form-wrap textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-family: 'Segoe UI', sans-serif;
  font-size: .95rem;
  resize: vertical;
  transition: border-color .2s;
}

.review-form-wrap textarea:focus {
  outline: none;
  border-color: var(--room-primary, #5689c0);
}

.btn-submit-review {
  margin-top: 12px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--room-primary, #5689c0), var(--room-secondary, #244f62));
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: .3s;
}

.btn-submit-review:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.btn-submit-review:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.review-msg {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .9rem;
}

.review-msg.success {
  background: #d1fae5;
  color: #065f46;
}

.review-msg.error {
  background: #fee2e2;
  color: #991b1b;
}

.login-to-review {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #f0f4ff, #fff);
  border: 2px dashed #c7d2fe;
  border-radius: 12px;
  margin-bottom: 24px;
}

.login-to-review p {
  color: #6366f1;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.already-reviewed {
  text-align: center;
  padding: 16px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 20px;
}

.review-card {
  padding: 16px;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 14px;
  transition: box-shadow .2s;
  background: #fff;
}

.review-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.review-card.new-review {
  border-color: #a5f3fc;
  background: #f0fdfe;
  animation: slideIn .4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
  flex-shrink: 0;
}

.review-user {
  font-weight: 600;
  font-size: .95rem;
}

.review-stars {
  font-size: 1rem;
}

.review-stars .full {
  color: #f59e0b;
}

.review-stars .empty {
  color: #d1d5db;
}

.review-date {
  margin-left: auto;
  color: #9ca3af;
  font-size: .8rem;
  flex-shrink: 0;
}

.review-comment {
  color: #555;
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.review-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-like {
  background: none;
  border: 1px solid #e5e7eb;
  padding: 5px 14px;
  border-radius: 99px;
  cursor: pointer;
  font-size: .85rem;
  color: #666;
  transition: .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-like:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-like.liked {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.no-reviews {
  text-align: center;
  color: #9ca3af;
  padding: 32px;
  font-size: 1rem;
}

/* ============================================================
   RESPONSIVE SYSTEM - Mobile First
   xs: < 480px  |  sm: < 600px  |  md: < 768px  |  lg: < 1024px
   ============================================================ */

/* --- MOBILE EXTRA SMALL (< 480px) --- */
@media (max-width: 480px) {
  .user-bar {
    gap: 8px;
    margin-top: 12px;
  }

  .header-cart {
    padding: 8px 14px;
    gap: 6px;
  }

  .header-cart .cart-icon {
    font-size: 1.5rem;
  }

  .user-name {
    max-width: 80px;
    font-size: 0.8rem;
  }

  .btn-google-login {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .contact-header {
    padding: 30px 12px;
    border-radius: 0 0 16px 16px;
  }

  .contact-content h1 {
    font-size: 1.6rem;
    letter-spacing: 0;
  }

  .tagline {
    font-size: 0.92rem;
    margin-bottom: 24px;
  }

  .villa-card img {
    height: 220px;
  }

  #villas {
    padding: 24px 12px;
  }

  .villa-list {
    gap: 20px;
  }

  .popular-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .room-image {
    height: 180px;
  }

  .villa-page header h1,
  .room-page header h1 {
    font-size: 1.3rem;
  }

  .villa-page header p,
  .room-page header p {
    font-size: 0.82rem;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    padding: .5rem .9rem;
    font-size: .82rem;
  }

  .section {
    padding: 1rem;
  }

  .section h2 {
    font-size: 1.1rem;
  }

  .rating-big {
    font-size: 2.5rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gallery img,
  .gallery video {
    height: 140px;
  }

  .modal-close {
    top: 10px;
    right: 12px;
    font-size: 30px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .cart-item-row {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .cart-item-img {
    width: 100%;
    height: 160px;
    border-radius: 8px;
  }

  .back-link {
    padding: .4rem 1rem;
    font-size: .85rem;
  }

  footer {
    padding: 1rem;
    font-size: 0.82rem;
  }
}

/* --- MOBILE SMALL (< 600px) --- */
@media (max-width: 600px) {
  .villa-page header {
    padding: 1.2rem 1rem;
  }

  /* Villa page: header row wraps correctly */
  .villa-page header>div {
    flex-direction: column;
    gap: 12px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .popular-grid {
    grid-template-columns: 1fr;
  }

  .villa-card img {
    height: 240px;
  }

  .contact-header {
    padding: 36px 14px;
    border-radius: 0 0 18px 18px;
  }

  /* Booking form date grid */
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Mini cart in villa.php */
  .mini-cart-section {
    padding: 14px !important;
  }

  /* Cart item row on small mobile */
  .cart-item-row {
    align-items: flex-start;
  }

  /* Stamp on confirmed ticket */
  .booking-stamp {
    font-size: 1.8rem !important;
    padding: 6px 16px !important;
    letter-spacing: 2px !important;
  }

  /* Rating summary stacks */
  .rating-summary {
    flex-direction: column;
    text-align: center;
  }
}

/* --- TABLET (< 768px) --- */
@media (max-width: 768px) {
  .villa-page header {
    padding: 1.5rem 1rem;
  }

  .villa-page .container {
    padding: 1rem;
  }

  .room-page .container {
    padding: 0 1rem;
  }

  .rooms-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 1.25rem;
  }

  .room-image {
    height: 190px;
  }

  .villa-card img {
    height: 280px;
  }

  .contact-header {
    padding: 40px 15px;
    border-radius: 0 0 20px 20px;
  }

  .rating-summary {
    flex-direction: column;
    text-align: center;
  }

  .popular-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
  }

  .gallery img,
  .gallery video {
    height: 170px;
  }

  /* Booking ticket grid info */
  .booking-info-grid {
    grid-template-columns: 1fr !important;
  }

  /* Remove hover transforms on mobile (performance) */
  .villa-card:hover,
  .popular-card:hover,
  .room-card:hover {
    transform: none;
  }

  .btn:hover,
  .btn-book:hover,
  .back-link:hover,
  .header-cart:hover {
    transform: none;
  }

  .user-bar {
    margin-top: 14px;
    gap: 10px;
  }
}

/* --- DESKTOP (>= 769px) --- */
@media (min-width: 769px) {
  .villa-page header {
    padding: 2.5rem 2rem;
  }

  .villa-page .container,
  .room-page .container {
    padding: 0 2rem;
  }

  .room-page .container {
    margin: 2rem auto;
  }

  .section {
    padding: 2.5rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
  }

  .gallery img,
  .gallery video {
    height: 220px;
  }

  .cart-item-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .cart-item-img {
    width: 100px;
    height: 100px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .header-cart .cart-icon {
    font-size: 2.4rem;
  }

  .header-cart {
    padding: 12px 26px;
  }

  .user-name {
    max-width: 160px;
  }
}

/* --- LARGE DESKTOP (>= 1024px) --- */
@media (min-width: 1024px) {
  .rooms-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .popular-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .villa-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-cart {
    padding: 14px 30px;
  }

  .header-cart .cart-icon {
    font-size: 2.8rem;
  }

  .gallery img,
  .gallery video {
    height: 240px;
  }
}

/* ---- TOUCH DEVICE IMPROVEMENTS ---- */
@media (hover: none) {

  /* Disable hover effects that won't work on touch */
  .villa-card:hover,
  .room-card:hover,
  .popular-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }

  .villa-card:hover img {
    transform: none;
  }

  /* Larger tap targets */
  .filter-btn {
    min-height: 44px;
  }

  .btn-logout {
    padding: 4px 8px;
  }
}

/* ============================================================
   RESPONSIVE ENHANCEMENTS (Mobile & Desktop Optimization)
   ============================================================ */

/* 1. Prevent Horizontal Scroll & Allow smooth scrolling */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* 2. Improve Interactive Elements & Touch Targets on Mobile */
@media (max-width: 768px) {

  button,
  a.btn,
  a.btn-book,
  a.contact-box-btn,
  .filter-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="date"],
  textarea {
    font-size: 16px !important;
    /* Force iOS Safari not to zoom in */
  }

  .villa-card h3 {
    word-wrap: break-word;
    font-size: 1.35rem;
  }
}

/* 3. Refine Filter Bar scrolling natively and smoothly */
.filter-buttons {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Firefox */
}

.filter-buttons::-webkit-scrollbar {
  display: none;
  /* Safari and Chrome */
}

/* 4. Desktop Optimizations (Hovers & Large screen layouts) */
@media (min-width: 1024px) {
  .container {
    padding: 0 4rem;
  }

  .popular-card,
  .room-card,
  .villa-card {
    will-change: transform;
  }
}

/* ---- PRINT ---- */
@media print {

  .no-print,
  header,
  footer,
  .floating-cart-widget,
  .back-link,
  .user-bar {
    display: none !important;
  }

  body {
    background: #fff !important;
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #bookingTicketFrame {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}