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

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

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

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.product-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #f0f0f0;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #555;
}

.product-card h2 {
  margin: 0.5rem 0 1rem;
  font-size: 1.2rem;
  line-height: 1.4;
}

.product-card .description {
  margin-bottom: 1.5rem;
  color: #666;
  flex-grow: 1;
}

.license-info {
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #0066cc;
}

.license-count {
  color: #0066cc;
  font-weight: 500;
  font-size: 0.875rem;
}

.product-footer, .product-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.price.free {
  color: #28a745;
}

.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #0066cc;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: #0052a3;
}

.button.primary {
  background-color: #28a745;
}

.button.primary:hover {
  background-color: #218838;
}

/* Product Filters */
.product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.filter {
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter.active {
  background-color: #0066cc;
  color: white;
  border-color: #0066cc;
}

.search-container {
  margin-left: auto;
}

#product-search {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  
  .product-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }
  
  #product-search {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Welcome Section Styles */
.welcome-section {
  max-width: 420px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem;
  border: 1.5px solid #111;
  border-radius: 0;
  background: #fff;
}

.welcome-section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.welcome-section p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #666;
}

.welcome-form {
  width: 100%;
  margin-bottom: 1.2rem;
}

.welcome-form .form-group {
  margin-bottom: 1rem;
}

.welcome-form label {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: block;
  text-align: left;
  font-weight: 500;
}

.welcome-input {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.75rem;
  background: #ddd;
  border: none;
  margin-bottom: 0.7rem;
  text-align: left;
}

.welcome-form .button {
  width: 100%;
  background: #000;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  border: none;
  padding: 0.9rem 0;
  margin-bottom: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}

.welcome-form .button:hover {
  background: #222;
}

.welcome-skip {
  margin-top: 0.5rem;
  width: 100%;
  text-align: center;
}

.welcome-skip a {
  font-size: 1.1rem;
  color: #111;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}

.welcome-skip a:hover {
    text-decoration: underline;
}



.alert {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Enhanced Filter System */
.product-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Search Filters */
.search-filters {
    margin-bottom: 0.5rem;
}

.search-input-container {
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: #888;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-clear:hover {
    background: #555;
}

/* Filter sections */
.category-filters,
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 500;
    color: #666;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Category filters - light grey */
.category-filter {
    padding: 0.4rem 0.8rem;
    background: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #888;
    transition: all 0.2s ease;
}

.category-filter:hover {
    color: #555;
    border-color: #bbb;
}

.category-filter.active {
    background-color: #888;
    color: white;
    border-color: #888;
}



/* Tag filter toggle */
.tag-filter-toggle {
    padding: 0.5rem 1rem;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    transition: background-color 0.2s ease;
}

.tag-filter-toggle:hover {
    background-color: #0052a3;
}

.filter-count {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Tag filter dropdown */
.tag-filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5rem;
    padding: 1rem;
    max-width: 500px;
}

.tag-filters {
    position: relative;
}

/* Tag grid */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.tag-checkbox:hover {
    background-color: #f8f9fa;
}

.tag-checkbox input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.tag-label {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}



/* Tag actions */
.tag-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.clear-tags {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s ease;
}

.clear-tags:hover {
    background-color: #f8f9fa;
    border-color: #bbb;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-filters {
        gap: 0.75rem;
    }
    
    .search-input-container {
        max-width: 100%;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 0.65rem 2.25rem 0.65rem 0.9rem;
    }
    
    .search-clear {
        width: 22px;
        height: 22px;
        font-size: 14px;
        right: 0.65rem;
    }
    
    .category-filters,
    .tag-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-label {
        margin-bottom: 0.25rem;
    }
    
    .tag-filter-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        max-height: 70vh;
    }
    
    .tag-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        max-height: 200px;
    }
    
    .tag-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-filters {
        padding: 0.75rem;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 0.6rem 2rem 0.6rem 0.8rem;
    }
    
    .search-clear {
        width: 20px;
        height: 20px;
        font-size: 12px;
        right: 0.6rem;
    }
    
    .category-filter {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    .tag-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* RSS Feed Section Styles */
.rss-feeds {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.rss-feeds h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.feed-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.feed-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.feed-link:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.feed-icon {
    font-size: 1.1rem;
}

/* Responsive design for RSS feeds */
@media (max-width: 768px) {
    .feed-links {
        flex-direction: column;
    }
    
    .feed-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rss-feeds {
        padding: 1rem;
    }
    
    .feed-links {
        gap: 0.5rem;
    }
    
    .feed-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}