/** Product List Layout **/
.product-list {
    padding: 2rem 0 3.75rem;
}

.product-list__layout {
    display: flex;
    gap: 4.75rem;
}

.product-list__sidebar {
    flex-shrink: 0;
    width: 15.5rem;
    max-width: 100%;
}

.product-list__main {
    flex: 1;
    min-width: 0;
}

.product-list__sidebar-collapse {
    width: 100%;
}

.product-list__sidebar-summary {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: 0.875rem 1rem;
    border: 1px solid #F0F0F0;
    border-radius: 0.75rem;
    background: var(--color-white);
    font-family: var(--font-josefin);
    font-weight: 600;
    color: var(--color-green);
}

.product-list__sidebar-summary::-webkit-details-marker {
    display: none;
}

.product-list__sidebar-summary-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.product-list__sidebar-collapse[open] .product-list__sidebar-summary-icon {
    transform: rotate(180deg);
}

.product-list__sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 6.125rem;
    padding-top: 0;
}

.product-list__sidebar-collapse[open] .product-list__sidebar-content {
    padding-top: 1.25rem;
}

/** Product Filter Sidebar **/
.product-filter {
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
}

.product-filter__header {
    border-bottom: 1px dashed #EDEDED;
    padding-bottom: 0.6875rem;
}

.product-filter__title {
    font-family: var(--font-josefin);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-green);
    margin: 0;
}

.product-filter__category-list,
.product-filter__origin-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-filter__category-item {
    display: flex;
    flex-direction: column;
}

.product-filter__category-link {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1;
    color: var(--color-black-light);
    text-decoration: none;
    padding: 0.625rem 0;
    transition: color 0.2s ease;
}

.product-filter__category-link:hover,
.product-filter__category-link--active {
    color: var(--color-green);
}

.product-filter__arrow {
    flex-shrink: 0;
    width: 0.8125rem;
    height: 0.8125rem;
}

/** Price Range Slider **/
.product-filter__price {
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
}

.product-filter__range-slider {
    position: relative;
    height: 0.625rem;
}

.product-filter__range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.25rem;
    background: #E0E0E0;
    border-radius: 0.125rem;
    transform: translateY(-50%);
}

.product-filter__range-track::before {
    content: '';
    position: absolute;
    height: 100%;
    background: #A8B324;
    border-radius: 0.125rem;
    left: var(--range-left, 0%);
    right: var(--range-right, 0%);
}

.product-filter__range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}

.product-filter__range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.5rem;
    height: 0.625rem;
    background: #A8B324;
    border-radius: 0.3125rem;
    cursor: pointer;
    pointer-events: all;
}

.product-filter__range-input::-moz-range-thumb {
    width: 0.5rem;
    height: 0.625rem;
    background: #A8B324;
    border-radius: 0.3125rem;
    border: none;
    cursor: pointer;
    pointer-events: all;
}

.product-filter__price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-filter__price-label {
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.125;
    color: #006F45;
}

.product-filter__price-btn {
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.125;
    color: var(--color-black-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.product-filter__price-btn:hover {
    color: var(--color-green);
}

/** Origin Filter **/
.product-filter__origin-list {
    gap: 1.375rem;
}

.product-filter__origin-item {
    display: flex;
}

.product-filter__origin-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1;
    color: var(--color-black-light);
    cursor: pointer;
}

.product-filter__origin-checkbox {
    accent-color: var(--color-green);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/** Top Bar **/
.product-list__topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F0F0F0;
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.product-list__count {
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.05;
    color: #909090;
    margin: 0;
}

.product-list__sort-select {
    font-family: var(--font-josefin);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.225;
    color: var(--color-black-light);
    background: var(--color-white);
    border: 1px solid #F0F0F0;
    border-radius: 4.875rem;
    padding: 0.625rem 2.5rem 0.625rem 1.1875rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none'%3e%3cpath d='M2.437 4.875 6.5 9.188l4.063-4.313' stroke='%23484646' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 0.8125rem;
    cursor: pointer;
    min-width: 13.1875rem;
}

.product-list__sort-select:focus {
    outline: none;
    border-color: var(--color-green);
}

/** Product Grid (list page 4 columns) **/
.product-grid--4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1875rem;
}

/** Empty State **/
.product-list__empty {
    text-align: center;
    padding: 3.75rem 0;
    font-family: var(--font-josefin);
    font-size: 1.125rem;
    color: #909090;
}

.product-list__empty p {
    margin: 0 0 1.25rem;
}

.product-list__empty-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0 1.5rem;
    font-family: var(--font-josefin);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--color-white);
    background-color: var(--color-green);
    border: none;
    border-radius: 4.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.product-list__empty-reset:hover {
    background-color: #0b7442;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

/** Product filter **/
.title-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.filter-section {
    display: flex;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;

    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.filter-select:hover {
    border-color: #9ca3af;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter-select-simple {
    padding: 8px 25px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

/* Extra Large Devices (Small Desktop) */
@media (max-width: 1199px) {
    .product-list__layout {
        gap: 2rem;
    }

    .product-list__sidebar {
        width: 13rem;
    }

    .product-grid--4col {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Devices (Tablets) */
@media (max-width: 991px) {
    .product-detail {
        flex-direction: column;
    }

    .product-detail-right {
        width: 100%;
    }

    .product-list__layout {
        flex-direction: column;
        gap: 2rem;
    }

    .product-list__sidebar {
        width: 100%;
    }

    .product-list__sidebar-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .product-filter {
        flex: 1;
        min-width: 12rem;
    }

    .product-grid,
    .product-grid--4col {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-item .info {
        padding: 8px;
    }

    .title-filter {
        flex-direction: column;
    }
}

/* Medium Devices (Tablets) */
@media (max-width: 767px) {
    .product-list__sidebar-summary {
        display: flex;
    }

    .product-list__sidebar-content {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 2rem;
    }

    .product-list__sidebar-collapse {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #F0F0F0;
    }

    .product-grid,
    .product-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-list__topbar {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Small Devices (Phones) */
@media (max-width: 575px) {
    .thumbnail-grid a {
        width: calc(25% - 9px);
    }

    .product-filter__title {
        font-size: 1.25rem;
    }
}

/* Extra Small Devices */
@media (max-width: 374px) {
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
