/* ==========================================================================
   Mahalya Public Discovery & Listing Styles (Desktop Sidebar + Mobile Drawer)
   ========================================================================== */

/* ============================================================
   PREMIUM BACKGROUND SYSTEM — Wedding / Celebration Atmosphere
   Pure CSS + SVG decorative elements. No heavy assets.
   All opacity kept very low so cards remain fully readable.
   ============================================================ */

/* 1. Body Base — Warm ivory instead of cold bg-light */
body.mahals-list-page {
  background-color: #FDFAF6 !important;
  background-image:
    /* Soft radial blush bloom — top-left */
    radial-gradient(ellipse 55% 40% at 5% 8%, rgba(230, 190, 200, 0.18) 0%, transparent 70%),
    /* Soft lavender bloom — top-right */
    radial-gradient(ellipse 50% 45% at 96% 6%, rgba(108, 74, 182, 0.09) 0%, transparent 65%),
    /* Warm ivory center — keeps cards readable */
    radial-gradient(ellipse 60% 35% at 50% 18%, rgba(253, 250, 246, 0.98) 0%, transparent 80%),
    /* Bottom-left soft lavender wave */
    radial-gradient(ellipse 55% 30% at 0% 90%, rgba(108, 74, 182, 0.07) 0%, transparent 65%),
    /* Bottom-right warm blush */
    radial-gradient(ellipse 45% 30% at 100% 95%, rgba(201, 162, 39, 0.07) 0%, transparent 65%);
  position: relative;
}

/* 2. Global decorative overlay — mandala / floral pattern via SVG data URI */
body.mahals-list-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* SVG mandala-inspired corner flourishes embedded as data URI */
  background-image:
    /* Top-left corner arch line-art */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%236C4AB6' stroke-width='0.6' opacity='0.12'%3E%3C!-- Mandap arch ---%3E%3Cpath d='M0,280 Q80,160 160,120 Q240,80 320,60' /%3E%3Cpath d='M0,320 Q100,200 180,150 Q260,100 320,80' /%3E%3C!-- Petal ring ---%3E%3Ccircle cx='40' cy='40' r='28' /%3E%3Ccircle cx='40' cy='40' r='18' /%3E%3Ccircle cx='40' cy='40' r='8' /%3E%3C!-- Radiating lines ---%3E%3Cline x1='40' y1='12' x2='40' y2='0' /%3E%3Cline x1='68' y1='40' x2='80' y2='40' /%3E%3Cline x1='40' y1='68' x2='40' y2='80' /%3E%3Cline x1='12' y1='40' x2='0' y2='40' /%3E%3Cline x1='60' y1='20' x2='68' y2='12' /%3E%3Cline x1='20' y1='60' x2='12' y2='68' /%3E%3C!-- Lotus petals ---%3E%3Cellipse cx='40' cy='24' rx='5' ry='9' /%3E%3Cellipse cx='40' cy='56' rx='5' ry='9' /%3E%3Cellipse cx='24' cy='40' rx='9' ry='5' /%3E%3Cellipse cx='56' cy='40' rx='9' ry='5' /%3E%3Cellipse cx='28' cy='28' rx='5' ry='9' transform='rotate(45 28 28)' /%3E%3Cellipse cx='52' cy='28' rx='5' ry='9' transform='rotate(-45 52 28)' /%3E%3Cellipse cx='28' cy='52' rx='5' ry='9' transform='rotate(-45 28 52)' /%3E%3Cellipse cx='52' cy='52' rx='5' ry='9' transform='rotate(45 52 52)' /%3E%3C!-- Hanging ornaments ---%3E%3Cline x1='100' y1='0' x2='100' y2='40' /%3E%3Ccircle cx='100' cy='46' r='6' /%3E%3Cline x1='130' y1='0' x2='130' y2='55' /%3E%3Ccircle cx='130' cy='61' r='4' /%3E%3Cline x1='160' y1='0' x2='160' y2='35' /%3E%3Ccircle cx='160' cy='41' r='5' /%3E%3C/g%3E%3C/svg%3E"),
    /* Top-right corner mirror */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%236C4AB6' stroke-width='0.6' opacity='0.12' transform='scale(-1,1) translate(-320,0)'%3E%3Cpath d='M0,280 Q80,160 160,120 Q240,80 320,60' /%3E%3Cpath d='M0,320 Q100,200 180,150 Q260,100 320,80' /%3E%3Ccircle cx='40' cy='40' r='28' /%3E%3Ccircle cx='40' cy='40' r='18' /%3E%3Ccircle cx='40' cy='40' r='8' /%3E%3Cline x1='40' y1='12' x2='40' y2='0' /%3E%3Cline x1='68' y1='40' x2='80' y2='40' /%3E%3Cline x1='40' y1='68' x2='40' y2='80' /%3E%3Cline x1='12' y1='40' x2='0' y2='40' /%3E%3Cellipse cx='40' cy='24' rx='5' ry='9' /%3E%3Cellipse cx='40' cy='56' rx='5' ry='9' /%3E%3Cellipse cx='24' cy='40' rx='9' ry='5' /%3E%3Cellipse cx='56' cy='40' rx='9' ry='5' /%3E%3Ccircle cx='100' cy='46' r='6' /%3E%3Cline x1='100' y1='0' x2='100' y2='40' /%3E%3Cline x1='130' y1='0' x2='130' y2='55' /%3E%3Ccircle cx='130' cy='61' r='4' /%3E%3C/g%3E%3C/svg%3E"),
    /* Bottom-left flowing wave flourish */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200'%3E%3Cg fill='none' opacity='0.09'%3E%3Cpath d='M0,160 Q80,100 160,130 Q240,160 320,100 Q380,60 400,80' stroke='%236C4AB6' stroke-width='1.2' /%3E%3Cpath d='M0,180 Q100,120 200,150 Q300,180 400,130' stroke='%23C9A227' stroke-width='0.8' /%3E%3Cpath d='M0,195 Q120,150 240,165 Q340,178 400,155' stroke='%236C4AB6' stroke-width='0.5' /%3E%3C/g%3E%3C/svg%3E"),
    /* Bottom-right wave flourish */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200'%3E%3Cg fill='none' opacity='0.09' transform='scale(-1,1) translate(-400,0)'%3E%3Cpath d='M0,160 Q80,100 160,130 Q240,160 320,100 Q380,60 400,80' stroke='%236C4AB6' stroke-width='1.2' /%3E%3Cpath d='M0,180 Q100,120 200,150 Q300,180 400,130' stroke='%23C9A227' stroke-width='0.8' /%3E%3C/g%3E%3C/svg%3E");

  background-position:
    top left,
    top right,
    bottom left,
    bottom right;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size:
    320px 320px,
    320px 320px,
    400px 200px,
    400px 200px;
}

