/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* Hero Section (unified header + hero) */
.hero {
    background: linear-gradient(135deg, #003545 0%, #005570 100%);
    color: white;
    padding: 0 20px;
    margin-bottom: 0;
}

.hero-top {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.header-logo img {
    height: 80px;
    display: block;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.header-socials {
    display: flex;
    gap: 12px;
    align-self: center;
    padding-bottom: 5px;
}

.header-social-link {
    color: white;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
}

.header-social-link:hover {
    opacity: 1;
}

.header-nav {
    display: flex;
    gap: 8px;
}

.header-btn {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.header-btn--download {
    background: white;
    color: #003545;
}

.header-btn--download:hover {
    background: #e9ecef;
}

.header-btn--github {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.header-btn--github:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.hero__content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 0 80px;
}

/* Hero CTA */
.hero-cta {
    display: inline-block;
    margin-top: 20px;
    color: white;
    opacity: 0.85;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.hero-cta:hover {
    opacity: 1;
}

/* Footer */
/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #003545;
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.2s ease;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: #005570;
}

.site-footer {
    background: linear-gradient(135deg, #003545 0%, #005570 100%);
    color: white;
    padding: 30px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-contact {
    font-size: 0.95rem;
    margin: 0 0 12px 0;
    opacity: 0.85;
}

.footer-contact a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-contact a:hover {
    opacity: 1;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

.footer-copyright a {
   color: white; 
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
}

/* Category Filter Bar */
/* Category filter bar - mobile only */
.category-filter-bar {
    display: none;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Hamburger toggle - hidden on desktop */
.category-menu-toggle {
    display: none;
    background: none;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.category-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #495057;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Desktop category dropdown */
.category-bar-desktop {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-bar-desktop > .category-btn--sponsor {
    border-radius: 20px;
}

.category-dropdown {
    position: relative;
}

.category-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #003545;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.category-dropdown-toggle:hover {
    border-color: #003545;
}

.category-dropdown-icon {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.category-dropdown:hover .category-dropdown-icon {
    transform: rotate(180deg);
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 101;
}

.category-dropdown:hover .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-dropdown-menu .category-btn {
    width: 100%;
    text-align: left;
    border-radius: 8px;
}

/* Mobile category container - hidden on desktop */
.category-filter-container {
    display: none;
}

.category-btn {
    background: white;
    border: 2px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
    font-family: inherit;
    flex-shrink: 0;
    white-space: nowrap;
}

.category-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.category-btn.active {
    background: #003545;
    color: white;
    border-color: #003545;
}

.category-btn--sponsor {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border-color: #FFA500;
    font-weight: 700;
}

.category-btn--sponsor:hover {
    background: linear-gradient(135deg, #FFC800 0%, #FF9500 100%);
    border-color: #FF8C00;
}

.category-btn--sponsor.active {
    background: #333;
    color: #FFD700;
    border-color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Filter Toolbar */
.filter-toolbar {
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.filter-toolbar-row {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 0;
}

/* Search Bar */
.search-bar {
    flex: 0 0 auto;
}

.category-bar-desktop,
.tag-filter-bar {
    flex: 1 1 0;
}

.tag-filter-bar {
    display: flex;
    justify-content: flex-end;
}

.search-wrapper {
    position: relative;
    width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #003545;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    display: none;
}

.search-clear.visible {
    display: block;
}

.search-clear:hover {
    color: #495057;
}

/* Tag Filter Bar */
.tag-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 14px 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    font-family: inherit;
    transition: color 0.3s ease;
}

.tag-filter-toggle:hover {
    color: #003545;
}

.tag-toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.tag-filter-toggle.open .tag-toggle-icon {
    transform: rotate(180deg);
}

.tag-filter-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.tag-filter-wrapper.open {
    grid-template-rows: 1fr;
}

.tag-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 0;
    padding-bottom: 0;
    transition: padding 0.3s ease;
}

.tag-filter-wrapper.open .tag-filter-container {
    padding-top: 10px;
    padding-bottom: 15px;
}

.tag-filter-btn {
    background: white;
    border: 1.5px solid #dee2e6;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    font-family: inherit;
    transition: all 0.2s ease;
}

.tag-filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.tag-filter-btn.active {
    background: #003545;
    color: white;
    border-color: #003545;
}

.tag-filter-clear {
    background: none;
    border: 1.5px solid #dc3545;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc3545;
    font-family: inherit;
    transition: all 0.2s ease;
    display: none;
}

.tag-filter-clear.visible {
    display: inline-block;
}

.tag-filter-clear:hover {
    background: #dc3545;
    color: white;
}

/* Clickable Product Tags */
.product-tag {
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-tag:hover {
    background: #003545;
    color: white;
}

.product-tag.active {
    background: #003545;
    color: white;
}

.product-tag.hidden-tag {
    display: none;
}

.product-meta.tags-expanded .product-tag.hidden-tag {
    display: inline-block;
}

.more-tags-btn {
    cursor: pointer;
    opacity: 0.7;
}

.more-tags-btn:hover {
    opacity: 1;
}

/* Tag Tooltip */
.tag-tooltip {
    position: fixed;
    background: #003545;
    color: white;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 8px 14px;
    border-radius: 6px;
    max-width: 350px;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.tag-tooltip.visible {
    opacity: 1;
}

/* Category Sections */
.category-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.category-section:first-child {
    margin-top: 10px;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #212529;
    border-bottom: 3px solid #003545;
    padding-bottom: 10px;
}

/* Show More Button */
.show-more-btn {
    display: block;
    margin: 25px auto 0;
    background: none;
    border: 2px solid #003545;
    color: #003545;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background: #003545;
    color: white;
}

.product-card.hidden-card-collapsed {
    display: none !important;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Product Card */
.product-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #003545;
}

.product-card.expanded:hover {
    transform: none;
    box-shadow: none;
    border-color: inherit;
}

/* Sponsor Badge - Corner Ribbon */
.sponsor-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 42px;
    overflow: hidden;
    font-size: 0;
    color: transparent;
    cursor: default;
}

.sponsor-badge::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 42px 42px 0;
    border-color: transparent #FFD700 transparent transparent;
    border-top-right-radius: 7px;
}

.sponsor-badge::after {
    content: '★';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 15px;
    color: #333;
    line-height: 1;
}

/* Code Contributor Badge - Card View (Corner Ribbon) */
.contributor-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    overflow: hidden;
    font-size: 0;
    color: transparent;
    cursor: default;
}

.contributor-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-style: solid;
    border-width: 42px 42px 0 0;
    border-color: #4CAF50 transparent transparent transparent;
    border-top-left-radius: 7px;
}

.contributor-badge::after {
    content: '</>';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.sponsor-card {
    border-color: #FFD700;
}

.sponsor-card:hover {
    border-color: #FFA500;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

/* Stack Ref (on product cards) */
.stack-ref {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.stack-ref a {
    color: #003545;
    font-weight: 600;
    text-decoration: none;
}

.stack-ref a:hover {
    text-decoration: underline;
}

/* Stack Cards */
.stack-card {
    border: 2px solid #003545;
    background: linear-gradient(180deg, #f0f7fa 0%, white 40%);
}

.stack-card:hover {
    border-color: #005570;
    box-shadow: 0 10px 30px rgba(0, 53, 69, 0.15);
}

.stack-logos {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.stack-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
    padding: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stack-logo-link:hover {
    border-color: #003545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stack-logo-link img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Stack expanded view */
.stack-products-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stack-product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stack-product-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.stack-product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stack-product-name {
    font-weight: 600;
    color: #003545;
    text-decoration: none;
    font-size: 0.95rem;
}

.stack-product-name:hover {
    text-decoration: underline;
}

.stack-product-role {
    font-size: 0.85rem;
    color: #6c757d;
}

.product-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #212529;
}

.product-description {
    color: #6c757d;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.product-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.product-link {
    color: #003545;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #005570;
    text-decoration: underline;
}

.details-btn {
    background: #003545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
    font-family: inherit;
}

.details-btn:hover {
    background: #005570;
}

/* Expanded Product Details */
.product-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.product-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #212529;
}

.product-details h4:first-child {
    margin-top: 0;
}

.product-details p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 15px;
}

.product-details ul {
    margin: 10px 0 15px 20px;
    color: #495057;
}

.product-details li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.product-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.product-links a {
    color: #003545;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #003545;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-links a:hover {
    background: #003545;
    color: white;
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border: 1px solid #003545;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.detail-modal.active {
    display: block;
}

.detail-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.detail-modal-close {
    position: sticky;
    top: 10px;
    float: right;
    background: #003545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.detail-modal-close:hover {
    background: #005570;
}

.detail-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.detail-modal-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-modal-info {
    flex: 1;
}

.detail-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.detail-modal-sponsor {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    max-width: calc(100% - 45px);
    text-align: center;
}

.detail-modal-contributor {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
}

.detail-modal-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 8px 0;
}

.detail-modal-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.detail-modal-content .product-link {
    color: #003545;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.detail-modal-content .product-link:hover {
    color: #005570;
    text-decoration: underline;
}

.detail-modal-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    color: #212529;
}

.detail-modal-content p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 15px;
}

.detail-modal-content ul {
    margin: 10px 0 15px 20px;
    color: #495057;
}

.detail-modal-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.detail-modal-content .product-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.detail-modal-content .product-links a {
    color: #003545;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #003545;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.detail-modal-content .product-links a:hover {
    background: #003545;
    color: white;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-overlay.active {
    display: block;
}


/* Tablet - stack toolbar vertically */
@media (max-width: 1024px) and (min-width: 769px) {
    .filter-toolbar-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-bar-desktop,
    .tag-filter-bar {
        flex: 0 0 auto;
    }

    .search-bar {
        order: -1;
        flex: 1 1 100%;
    }

    .search-wrapper {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-top {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 25px 0 6px;
    }

    .header-logo img {
        height: 55px;
    }

    .header-right {
        align-items: flex-end;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .header-social-link svg {
        width: 16px;
        height: 16px;
    }

    .hero__content {
        padding: 40px 0 60px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }
    
    .category-menu-toggle {
        display: flex;
    }

    .category-filter-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .category-bar-desktop {
        display: none;
    }

    .category-filter-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex-wrap: nowrap;
        padding-bottom: 0;
        scrollbar-width: thin;
        scrollbar-color: #adb5bd transparent;
    }

    .category-filter-container::-webkit-scrollbar {
        width: 4px;
    }

    .category-filter-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .category-filter-container::-webkit-scrollbar-thumb {
        background: #adb5bd;
        border-radius: 2px;
    }

    .category-filter-container.open {
        max-height: 280px;
        overflow-y: auto;
        padding-bottom: 4px;
    }

    /* Hamburger to X animation */
    .category-menu-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .category-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .category-menu-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .category-btn {
        width: auto;
        min-width: 75%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }

    .stack-products-list {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 1.5rem;
    }
    
    .product-card {
        display: grid;
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto;
        column-gap: 15px;
    }

    .product-logo {
        grid-row: 1;
        grid-column: 1;
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
        align-self: center;
    }

    .product-name {
        grid-column: 2;
        margin-bottom: 15px;
        align-self: center;
    }

    .product-description,
    .product-meta,
    .product-actions,
    .product-details {
        grid-column: 1 / -1;
    }

    .stack-logos {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .stack-card .product-name {
        grid-column: 1 / -1;
        text-align: left;
    }

    .stack-card .product-actions {
        justify-content: flex-end;
    }

    .filter-toolbar {
        position: static;
        border-bottom: none;
        background: none;
    }

    .filter-toolbar-row {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 12px;
    }

    .search-bar {
        width: 100%;
    }

    .search-wrapper {
        width: 100%;
    }

    .tag-filter-container {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tag-filter-wrapper.open .tag-filter-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #adb5bd transparent;
        max-height: calc(3.5 * (30px + 6px));
        padding: 8px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: rgba(233, 236, 239, 0.3);
    }

    .tag-filter-container::-webkit-scrollbar {
        width: 4px;
    }

    .tag-filter-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .tag-filter-container::-webkit-scrollbar-thumb {
        background: #adb5bd;
        border-radius: 2px;
    }

    .tag-filter-btn {
        flex-shrink: 0;
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .tag-filter-clear {
        flex-shrink: 0;
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-top {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 25px 0 6px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .product-card {
        padding: 20px;
    }

    .header-logo img {
        height: 55px;
    }

    .header-right {
        align-items: flex-end;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .header-social-link svg {
        width: 14px;
        height: 14px;
    }

    .hero-cta {
        border-bottom: none;
    }
}