:root {
  --primary: #d10000;
  --primary-dark: #a30000;
  --primary-light: #ffd1d1;
  --dark: #1f2937;
  --bg: #fff;
  --nav-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 0.75rem;
  --transition: 0.25s cubic-bezier(0.56, -0.06, 0.52, 1.19);
  --z-header: 1050;

  --card-bg: #fff;
  --card-bg-dark: #1d232b;
  --card-shadow: 0 4px 28px 0 rgba(31, 41, 55, 0.09),
    0 2px 8px rgba(209, 0, 0, 0.03);
  --card-shadow-hover: 0 8px 40px 0 rgba(21, 21, 35, 0.16),
    0 6px 20px rgba(209, 0, 0, 0.06);
  --card-radius: 1.3rem;
  --card-border: 1.3px solid #f0f2f3;
  --card-border-dark: 1.5px solid #222734;
  --space: 2.2rem;
  --muted: #757f95;
  --muted-dark: #bdc3c8;
  --title: #181d24;
  --title-dark: #fafbff;
  --excerpt: #384165;
  --excerpt-dark: #dde4f0;
  --meta-font: 0.97rem;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  background: var(--bg);
  color: var(--dark);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.cart-icon {
  position: relative;
  font-size: 1.4rem;
  color: var(--dark);
}
.stars {
  color: #ffc107;
}


.product-card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.shop-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54vw;
  min-height: clamp(370px, 63vw, 680px);
  width: 100vw;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 2.8rem;
  box-shadow: 0 8px 32px 0 rgba(31, 41, 55, 0.09);
  border-radius: 0 0 2.2rem 2.2rem;
  z-index: 1;
  background: #fff;
}



.shop-hero-bg {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100%;
  background: url("https://images.unsplash.com/photo-1599058917765-a780eda07a3e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2069&q=80")
    center center/cover no-repeat;
  filter: brightness(0.84) contrast(1.08) saturate(1.11) blur(0.4px);
  z-index: 0;
  transition: filter 0.33s;
  animation: heroServiceZoom 10s cubic-bezier(0.22, 0, 0.46, 1.08) infinite
    alternate;
}

@keyframes heroServiceZoom {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.035);
  }
}

.shop-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.74) 30%,
      rgba(209, 0, 0, 0.17) 100%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.13) 0%,
      rgba(31, 41, 55, 0.08) 96%
    );
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
  opacity: 0.96;
  pointer-events: none;
}

.shop-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 auto;
  width: min(93vw, 750px);
  padding: clamp(2.1rem, 7vw, 4rem) 1.3rem;
  background: rgba(255, 255, 255, 0.83);
  border-radius: 1.4em;
  box-shadow: 0 10px 38px rgba(31, 41, 55, 0.1),
    0 3px 16px rgba(209, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  opacity: 0;
  transform: translateY(52px) scale(0.96);
  animation: servicesHeroIn 1.2s cubic-bezier(0.63, -0.06, 0.45, 1.13) 0.09s
    forwards;
}

.shop-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 auto;
  width: min(93vw, 750px);
  padding: clamp(2.1rem, 7vw, 4rem) 1.3rem;
  background: rgba(255, 255, 255, 0.83);
  border-radius: 1.4em;
  box-shadow: 0 10px 38px rgba(31, 41, 55, 0.1),
    0 3px 16px rgba(209, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  opacity: 0;
  transform: translateY(52px) scale(0.96);
  animation: servicesHeroIn 1.2s cubic-bezier(0.63, -0.06, 0.45, 1.13) 0.09s
    forwards;

}

.shop-hero-content-search{
  position: relative;
  z-index: 2;
  text-align: center;
  margin: 0 auto;
  width: min(93vw, 750px);
  padding: clamp(2.1rem, 7vw, 4rem) 1.3rem;
 
  border-radius: 1.4em;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  opacity: 0;
  transform: translateY(52px) scale(0.96);
  animation: servicesHeroIn 1.2s cubic-bezier(0.63, -0.06, 0.45, 1.13) 0.09s
    forwards;
}