/* 3. All content above the decorative layer */
body.mahals-list-page > * {
  position: relative;
  z-index: 1;
}

/* 4. Hero Discovery — Premium gradient with decorative shimmer */
.hero-discovery {
  background:
    /* Subtle edge gold accent */
    linear-gradient(90deg,
      rgba(201, 162, 39, 0.06) 0%,
      transparent 20%,
      transparent 80%,
      rgba(201, 162, 39, 0.06) 100%
    ),
    /* Main hero gradient — ivory → soft lavender blush */
    linear-gradient(160deg,
      #FDF8F2 0%,
      #F9F4FC 35%,
      #F5EFFE 60%,
      #FDF4F7 80%,
      #FDFAF6 100%
    );
  padding: 52px 0 32px 0;
  border-bottom: 1px solid rgba(108, 74, 182, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hero top decorative line — golden signature */
.hero-discovery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(201, 162, 39, 0.45),
    rgba(108, 74, 182, 0.3),
    rgba(201, 162, 39, 0.45),
    transparent
  );
  border-radius: 2px;
}

/* Hero corner decorative floral accent — left */
.hero-discovery::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(201, 162, 39, 0.15),
    rgba(108, 74, 182, 0.12) 50%,
    rgba(201, 162, 39, 0.15)
  );
}

/* Floating soft orbs behind the hero — depth layers */
.hero-discovery .container {
  position: relative;
  z-index: 2;
}



.hero-discovery-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 8px;
}

.hero-discovery-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Discovery Desktop Filter Sidebar */
.filter-sidebar-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  border: 1px solid #E2E8F0;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.filter-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.filter-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Active Filter Chips */
.active-filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(108, 74, 182, 0.1);
  color: var(--color-primary);
  border-radius: var(--border-radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(108, 74, 182, 0.2);
}

