/* Categories Modal for Mobile */
.categories-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.categories-modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.categories-modal-content {
  background: rgba(10, 27, 42, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  padding: 2rem;
  max-width: 90%;
  width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideInBottom 0.3s ease-out;
}

.categories-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.categories-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0;
}

.categories-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.categories-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.category-card {
  position: relative;
  height: 200px; /* Taller for better image visibility */
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  display: block; /* Ensure it behaves like a block for the image */
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: var(--gold);
}

.category-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  z-index: 0;
}

.category-card:hover .category-card-bg {
  transform: scale(1.1);
}

.category-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  text-align: center;
  z-index: 2;
  background: linear-gradient(to top, rgba(10, 27, 42, 0.95), rgba(10, 27, 42, 0.6), transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.category-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.category-count {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
