

/* Main Shop Container */
.shop-container {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  max-width: 1850px;
  margin: 0 auto;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease-out;
}

.sidebar-inner {
  padding-bottom: 2rem;
}

.collection-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.collection-list li {
  margin-bottom: 0.5rem;
}

.collection-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.collection-link:hover {
  background-color: #f5f5f5;
}

.collection-list li.selected .collection-link {
  background-color: var(--primary-color);
  color: white;
}

/* Products Section */
.products {
  flex-grow: 1;
}

.collection-title {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #f9f9f9;
  position: relative;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1rem;
}

.product-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Stock Badges */
.out-of-stock-badge,
.low-stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
}

.out-of-stock-badge {
  background-color: #ff4757;
}

.low-stock-badge {
  background-color: #ffa502;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border-radius: 8px;
  width: 80%;
  max-width: 900px;
  position: relative;
  animation: modalopen 0.3s;
}

@keyframes modalopen {
  from {opacity: 0; transform: translateY(-50px)}
  to {opacity: 1; transform: translateY(0)}
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 10px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: black;
}

/* Loading indicator */
.loading-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px 40px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1001;
  pointer-events: auto;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Mobile Sidebar Toggle */
#sidebarToggleBtn {
  display: none;
  position: fixed;
  top: 10px;
  left: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  z-index: 1100;
  cursor: pointer;
}

#sidebarOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .shop-container {
    flex-direction: column;
    padding: 1rem;
    padding-top: 70px;
  }
  
  #sidebarToggleBtn {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  #sidebarOverlay.active {
    display: block;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .product-image-container {
    height: 180px;
  }
  
  .modal-content {
    width: 95%;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .product-price {
    font-size: 1.1rem;
  }
}