/* Product Category Section Styles */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 80%;
  max-width: 1200px;
  margin: 40px auto;
}

.category-box {
  position: relative;
  height: 250px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.category-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.8;
  transition: all 0.4s ease;
}

.category-box:hover .category-image {
  opacity: 0.6;
  transform: scale(1.1);
}

.category-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  width: 100%;
}

.category-title {
  color: white;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.category-description {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 15px;
  font-size: 14px;
  opacity: 0.8;
  transform: translateY(20px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
}

.category-box:hover .category-description {
  opacity: 1;
  transform: translateY(0);
  height: auto;
}

.category-preview {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.1s;
}

.category-box:hover .category-preview {
  opacity: 1;
  transform: translateY(0);
}

.preview-item {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 12px;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr;
    width: 90%;
  }
  
  .category-box {
    height: 200px;
  }
}

/* Category Page Styles */
.subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
}

.subcat-box {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  cursor: pointer;
}

.subcat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.subcat-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.subcat-info {
  padding: 15px;
}

.subcat-name {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
}

.subcat-price {
  font-size: 16px;
  color: #007bff;
  font-weight: 600;
}

.category-header {
  text-align: center;
  margin: 30px 0;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.back-to-home {
  display: inline-block;
  margin-top: 10px;
  color: white;
  text-decoration: none;
  background-color: rgba(0, 123, 255, 0.7);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.back-to-home:hover {
  background-color: rgba(0, 123, 255, 0.9);
}

/* Custom category colors */
.vape-category {
  border-bottom: 4px solid #4a90e2;
}

.edibles-category {
  border-bottom: 4px solid #7ed321;
}

.cosmetics-category {
  border-bottom: 4px solid #bd10e0;
}