.filter-chip-remove {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Top Search Bar & Sort Bar */
.top-search-bar {
  background: #FFFFFF;
  border-radius: var(--border-radius-md);
  border: 1px solid #E2E8F0;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

/* Mahal Listing Card */
.mahal-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  border: 1px solid #E2E8F0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mahal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
  border-color: rgba(108, 74, 182, 0.3);
}

.mahal-card-img-wrapper {
  position: relative;
  height: 210px;
  background: #F1F5F9;
  overflow: hidden;
}

.mahal-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.mahal-card:hover .mahal-card-img {
  transform: scale(1.04);
}

.mahal-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94A3B8;
  background: #F8FAFC;
}

.mahal-area-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-sm);
}

.mahal-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.mahal-card-title {
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--color-text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.mahal-card-address {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.mahal-card-specs {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  padding-bottom: 12px;
  border-bottom: 1px dashed #E2E8F0;
  margin-bottom: 12px;
}

.mahal-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.mahal-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
}

.mahal-card-footer {
  margin-top: auto;
  padding-top: 12px;
}

/* Skeleton Loading Cards */
.skeleton-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  border: 1px solid #E2E8F0;
  height: 400px;
  padding: 16px;
  animation: skeletonPulse 1.5s infinite ease-in-out;
}

@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.skeleton-box {
  background: #E2E8F0;
  border-radius: 6px;
}

/* Mobile Filters Button */
.btn-mobile-filters {
  display: none;
}

/* ============================================================
   CARD FLOATING EFFECT — Premium elevated white surfaces
   ============================================================ */

/* Give cards a very subtle warm tint to distinguish from pure white bg */
.mahal-card {
  background: #FFFFFF;
  box-shadow:
    0 1px 3px rgba(108, 74, 182, 0.04),
    0 4px 12px rgba(108, 74, 182, 0.06),
    0 0 0 1px rgba(108, 74, 182, 0.04);
}

.mahal-card:hover {
  box-shadow:
    0 4px 6px rgba(108, 74, 182, 0.04),
    0 12px 30px rgba(108, 74, 182, 0.12),
    0 0 0 1px rgba(108, 74, 182, 0.08);
}

/* Filter sidebar — light ivory background to match page theme */
.filter-sidebar-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Top search bar — match ivory theme */
.top-search-bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ============================================================
   BOTTOM PAGE FOOTER WAVE — Mahalyaa signature flourish
   ============================================================ */

/* Thin gold-lavender wave line above the footer */
footer::before,
.site-footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 80px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 Q180,10 360,40 Q540,70 720,40 Q900,10 1080,40 Q1260,70 1440,40 L1440,80 L0,80 Z' fill='none' stroke='%236C4AB6' stroke-width='0.8' opacity='0.12'/%3E%3Cpath d='M0,55 Q180,25 360,55 Q540,85 720,55 Q900,25 1080,55 Q1260,85 1440,55' fill='none' stroke='%23C9A227' stroke-width='0.6' opacity='0.1'/%3E%3C/svg%3E") center/cover no-repeat;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE — Scale back decoratives on mobile
   ============================================================ */

@media (max-width: 991px) {
  .filter-sidebar-desktop {
    display: none;
  }
  .btn-mobile-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .hero-discovery-title {
    font-size: 1.6rem;
  }
  .mahal-card-img-wrapper {
    height: 180px;
  }
  /* Hero gets less padding on tablet */
  .hero-discovery {
    padding: 36px 0 24px 0;
  }
}

@media (max-width: 767px) {
  /* Reduce corner SVG to avoid horizontal overflow on mobile */
  body.mahals-list-page::before {
    background-size:
      200px 200px,
      200px 200px,
      260px 130px,
      260px 130px;
  }

  /* Hero top golden bar only half width on mobile */
  .hero-discovery::before {
    width: 100px;
  }

  /* Keep background blobs subtler on mobile */
  body.mahals-list-page {
    background-image:
      radial-gradient(ellipse 70% 30% at 5% 5%, rgba(230, 190, 200, 0.12) 0%, transparent 70%),
      radial-gradient(ellipse 70% 30% at 95% 5%, rgba(108, 74, 182, 0.07) 0%, transparent 65%),
      radial-gradient(ellipse 60% 25% at 0% 92%, rgba(108, 74, 182, 0.05) 0%, transparent 65%),
      radial-gradient(ellipse 60% 25% at 100% 95%, rgba(201, 162, 39, 0.05) 0%, transparent 65%);
  }
}
