:root {
  --primary: #2563eb;
  --secondary: #1e40af;
  --accent: #3b82f6;
  --dark: #1e293b;
  --light: #ffffff;
  --background: #f1f5f9;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--accent);
  outline: none;
}

header.sticky-nav {
  background-color: white;
  box-shadow: 0 2px 8px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.sticky-nav:hover {
  box-shadow: 0 4px 12px var(--shadow-color);
}

.container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

nav a {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
}

nav a:hover,
nav a.active {
  color: var(--primary);
  background-color: #e0e7ff;
}

.hero-gradient {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.9) 0%,
    rgba(30, 64, 175, 0.95) 100%
  );
  padding: 2.5rem 1.5rem;
  max-height: 700px;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  margin-bottom: 2rem;
  color: white;
}

.hero-gradient h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-gradient p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

#explore-products {
  background-color: white;
  color: var(--primary);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  box-shadow: 0 6px 15px var(--shadow-color);
  transition: background-color 0.3s ease, color 0.3s ease,
    box-shadow 0.3s ease;
}

#explore-products:hover,
#explore-products:focus {
  background-color: var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
  outline: none;
}

.category-btn {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid transparent;
}

.category-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.category-btn:not(.active):hover {
  background-color: #e0e7ff;
  color: var(--primary);
  border-color: var(--primary);
}

.product-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px var(--shadow-color);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow-color);
}

.product-card img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card img:hover {
  transform: scale(1.05);
}

.product-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.product-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.product-card .price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.whatsapp-btn,
.add-to-cart-btn {
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.whatsapp-btn {
  background-color: #25d366;
  color: white;
}

.whatsapp-btn:hover,
.whatsapp-btn:focus {
  background-color: #1ebe57;
  transform: scale(1.05);
  outline: none;
}

.add-to-cart-btn {
  background-color: var(--primary);
  color: white;
}

.add-to-cart-btn:hover,
.add-to-cart-btn:focus {
  background-color: var(--accent);
  transform: scale(1.05);
  outline: none;
}

.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 50;
}

#cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background-color: white;
  box-shadow: -4px 0 12px var(--shadow-color);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 0 0 0 0.75rem;
}

#cart-sidebar.show {
  transform: translateX(0);
}

#cart-sidebar header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#cart-sidebar header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

#close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

#close-cart:hover,
#close-cart:focus {
  color: var(--primary);
  outline: none;
}

#cart-items {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}

#cart-items div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

#cart-items p {
  margin: 0;
  color: var(--text-secondary);
}

#buy-now {
  background-color: var(--primary);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

#buy-now:hover:not(:disabled),
#buy-now:focus:not(:disabled) {
  background-color: var(--accent);
  outline: none;
}

#buy-now:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#cart-toggle {
  position: fixed;
  bottom: 90px;
  right: 30px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 1100;
}

#cart-toggle:hover,
#cart-toggle:focus {
  background-color: var(--accent);
  transform: scale(1.1);
  outline: none;
}

@media (max-width: 768px) {
  .product-card {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 640px) {
  .product-card {
    width: 100%;
  }

  .hero-gradient {
    padding: 2rem 1rem;
  }

  #cart-sidebar {
    width: 100%;
    border-radius: 0;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Slider styles */
.slider-container {
  position: relative;
  width: 100%;
  height: 16rem;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px var(--shadow-color),
    0 4px 6px -2px var(--shadow-color);
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s ease-in-out;
}

.slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
}

.product-card img {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: #fff;
}

.product-card .relative.overflow-hidden {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}