.main-content {
    background-color: #ffffff;
    width: 100%;
    min-height: 50rem;
    min-height: 80vh; 
}

.collection__title {
    padding: 3.75rem 3.125rem 1.875rem 3.125rem;
    box-sizing: border-box;
}

.hero__title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1875rem;
    color: #000000;
    text-transform: uppercase;
    margin: 0;
}

.collection__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9375rem 0.9375rem;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.popout__toggle {
    background: transparent;
    border: none;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.0938rem;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.3125rem 0;
}

.icon-filter {
    width: 0.25rem;
    height: 0.25rem;
}

.popout--sort {
    position: relative;
    display: inline-block;
    float: right; 
}

.popout__toggle {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0;
}

.popout__toggle__text {
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.0938rem;
    color: #000;
    font-family: sans-serif;
}

.popout__toggle .icon-chevron-down {
    width: 0.5625rem;
    height: 0.5625rem;
    transition: transform 0.25s ease;
}

.popout.is-active .icon-chevron-down {
    transform: rotate(180deg);
}

.popout-list {
    position: absolute;
    top: 100%;
    right: 0; 
    width: 16.25rem;
    background: #ffffff;
    border: 1px solid #f2f2f2;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.06);
    padding: 0.9375rem 0;
    margin: 0.3125rem 0 0 0;
    list-style: none;
    z-index: 999;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.625rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.popout.is-active .popout-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.popout-list__item {
    padding: 0;
    margin: 0;
}

.popout-list__option {
    display: block;
    padding: 0.5625rem 1.5625rem;
    font-size: 0.75rem;
    color: #444444;
    text-decoration: none;
    font-weight: 400;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.popout-list__option:hover {
    background-color: #f9f9f9;
    color: #000000;
}

.popout-list__item--current .popout-list__option {
    font-weight: 500;
    color: #000000;
    background-color: #f7f7f7;
}

.shopify-section::after {
    content: "";
    display: table;
    clear: both;
}

.sidebar__item--swatch .swatch__button {
    position: relative;
    display: inline-block;
}

.sidebar__item--swatch .swatch__button::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0.25rem);
    
    background: #fff;
    color: #000;
    font-size: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    padding: 0.25rem 0.5rem;
    border-radius: 2px; 
    border-radius: 0.125rem;
    white-space: nowrap;
    
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0px 0.125rem 0.375rem rgba(0,0,0,0.15);
}

.sidebar__item--swatch .swatch__button:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0.375rem);
}

.sidebar__item--swatch .swatch__button:hover::before {
    opacity: 1;
}

@media screen and (max-width: 48rem) { /* 768px / 16 = 48rem */
    .sidebar__item--swatch .swatch__button::after,
    .sidebar__item--swatch .swatch__button::before {
        display: none !important;
    }
}

.product-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 1rem;
}

.product-item {
    box-sizing: border-box;
    border-right: 1px solid #f2f2f2;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.large-up--one-third {
    width: 32.58%;
}

.product-item__image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: #fafafa;
}

.product-item__bg,
.product-item__bg__under {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-item__bg__under {
    opacity: 0; 
}

.product-item:hover .product-item__bg {
    opacity: 0;
}
.product-item:hover .product-item__bg__under {
    opacity: 1;
}

.product-information {
    padding: 1.5625rem 1.25rem;
    text-align: center;
}

.product-information a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product__grid__title {
    font-size: 0.875rem;
    font-weight: 400;
    color: #111111;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.0313rem;
}

.price {
    font-size: 0.8125rem;
    color: #111111;
    margin-bottom: 0.375rem;
}

.grid__product-swatches-count {
    font-style: italic;
    font-size: 0.75rem;
    color: #777777;
}

.collection__sidebar__slide-out {
    position: fixed;
    top: 0;
    left: -23.75rem; 
    width: 21.875rem; 
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: 0.3125rem 0 0.9375rem rgba(0,0,0,0.05);
    transition: left 0.3s ease;
    padding: 1.875rem 1.5625rem;
    box-sizing: border-box;
    overflow-y: auto;
}

.collection__sidebar__slide-out.expanded {
    left: 0 !important;
}

.collection__sidebar__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 0.9375rem;
    margin-bottom: 1.25rem;
}
.collection__sidebar__head h3 {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    font-family: sans-serif;
    font-weight: 400;
    margin: 0;
}
.collection__sidebar__close svg {
    width: 1rem;
    height: 1rem;
}

.collection__sidebar__heading {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    margin: 1.5625rem 0 0.9375rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.collection__sidebar__heading::after {
    content: '➔';
    font-size: 0.5rem;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.collection-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.collection-nav li {
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
}
.collection-nav li input[type="checkbox"] {
    margin-right: 0.75rem;
    accent-color: #000;
    width: 0.875rem;
    height: 0.875rem;
    cursor: pointer;
}
.collection-nav li label {
    font-size: 0.75rem;
    color: #333;
    cursor: pointer;
}

.collection-nav--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.sidebar__item--swatch {
    margin-bottom: 0 !important;
}
.swatch__button {
    position: relative;
    display: block;
}
.swatch__button input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.swatch__button label {
    display: block;
    width: 1.625rem; 
    height: 1.625rem; 
    border-radius: 50%; 
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.swatch__button input[type="checkbox"]:checked + label {
    transform: scale(1.1);
    border: 2px solid #000;
    box-shadow: 0 0 0 2px #fff inset;
}

.filter__price__range.range {
    position: relative;
    height: 0.25rem;
    background: #e8e8e8;
    border: 1px solid #000;
    margin: 1.25rem 0;
    border-radius: 4px;
}
.range__line span {
    position: absolute;
    height: 0.25rem;
    background: #000;
}
.range__dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%); 
    width: 1.25rem;
    height: 1.25rem;
    background: #000;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2; 
}
.filter__price__fields {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.9375rem;
}
.filter__price__spacer{
    margin-bottom: 0.2rem;
}
.filter__price__field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #000;
    border-radius: 5px; 
    padding: 0.3125rem 0.625rem;
    width: 100%;
}
.filter__price__field span {
    font-size: 0.75rem;
    color: #000;
    margin-right: 0.3125rem;
}
.filter__price__input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.75rem;
    text-align: right;
}

.hidden{
  display: none;
}

@media (max-width: 1024px) { 
    .medium--one-third {
        width: 50%; 
    }
    .collection__nav {
        padding: 0.9375rem 0.9375rem;
    }
    .collection__title {
        padding: 2.5rem 1.5625rem 1.25rem 1.5625rem;
    }
}

@media (max-width: 640px) { 
    .small--one-half {
        width: 50%;
    }
    .product-information {
        padding: 0.9375rem 0.625rem;
    }
    .product__grid__title {
        font-size: 0.8125rem;
    }
    .collection__sidebar__slide-out {
        width: 100%; 
        left: -100%;
    }
}