/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navigation */
.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-brand h1 {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.02em;
}

.nav-links {
  display: none;
  gap: 1.5rem;
}

.nav-link {
  color: #666666;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #000000;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: #000000;
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 1rem;
  color: #666666;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  color: #000000;
  background: #f5f5f5;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #000000;
  color: white;
  font-size: 0.6rem;
  padding: 2px 5px;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666666;
  cursor: pointer;
  padding: 0.5rem;
}

/* Shop Container */
.shop-container {
  min-height: 100vh;
}

/* Shop Header */
.shop-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 2rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.breadcrumb {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #666666;
}

.breadcrumb a {
  color: #666666;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #000000;
}

.breadcrumb span {
  margin: 0 0.5rem;
}

.shop-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: #000000;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.shop-subtitle {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #666666;
  max-width: 600px;
}

/* Shop Main */
.shop-main {
  padding: 1.5rem 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-filter-toggle i {
  transition: transform 0.3s ease;
}

.mobile-filter-toggle.active i {
  transform: rotate(180deg);
}

/* Sidebar */
.shop-sidebar {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.shop-sidebar.active {
  max-height: 2000px;
}

.filter-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-title {
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.75rem;
}

/* Search Box */
.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.search-input:focus {
  outline: none;
  border-color: #000000;
  background: #ffffff;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666666;
  font-size: 0.9rem;
}

/* Filter List */
.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-item-label {
  display: block;
  cursor: pointer;
  margin-bottom: 0.25rem;
}

.filter-item-label input[type="radio"] {
  display: none;
}

.filter-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #666666;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.filter-item-label:hover .filter-item {
  background: #f5f5f5;
  color: #000000;
}

.filter-item-label input[type="radio"]:checked + .filter-item,
.filter-item.active {
  background: #000000;
  color: #ffffff;
}

/* Price Inputs */
.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fafafa;
  transition: all 0.3s ease;
}

.price-input:focus {
  outline: none;
  border-color: #000000;
  background: #ffffff;
}

.apply-price-btn {
  width: 100%;
  padding: 0.5rem;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.apply-price-btn:hover {
  background: #333333;
}

/* Clear Filters */
.clear-filters {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  color: #666666;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  font-size: 0.85rem;
}

.clear-filters:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

/* Shop Content */
.shop-content {
  min-height: 100vh;
}

/* Results Header */
.results-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.results-title {
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  color: #000000;
  margin-bottom: 0.25rem;
}

.results-count {
  color: #666666;
  font-size: 0.85rem;
}

.view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sort-dropdown {
  flex: 1;
  max-width: 200px;
}

.sort-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #ffffff;
  color: #666666;
  font-size: 0.85rem;
  cursor: pointer;
}

.view-options {
  display: flex;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

.view-btn {
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: none;
  color: #666666;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.view-btn:hover {
  background: #f5f5f5;
  color: #000000;
}

.view-btn.active {
  background: #000000;
  color: #ffffff;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

/* Product Card */
.product-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #d0d0d0;
}

/* Product Image */
.product-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  background: #f8f9fa;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.03);
}

/* Product Badges */
.product-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
}

.badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.badge.featured {
  background: #000000;
  color: #ffffff;
}

.badge.new {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
}

.badge.sale {
  background: #ff4444;
  color: #ffffff;
}

/* Product Actions */
.product-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover .product-actions {
  opacity: 1;
}

.action-btn {
  width: 2rem;
  height: 2rem;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
}

.action-btn:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: scale(1.05);
}

/* Quick Add */
.quick-add {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.product-card:hover .quick-add {
  opacity: 1;
}

.quick-add-btn {
  width: 100%;
  padding: 0.5rem;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  text-decoration: none;
  display: block;
  text-align: center;
}

.quick-add-btn:hover {
  background: #333333;
  transform: translateY(-1px);
}

/* Product Info */
.product-info {
  padding: 1rem;
}

.product-category {
  font-size: 0.7rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-name a {
  color: inherit;
  text-decoration: none;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.stars {
  display: flex;
  gap: 0.1rem;
}

.stars i {
  font-size: 0.7rem;
  color: #e5e5e5;
}

.stars i.filled {
  color: #fbbf24;
}

.rating-text {
  font-size: 0.7rem;
  color: #666666;
}

/* Product Price */
.product-price {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.current-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #000000;
}

.original-price {
  font-size: 0.9rem;
  color: #999999;
  text-decoration: line-through;
}

.discount-percent {
  display: inline-block;
  background: #ff4444;
  color: #ffffff;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 600;
}

/* Add to Cart Button */
.add-to-cart-btn {
  width: 100%;
  padding: 0.6rem;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.add-to-cart-btn:hover {
  background: #333333;
  transform: translateY(-1px);
}

/* No Products */
.no-products {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.no-products-content {
  text-align: center;
  max-width: 400px;
}

.no-products-icon {
  font-size: 3rem;
  color: #e5e5e5;
  margin-bottom: 1rem;
}

.no-products h3 {
  font-size: 1.2rem;
  color: #333333;
  margin-bottom: 0.5rem;
}

.no-products p {
  color: #666666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.clear-filters-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.clear-filters-btn:hover {
  background: #333333;
}

/* Pagination */
.pagination-section {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.load-more-btn {
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.load-more-btn:hover {
  background: #000000;
  color: #ffffff;
}

/* List View */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
  display: flex;
  max-height: 180px;
}

.products-grid.list-view .product-image {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.products-grid.list-view .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Responsive Design */
@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .product-image {
    height: 280px;
  }

  .product-info {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .mobile-filter-toggle {
    display: none;
  }

  .shop-main {
    padding: 2rem 0;
  }

  .shop-layout {
    grid-template-columns: 280px 1fr;
    gap: 2rem;
  }

  .shop-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: none;
    overflow: visible;
  }

  .shop-sidebar.active {
    max-height: none;
  }

  .filter-card {
    padding: 1.5rem;
  }

  .results-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .view-controls {
    justify-content: flex-end;
  }

  .sort-dropdown {
    flex: none;
  }

  /* 2 cards per row on tablets */
  .products-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .shop-layout {
    grid-template-columns: 320px 1fr;
    gap: 3rem;
  }

  /* 3 cards per row on desktop */
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .product-image {
    height: 320px;
  }

  .product-info {
    padding: 1.5rem;
  }
}

@media (min-width: 1400px) {
  /* 4 cards per row on large desktop */
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .nav-container {
    padding: 0.75rem;
  }

  .shop-header {
    padding: 1.5rem 0;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .product-image {
    height: 160px;
  }

  .product-info {
    padding: 0.75rem;
  }

  .product-name {
    font-size: 0.85rem;
  }

  .current-price {
    font-size: 1rem;
  }

  .filter-card {
    padding: 1rem;
  }

  .products-grid.list-view .product-card {
    flex-direction: column;
    max-height: none;
  }

  .products-grid.list-view .product-image {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .product-image {
    height: 140px;
  }

  .product-info {
    padding: 0.5rem;
  }

  .product-name {
    font-size: 0.8rem;
  }

  .current-price {
    font-size: 0.9rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .product-actions {
    opacity: 1;
  }

  .quick-add {
    opacity: 1;
  }

  .action-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .nav-btn {
    min-width: 44px;
    min-height: 44px;
  }
}


/* Notification Toast */
.notification-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 1000;
  border: 1px solid #f0f0f0;
}

.notification-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 20px 25px;
}

.toast-icon {
  margin-right: 15px;
  color: #28a745;
  font-size: 1.5rem;
}

.toast-message {
  font-weight: 600;
  font-size: 1rem;
  color: #000;
}
