/* ---------------- RESET ---------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--background);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------------- THEME VARIABLES ---------------- */
:root {
  --primary: hsl(16, 90%, 55%);
  --primary-dark: hsl(16, 90%, 45%);
  --secondary: hsl(174, 62%, 47%);
  --background: hsl(0, 0%, 98%);
  --foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --border: hsl(214, 32%, 91%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --success: hsl(142, 71%, 45%);
  --warning: hsl(38, 92%, 50%);
  --destructive: hsl(0, 84%, 60%);
}

/* ---------------- SORTING OPTIONS ---------------- */
.services-grid-section {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 2rem 0 2rem;
}

.sort-select {
  position: relative;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  cursor: pointer;
  outline: none;
  width: auto; 
}

/* ---------------- SERVICE GRID ---------------- */
.services-grid-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  margin-top: 0;
}


/* ================= SERVICE Grid Homepage ================= */

.services-grid-home {
  display: flex;
  gap: 1rem;
  padding: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overflow-x: auto;
  cursor: grab;
}


.services-grid-home:active {
  cursor: grabbing;
}

/* Hide scrollbar but keep scrolling */
.services-grid-home::-webkit-scrollbar {
  display: none;
}



/* ================= End of SERVICE Grid Homepage ================= */



/* ---------------- SERVICE CARD ---------------- */
.service-card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* ---------------- IMAGE ---------------- */
.service-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}


.services-grid-home .service-card{
  min-width: 180px;   /* smaller width for mobile */
  flex: 0 0 180px;

}

/* ---------------- SERVICE BODY ---------------- */
.service-body {
  padding: 0.5rem;
}

/* ---------------- SERVICE TITLE ---------------- */
.service-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--foreground);
  overflow: hidden;
  line-height:1.1;
}

/* ---------------- RATING ---------------- */
.service-body .rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
}

.service-body .rating .stars {
  color: var(--primary);
  font-size: 16px;
  letter-spacing: 1px;
}

.service-body .new-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--muted);
  padding: 2px 6px;
  border-radius: 6px;
  margin-top:1px;
}


/* ---------------- PRICES ---------------- */
.service-price,
.old-price {
  display: inline-block;
  font-weight: 600;
}

.service-price {
  font-size: 1rem;
  color: var(--primary);
}

.old-price {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.service-card .discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;

  font-size: 13px;
  font-weight: 600;

  color: var(--primary);
  background-color: hsl(16, 90%, 95%); /* lighter primary */

  border-radius: 6px;
  line-height: 1;
  position: absolute;
  top: 5px;
  left: 5px;
}


/* ---------------- BOOK NOW BUTTON ---------------- */
.service-action-btn {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.service-action-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* =========================================================
   MOBILE VIEW 
   ========================================================= */
@media (max-width: 768px) {

  /* ---------- GRID ---------- */
  .services-grid-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0.8rem;
    margin-top: 0px;
  }

  /* ---------- CARD ---------- */
  .service-card {
    min-width: unset;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .service-card:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }

  /* ---------- IMAGE ---------- */
  .service-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
  }

  /* ---------- BODY ---------- */
  .service-body {
    padding: 0.5rem 0.5rem 0.5rem;
  }

  /* ---------- TITLE ---------- */
  .service-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* ---------- RATING ---------- */
  .service-body .rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
  }

  .service-body .rating .stars {
    font-size: 13px;
  }

  /* ---------- PRICES ---------- */
  .service-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
  }

  .old-price {
    font-size: 0.7rem;
    margin-left: 4px;
    color: var(--muted-foreground);
  }

  /* ---------- DISCOUNT BADGE ---------- */
  .service-card .discount-badge {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 5px;
    top: 6px;
    left: 6px;
  }

  /* ---------- BUTTON ---------- */
  .service-action-btn {
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.35rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  /* ---------- SORT DROPDOWN ---------- */
  .sort-select {
  position: relative;
  display: block;
  margin-left: auto;   /* Pushes it to the right */
  margin-right: 0;     
  width: auto;         
  font-size: 0.8rem;
}
}
/* =========================================================
   END OF MOBILE VIEW
   ========================================================= */
   
   /* Skeleton Styles */
.skeleton-card {
  background: var(--muted);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  flex: 0 0 180px;
  animation: pulse 1.5s infinite;
}

.skeleton-image {
  height: 130px;
  background: hsl(210, 40%, 85%);
  border-radius: 8px 8px 0 0;
}

.skeleton-text {
  height: 14px;
  background: hsl(210, 40%, 85%);
  border-radius: 4px;
}

.skeleton-title {
  width: 80%;
  margin: 0.5rem 0;
}

.skeleton-price {
  width: 40%;
  height: 16px;
  margin-bottom: 0.5rem;
}

@keyframes pulse {
  0% { background-color: hsl(210, 40%, 85%); }
  50% { background-color: hsl(210, 40%, 90%); }
  100% { background-color: hsl(210, 40%, 85%); }
}