*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
  --gold:        #e8a020;
  --green-mid:    #2a7a4e;
  --badge:        #d4006a;
  --bg:           #ffffff;
  --card-bg:      #ffffff;
  --text:         #1a1a1a;
  --muted:        #888;
  --border:       #e0e0dc;
  --radius:       14px;
  --shadow:       0 2px 18px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.psect1{
    background-image: url(../img/Products\ Pic.png);
    background-color: #BCB1B9;
    width: 100%;
    padding: 32px 60px;
    padding-top: 20px;
    height: 650px;
    background-size: calc(570px + 500px);
    background-position: center;
    background-position-y:-150px ;
    line-height: 100%;
    background-repeat: no-repeat;

}

.text{
    text-align: center;
    margin: 8% auto 0;   /* centers the whole box */
    font-style: bold;
    width: 996px;
    letter-spacing: -0.5px;
    gap: 8px;
}

.text1{
    font-size: 30px;
    color: #D60088;
    font-family: 'Quicksand', sans-serif;
    font-style: bold;
    line-height: 70px;
}

.nav-link:nth-child(2){
    /* background-color: rgba(255, 255, 255, 0.1); */
    color: #FFF94D;
    font-size: 17px;  
    font-weight: 600;
}
/* ── PAGE HEADER ─────────────────────────────────── */
.psect2{
  background-color: #ffffff;
}
.page-header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin: 24px 40px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

/* ── SEARCH ──────────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,92,56,0.1);
}
.search-wrap input {
  border: none;
  outline: none;
  padding: 9px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  width: 220px;
  background: transparent;
  color: var(--text);
}
.search-wrap button {
  background: var(--green-mid);
  border: none;
  cursor: pointer;
  padding: 9px 14px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  border-radius: 0 8px 8px 0;
}

.search-wrap button i {
  color: #fff;
  font-size: 0.875rem;
}
.search-wrap button:hover { background: var(--green-mid); }

/* ── MAIN ────────────────────────────────────────── */
main { padding: 0 40px 60px; }

/* ── CATEGORY SECTION ────────────────────────────── */
.category-section { margin-bottom: 52px; }

.category-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.category-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0; right: 0;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

/* ── PRODUCT GRID ────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── PRODUCT CARD ────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;

  /* stagger fade-in using nth-child */
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}
.product-card:nth-child(1) { animation-delay: 0.00s; }
.product-card:nth-child(2) { animation-delay: 0.07s; }
.product-card:nth-child(3) { animation-delay: 0.14s; }
.product-card:nth-child(4) { animation-delay: 0.21s; }
.product-card:nth-child(5) { animation-delay: 0.28s; }
.product-card:nth-child(6) { animation-delay: 0.35s; }

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ── CARD IMAGE ──────────────────────────────────── */
.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f7e84b 0%, #b8f0a0 50%, #a0e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.product-card:hover .card-image img { transform: scale(1.06); }

/* ── DISCOUNT BADGE ──────────────────────────────── */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--badge);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  /* 12-point starburst */
  clip-path: polygon(
    50%  0%,  61%  7%,  74%  4%,  78% 17%,
    91% 20%,  88% 34%,  98% 42%,  88% 50%,
    98% 58%,  88% 66%,  91% 80%,  78% 83%,
    74% 96%,  61% 93%,  50% 100%, 39% 93%,
    26% 96%,  22% 83%,   9% 80%,  12% 66%,
     2% 58%,  12% 50%,   2% 42%,  12% 34%,
     9% 20%,  22% 17%,  26%  4%,  39%  7%
  );
}

/* ── CARD BODY ───────────────────────────────────── */
.card-body {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

a.product-name {
    color: var(--text);
    text-decoration: none;
}
a.product-name:hover {
    text-decoration: underline;
}

/* ── STARS ───────────────────────────────────────── */
/*
  Two overlapping spans of Unicode star characters.
  The background span is grey, the foreground span is
  gold and clipped via width (set inline in HTML).
  This gives proportional partial stars with zero JS.
*/
.stars {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 6px;
  /* fix letter-spacing so stars sit flush */
  letter-spacing: 2px;
}
.stars-bg {
  color: #ddd;
  display: block;
  white-space: nowrap;
}
.stars-fg {
  color: #f5a623;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  /* width is set inline per card e.g. style="width:80%" */
}

/* ── PRICE ───────────────────────────────────────── */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 10px;
}
.price-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.price-now {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.price-old {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: line-through;
}

/* ── ADD TO CART BUTTON ──────────────────────────── */
.btn-cart {
 background: linear-gradient(135deg, var(--gold), #c07010);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-cart:hover  { background: var(--green-mid); }
.btn-cart:active { transform: scale(0.97); }

/* Slider Styles */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.product-grid-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.product-grid-slider::-webkit-scrollbar {
    display: none;
}

.product-grid-slider .product-card {
    min-width: calc(25% - 15px);
    margin: 0;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e0e0dc;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    z-index: 10;
    color: #1a1a1a;
}

.slider-btn:hover:not(:disabled) {
    background: #2a7a4e;
    color: white;
    border-color: #2a7a4e;
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px;
    grid-column: 1 / -1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2a7a4e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px;
    grid-column: 1 / -1;
}

.error-state i {
    font-size: 48px;
    color: #d4006a;
    margin-bottom: 20px;
}

.retry-btn {
    background: #2a7a4e;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.retry-btn:hover {
    background: #1e5a3a;
}

.retry-btn {
    background: #2a7a4e;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.retry-btn:hover {
    background: #1e5a3a;
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid-slider {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-grid-slider .product-card {
        min-width: calc(33.33% - 14px);
    }
  
}


@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .main { padding-left: 20px; padding-right: 20px; }
  .product-grid-slider {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-grid-slider .product-card {
        min-width: calc(50% - 10px);
    } 
    .psect1{
        height: 370px;
        padding: 20px 30px;
    }
}
@media (max-width: 480px) {
  .psect1 {
        height: 260px;
        padding: 16px 20px;
    }
  .product-grid { grid-template-columns: 1fr; }
  .search-wrap input { width: 140px; }
   .slider-container {
        margin: 0 10px;
    }
    .product-grid-slider {
        grid-template-columns: 1fr;
    }
    .product-grid-slider .product-card {
        min-width: calc(100% - 10px);
    }
    .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}