:root {
  --primary-color: #ff5722;
  --secondary-color: #ffffff;
  --bg-color: #f9f9f9;
  --accent-color: #faf201;
  --hover-color: #e64a19;
  --card-bg: #fff;
  --a-color: #ff7300;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: var(--bg-color);
}

body {
  font-family: sans-serif;
  background-color: var(--bg-color);
}

/* Header Styles */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .logo {
  font-size: 1.2rem;
  font-weight: bold;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  transition: right 0.3s ease;
}

.nav-links li a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.nav-links li a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent-color);
  transform: translateY(2px);
  background: rgba(255, 255, 255, 0.1);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--secondary-color);
  border-radius: 2px;
  transition: 0.3s;
}

.hamburger:hover span {
  background: var(--accent-color);
  transform: scaleX(1.2);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-item i {
  font-size: 2rem;
  color: var(--accent-color);
}

.stat-item span {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Search and Filter Section */
.search-filter-section {
  background: white;
  padding: 2rem;
  margin: -2rem 2rem 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.search-container {
  margin-bottom: 1.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 50px;
  padding: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.search-box i {
  color: #666;
  margin: 0 1rem;
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  padding: 0.75rem;
  font-size: 1rem;
  outline: none;
}

.search-box button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--hover-color);
}

.filter-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.category-filter,
.sort-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-filter label,
.sort-container label {
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-filter select,
.sort-container select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: white;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.category-filter select:focus,
.sort-container select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Products Section */
.products-section {
  padding: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  background: white;
  border: 2px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Product Grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.products.list-view {
  grid-template-columns: 1fr;
}

.products.list-view .product-card {
  display: flex;
  max-width: 800px;
  margin: 0 auto;
}

.products.list-view .product-image {
  width: 200px;
  flex-shrink: 0;
}

.products.list-view .product-info {
  flex: 1;
  padding: 1.5rem;
}

/* Product Cards */
.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

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

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

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.quick-view-btn,
.wishlist-btn {
  background: white;
  color: var(--primary-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-view-btn:hover,
.wishlist-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--success-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-badge.sale {
  background: var(--danger-color);
}

.product-badge.premium {
  background: var(--warning-color);
}

.product-badge.hot {
  background: var(--info-color);
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.product-rating i {
  color: var(--warning-color);
  font-size: 0.875rem;
}

.product-rating span {
  color: #666;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

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

.add-to-cart-btn {
  flex: 1;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

.modal-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.close-btn:hover {
  transform: scale(1.2);
}

.modal-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.product-preview img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group label {
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: scale(1.05);
}

.qty-btn:active {
  transform: scale(0.95);
}

#quantityInput {
  width: 4rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  background: #fff;
  color: #374151;
  transition: all 0.3s ease;
}

#quantityInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#quantityInput:invalid {
  border-color: #ef4444;
}

.price-summary {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.price-item:last-child {
  margin-bottom: 0;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.order-btn {
  background: var(--success-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.order-btn:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    gap: 1.5rem;
    background: var(--primary-color);
    padding: 1.5rem 1rem;
    border-radius: 10px 0 0 10px;
    z-index: 999;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .search-filter-section {
    margin: -1rem 1rem 1rem;
    padding: 1.5rem;
  }

  .search-box {
    max-width: 100%;
    padding: 0.75rem;
  }

  .search-box input {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .search-box button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 60px;
  }

  .search-box i {
    margin: 0 0.5rem;
    font-size: 0.9rem;
  }

  .filter-container {
    flex-direction: column;
    gap: 1rem;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .products {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .search-filter-section {
    margin: -0.5rem 0.5rem 0.5rem;
    padding: 1rem;
  }

  .search-box {
    padding: 0.5rem;
    border-radius: 25px;
  }

  .search-box input {
    padding: 0.4rem;
    font-size: 0.85rem;
  }

  .search-box button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-width: 50px;
    border-radius: 20px;
  }

  .search-box i {
    margin: 0 0.3rem;
    font-size: 0.85rem;
  }

  .products {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  .section-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Active state for hamburger */
.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  transform: translateX(40px);
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Quantity Input Styling for Bengali Numerals */
#quantityInput {
  font-family: 'Noto Sans Bengali', 'SolaimanLipi', 'Arial', sans-serif;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  direction: ltr;
  unicode-bidi: bidi-override;
}

#quantityInput::placeholder {
  color: #999;
  font-family: 'Noto Sans Bengali', 'SolaimanLipi', 'Arial', sans-serif;
}

/* Ensure Bengali numerals are properly displayed */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: scale(1.05);
}

.qty-btn:active {
  transform: scale(0.95);
}

#quantityInput {
  width: 4rem;
  height: 2.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  background: #fff;
  color: #374151;
  transition: all 0.3s ease;
}

#quantityInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#quantityInput:invalid {
  border-color: #ef4444;
}

/* Bengali numeral specific styling */
@font-face {
  font-family: 'Noto Sans Bengali';
  src: url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600&display=swap');
}

/* Fallback for Bengali numerals */
@supports not (font-family: 'Noto Sans Bengali') {
  #quantityInput {
    font-family: 'SolaimanLipi', 'Arial', sans-serif;
  }
}

