.tabs-filter {
    margin-bottom: 1rem;
    display: flex;
}

.filter-btn {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    border-right: 1px solid #ccc;
    background: #fff;
    font-size: 1.25em;
    font-weight: 400;
    transition: 0.3s;
}

.filter-btn:last-child {
    border-right: none;
    border-left: 1px solid #ccc;
}

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

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    overflow: visible;
    padding-top: 16px;
}

.product-cards-grid h3 {
    color: #060606;
}

.product-card {
    --group-colour: #181818;
    --bookmark-space: 44px;

    border: 1px solid #eee;
    padding: 20px;
    padding-top:60px;
    gap: 1rem;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    border-radius: 8px;
    background-color: #fff;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: visible;
    isolation: isolate;
    cursor: pointer;
}

.quick-add-action-btn {
  appearance: none;
  border: 1px solid rgba(108, 108, 108, 0.45);
  background: rgba(55, 55, 55, 0.08);
  color: #777777;
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 14px;
  width: 100%;
  /* max-width: 160px; */
  font-family: Poppins, sans-serif;
  font-size: 0.8em;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.quick-add-action-btn:hover {
  background: #474747;
  border-color: #313131;
  color: #fff;
}

.quick-add-action-btn:focus-visible {
  outline: 2px solid #09a2dd;
  outline-offset: 2px;
}

.quick-add-action-empty {
  color: #98a2b3;
  font-family: Poppins, sans-serif;
}

.product-card .quick-add-action-btn {
  position: relative;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
}

.product-card.has-group {
    padding-top: var(--bookmark-space);
    border-color: color-mix(in srgb, var(--group-colour) 28%, #eee);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-colour) 7%, transparent);
}

.product-card.has-group::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;

    background:
        radial-gradient(
            circle at top right,
            color-mix(in srgb, var(--group-colour) 18%, transparent) 0%,
            color-mix(in srgb, var(--group-colour) 8%, transparent) 34%,
            transparent 68%
        ),
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--group-colour) 10%, transparent) 0%,
            color-mix(in srgb, var(--group-colour) 5%, transparent) 45%,
            transparent 85%
        );
}

.product-card:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: #e0e0e0;
    z-index: 2;
}

.product-card.has-group:hover {
    border-color: color-mix(in srgb, var(--group-colour) 42%, #e0e0e0);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        0 8px 24px color-mix(in srgb, var(--group-colour) 12%, transparent);
}

.product-card * {
    pointer-events: none;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-bookmarks {
    position: absolute;
    top: -1px;
    right: 18px;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 6px;

    pointer-events: none;
}

.product-bookmark {
    --resolved-bookmark-color: var(
        --bookmark-color,
        var(--bookmark-colour, var(--group-colour))
    );

    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 80px;
    padding: 10px 12px 15px;

    background: var(--resolved-bookmark-color);
    color: #fff;

    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;

    box-shadow: 0 8px 18px color-mix(in srgb, var(--resolved-bookmark-color) 32%, transparent);

    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 8px),
        50% 100%,
        0 calc(100% - 8px)
    );
}

.product-bookmark::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0)
    );
}

.card.hidden {
    display: none;
}

.cta-container {
    margin: 20px 0 40px 0;
}

#categoryCTA {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid transparent;
}

#categoryCTA::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s ease;
}

#categoryCTA:hover {
    background-color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

#categoryCTA:hover::after {
    transform: translateX(5px);
}

#categoryCTA:active {
    transform: translateY(0);
}

.product-info-features {
    list-style-type: square;
    padding-inline-start: 1rem;
}

.product-info-features li {
    margin-bottom: 0.25rem;
}

.product-info-table {
    border-spacing: 0;
    border-collapse: collapse;
}

#productGrid, 
#productInfo {
    animation: slideUpFade 0.4s ease-out forwards;
}

#productInfo {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
    background: white;
    padding: 40px;
    box-sizing: border-box;
}

#productInfo.active {
    display: block;
}

body.product-details-open {
    overflow: hidden;
}

.collection-content {
    position: relative;
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.product-info-table tr th {
    background-color: #424242;
    color: #fff;
    font-weight: 500;
    border: 1px solid #333;
}

.product-info-table td {
    border: 1px solid #d3d3d3;
    padding: 0.5rem;
    font-weight: 400;
    text-align: center;
    background-color: #f0f0f03b;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .switch-slider {
  background-color: #333;
}

input:focus + .switch-slider {
  box-shadow: 0 0 1px #333;
}

input:checked + .switch-slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.switch-slider.round {
  border-radius: 34px;
}

.switch-slider.round:before {
  border-radius: 50%;
}

.color-codes {
    border: 1px solid #d3d3d3;
    padding: 1rem;
    font-weight: 400;
    margin-top:0.5rem;
    text-align: center;
    background-color: #f0f0f03b;
    border-radius: 0.4rem;
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
}

.color-codes h2 {
    padding-bottom: 0.25rem;
}

.color-code {
    width: 15px;
    height: 15px;
    border-radius: 100%;
    border: 1px solid #d3d3d3;
}

@media screen and (max-width: 1100px) {
    .tabs-filter {
        align-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 900px) {
    .product-card .tags {
        flex-flow: row;
    }
    .product-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }

    .product-bookmarks {
        right: 14px;
    }

    .product-bookmark {
        min-width: 76px;
        padding: 9px 10px 14px;
        font-size: 0.64rem;
    }

    .collection-content .image.square.small {
        width: 100%;
        max-height: 300px;
    }

    .collection-content .square.light-grey-bg {
        order: -1;
        width: 100%;
        min-height: 400px;
    }

    .back-button {
        font-size: 1.25em;
    }

    .mobile-back-button {
        display: block;
    }
}

@media screen and (max-width: 500px) {
    .doorware-sort {
        flex-flow: column;
        align-items: flex-start;
    }
    .tabs-filter {
        flex-flow: column;
    }
    .filter-btn {
        width:100%;
        border: 1px solid #ccc;
    }
    .filter-btn:last-child {
        border-right: none;
        border-right: 1px solid #ccc;
    }
}