@keyframes servicesHeroIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.shop-hero-content h1 {
  font-size: clamp(2.7rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.012em;
  margin: 0 0 0.3em 0;
  color: var(--primary);
  line-height: 1.08;
  text-shadow: 0 4px 22px rgba(209, 0, 0, 0.1);
  background: linear-gradient(
    85deg,
    var(--primary-light) 7%,
    var(--primary) 89%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shop-hero-content .subtitle {
  font-size: clamp(1.17rem, 3vw, 1.7rem);
  font-weight: 500;
  color: #2e3035;
  margin-top: 0;
  margin-bottom: 0.2em;
  opacity: 0.97;
  text-shadow: 0 2px 8px rgba(30, 0, 0, 0.1);
}

/* Shop Filters */
.shop-filters {
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.filter-group select,
.filter-group input {
  padding: 0.75rem 1rem;
  border: 1.6px solid #ebc8c8;
  border-radius: 0.9em;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.91);
  color: #23272b;
  transition: border 0.24s, background 0.2s, box-shadow 0.18s;
}

.filter-group select:focus,
.filter-group input:focus {
  border: 1.6px solid var(--primary);
  background: #fff;
  box-shadow: 0 1px 11px rgba(209, 0, 0, 0.1);
  outline: none;
}


/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space);
  max-width: 1200px;
  margin: 0 auto 4.5rem auto;
  padding: var(--space);
}

.product-card {
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: var(--card-border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  transition: box-shadow 0.21s cubic-bezier(0.55, 0.13, 0.17, 1.15),
    transform 0.18s cubic-bezier(0.57, 0.19, 0.37, 1.25);
  will-change: transform, box-shadow;
  position: relative;
  cursor: pointer;
}

.product-card:hover,
.product-card:focus-within {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-5px) scale(1.022);
}

.product-card-img-wrap {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f7f8fb;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.38s cubic-bezier(0.53, 0.11, 0.41, 1.24);
}

.product-card:hover .product-card-img,
.product-card:focus-within .product-card-img {
  transform: scale(1.07);
}

.product-card-badge {
  position: absolute;
  top: 0.8em;
  left: 0.85em;
  background: linear-gradient(
    90deg,
    var(--primary) 75%,
    var(--primary-dark) 100%
  );
  color: #fff;
  font-weight: 600;
  font-size: 0.9em;
  padding: 0.36em 1.01em 0.29em 0.95em;
  border-radius: 0.43em;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.02em;
  max-width: 85%;
  pointer-events: none;
  user-select: none;
}

.product-card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-title {
  font-size: 1.33rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.007em;
  line-height: 1.27;
  margin: 0 0 0.62rem 0;
  min-height: 2.5em;
  max-height: 2.55em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-description {
  color: var(--excerpt);
  font-size: 1.04rem;
  margin: 0 0 1.4rem 0;
  flex: 1 1 auto;
  line-height: 1.6;
  max-height: 4.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.current-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.original-price {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  gap: 0.75rem;
}

.add-to-cart-btn {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 2em;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.wishlist-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.wishlist-btn:hover {
  background: #fff5f5;
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Cart Preview */
.cart-preview {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 320px;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow-hover);
  z-index: 1000;
  padding: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.cart-preview.active {
  display: flex;
}

.cart-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f2f3;
  padding-bottom: 0.75rem;
}

.cart-preview-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--title);
  margin: 0;
}

.cart-preview-items {
  max-height: 300px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f2f3;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 700;
}

.cart-preview-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
}

.view-cart-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 2em;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}

.view-cart-btn:hover {
  background: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.7rem;
    padding: 1.8rem;
  }
}

@media (max-width: 680px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.1rem;
  }

  .shop-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-preview {
    width: 90%;
    right: 5%;
    left: 5%;
  }
}
