:root {
  /* Brand Colors */
  --pink: #ED3B5A;
  --pink-2: #F04668;
  --green: #2E9B68;
  --red: #E5493F;

  /* Surface & Text */
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;

  /* Neutrals */
  --n-50: #f8fafc;
  --n-100: #f1f5f9;
  --n-200: #e5e7eb;
  --n-300: #d1d5db;
  --n-700: #374151;

  /* Effects */
  --shadow-1: 0 4px 16px rgba(17,24,39,.08);
  --shadow-2: 0 12px 30px rgba(17,24,39,.12);
  --ring-pink: 0 0 0 3px rgba(237,59,90,.18);

  /* Layout */
  --container: 1500px;
  --radius: 14px;
  --radius-pill: 20px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #fafbfc;
  color: var(--text);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ED3655;
  padding: 0 1rem;
  height: 3.2em;
  position: relative;
}

.header h1 {
  flex: 1;
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  overflow: hidden;
  margin: 0 0 0 0%;
  letter-spacing: 0.5px;
}

.search, .delivery {
  width: 2.5em;
  height: 3em;
  background: none;
  border: none;
  cursor: pointer;
  /* Added to remove outline on the button itself */
  outline: none;
}

.search img, .delivery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand {
  display: flex;
  align-items: center;
  height: 100%;
  width: clamp(84px, 9vw, 120px);
}

.brand video {
  width: 90%;
  height: 100%;
  object-fit: cover;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.8em;
}

/* Carousel / Hero */
.carousel, #heroCarousel, #heroCarousel .carousel-inner, #heroCarousel .carousel-item {
  overflow: hidden;
  width: 100%;
  height: 40vh;
}

.carousel-item img, #heroCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.banner-text {
  position: absolute;
  padding: 1%;
  top: 75%;
  border-radius: 12px;
  left: 10px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(39,39,39,0.36);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(2px);
}

.banner-text h2, .banner-text h3 {
  font-style: italic;
  margin: 4px 4px 0 0;
  font-weight: 500;
}

.banner-text h2 {
  font-size: 1em;
  text-shadow: 0 3px 8px rgba(157,146,146,0.45);
}

.banner-text h3 {
  font-size: 1em;
}

/* Product Grid */
.product-grid {
  margin-top: 0rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  padding: 1rem;
}

/* Product Card */
.product-card {
  position: relative;
  height: auto;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover, .product-card:focus-within {
  transform: scale(1.03);
  box-shadow: var(--shadow-2);
  z-index: 5;
}

/* Offer Badge */
.offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(45deg, var(--pink), var(--pink-2));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px var(--pink-2); }
  50% { box-shadow: 0 0 18px var(--pink); }
}

/* Image Slider */
.image-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 250px;
  border-radius: 10px 10px 0 0;
}

.track {
  display: flex;
  width: 200%;
  transition: transform 0.4s ease-in-out;
}

.slide {
  width: 50%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slider Buttons */
.nav-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 50%;
  z-index: 2;
  transition: background 0.2s;
}

.nav-btn:hover { background: rgba(255, 255, 255, 1); }
.nav-left { left: 8px; }
.nav-right { right: 8px; }

/* Product Info */
.product-info {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2%;
  text-align: center;
}

.prod-title {
  max-width: 100%;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
  align-self: flex-start;
  margin-left: 0%;
  margin-top: 2%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-category {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prod-price {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--red);
  margin-left: 0%;
  display: block;
}

.check {
  border-radius: 12px;
  width: 60%;
  font-family: 'Poppins','sans-serif';
  color: white;
  background-color: #E5493F;
  border: none;
}

.prod-offer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  margin-left: 5px;
}

.pricer {
  gap: 12px;
  margin-top: 1%;
  padding-left:5%;
  padding-right: 1%;
}

/* Loader */
#loader {
  text-align: center;
  margin: 20px 0;
  display: none;
  font-weight: bold;
  color: var(--red);
}

/* Responsive */
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 1rem; }
  .image-slider, .slide img { height: 200px; position: relative; }
  .banner-text h2 { font-size: 1em; }
  .banner-text h3 { font-size: 0.9em; }
}

/* Price + Button in one row */
.pricer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* Checkout button style */
.check {
  background: var(--pink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: 0.3s ease;
}

.check:hover {
  background:red;
  transform: scale(1.05);
}

/* --- Search Input Toggle --- */
.search-input {
  width: 0;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  padding: 0.5em 1em;
  border-radius: 16px;
  border: none;
  font-size: 1em;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,0.10);
  /* This is the key change to remove the outline */
  outline: none;
}

.search-input.active {
  width: 200px;
  opacity: 1;
}

.header-icons {
  position: relative;
}

/* New centered search input */
.search-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.icon {
  display: flex;
  overflow: hidden;
  background-color:#ED3B5A;
  width: 35%;
  height: 70%;
  align-items: flex-end;
  justify-content: end;
}

/* Skeleton shimmer */
.skeleton {
  position: relative;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    rgba(229,231,235,0) 0%,
    rgba(255,255,255,0.85) 50%,
    rgba(229,231,235,0) 100%);
  animation: shimmer 1.2s ease-in-out infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* Image area + fade-in */
.image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.image-wrapper.loaded img { opacity: 1; }
.image-wrapper .image-skeleton {
  position: absolute;
  inset: 0;
  border-radius: 10px 10px 0 0;
}

/* Text and button placeholders */
.text-skeleton { height: 14px; margin-top: 10px; }
.button-skeleton { height: 36px; border-radius: var(--radius-pill); margin-left: auto; width: 110px; }

/* Card placeholder layout */
.skeleton-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.skeleton-card .image-skeleton { height: 250px; }

/* Respect existing mobile heights */
@media (max-width: 768px) {
  .image-wrapper,
  .skeleton-card .image-skeleton { height: 200px; }
}
