.page-template-tpl-our-rolex-selection .cta-primary,
.page-template-tpl-our-rolex-selection .cta-primary:visited {
    background-color: var(--green);
}

.our-watches__filters-container {
    display: grid;
    grid-column-gap: 6px;
    grid-template-columns: repeat(6, 1fr);
}

/* -------------------------------- */
/* ------ Our Rolex Selection------ */
/* -------------------------------- */
.browse-rolex-section button {
    font-family: "Helvetica", "Kanit-Light", Arial, sans-serif;
}
.wrp-our-watches {
    display: grid;
    grid-column-gap: 6px;
    grid-template-columns: repeat(6, 1fr);
}

.our-watches__filters {
    grid-column: 1 / -1;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--beige);
    z-index: 11112;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    padding-bottom: 80px;
    /* transition:
        opacity 0.3s ease,
        visibility 0.3s ease; */

    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.our-watches__filters.is-active {
    opacity: 1;
    visibility: visible;
}

body.filters-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100dvh;
}

/* ปุ่มปิด filters บน mobile (เพิ่มใน HTML) */
.filters__close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* Overlay พื้นหลังมืด */
.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.filters-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.our-watches__filters .our-watches__actions {
    display: block;
    margin-bottom: 40px;
}

.our-watches__body {
    grid-column: 1 / -1;
}
.our-watches__grid {
    display: grid;
}
.our-watches__grid {
    grid-template-columns: repeat(6, 1fr);
    grid-column-gap: 6px;
    grid-row-gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.our-watches__grid li {
    grid-column: span 3;
    background-color: var(--beige);
}
.our-watches__grid li a {
    text-decoration: unset;
    cursor: pointer;
}
.our-watches__grid li a .watch-image {
    width: 100%;
    margin: 0 auto;
    position: relative;
}
.our-watches__grid li a .watch-image img,
.our-watches__grid li a .watch-image picture {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    -o-object-fit: contain;
    object-fit: contain;
    object-position: center;
    display: block;
}
.our-watches__grid a .watch-image::after {
    content: "";
    width: 100%;
    height: 100%;
    display: block;
    padding-top: 127.5%;
}
.our-watches__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-column-gap: 6px;
    margin-bottom: 20px;
}
.watches__actions {
    display: flex;
    align-items: baseline;
    position: relative;
}

.sort__list {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0px;
    z-index: 1;
    background: var(--light-beige);
    padding: 40px;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.07) 0px 2px 10px;
    width: 230px;
}
.action__buttons--sort.is-active + .sort__list {
    display: block;
}
.sort__wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sort__wrapper li:not(:last-child) {
    margin-bottom: 20px;
}

.sort__item input {
    display: none;
}
.sort__item label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.sort__item input:checked + label::before {
    border-color: var(--green);
}

.sort__item label::before {
    border-radius: 50%;
}

.sort__item input:checked + label {
    color: var(--green);
}

.sort__item input:checked + label::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--green);
    left: 2px;
}

.sort__item label::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-inline-end: 10px;
    border: 1px solid rgb(0, 0, 0);
    display: inline-block;
    transition:
        background 0.3s,
        border 0.3s;
}

.our-watches__filters .watches__actions--mobile {
    grid-column: 1 / -1;

    margin-left: auto;
    padding: 20px 0;
    margin-bottom: 0;
}
.watches__actions--left {
    grid-column: 1 / 4;
    flex-wrap: wrap;
}
.watches__actions--right {
    grid-column: 4 / -1;
}
.action--filters svg {
    fill: var(--brown);
}
.action__buttons {
    all: unset;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.action__buttons--reset {
    font-size: 0.875rem;
    padding: 14px 30px;

    color: var(--black);
    font-weight: 700;
    border-radius: 9999px;
    background-color: var(--beige);

    cursor: pointer;
    text-decoration: unset;
    align-items: center;
    display: inline-flex;
    transition: var(--transition-all);
    outline: none;
}

.action__buttons--reset svg {
    transition: var(--transition-all);
}
.action__buttons--reset:hover {
    color: var(--dark-grey);
}
.action__buttons--reset:hover svg {
    fill: var(--dark-grey);
}
.action__buttons--sort {
    display: flex;
    width: fit-content;
    margin-left: auto;
}
.action__buttons--reset,
.sort__detail--result {
    display: none;
}
.our-watches__mobile-cta .action__buttons--reset {
    display: flex;
    padding: 0;
    width: 36px;
    height: 36px;
    text-align: center;
}
.our-watches__mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 11112;
    display: none;
    background-color: var(--white);
    height: 84px;
}
.our-watches__filters.is-active + .our-watches__mobile-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.sort__detail--arrow,
.icon-more-brown-icon {
    display: block;
    width: 15px;
    height: 15px;
    margin-left: 14px;
}
.sort__detail--result {
    margin-left: 6px;
}
.sort__detail--arrow {
    transform: rotate(90deg);
}

.btn svg {
    width: 14px;
    height: 14px;
    fill: var(--white);
    margin-right: 8px;
}

.our-watches__grid li.watches-not-found {
    grid-column: 1 / -1;
    padding: 15px;
    text-align: center;
    background-color: transparent;
}
/* ----------------------- */
/* ------ Accordion ------ */
/* ----------------------- */

/* Filters Accordion Styles */
.filters__form {
    grid-column: 1 / -1;
}
.filters__group {
    border-top: 1px solid var(--grey);
    border-bottom: 0;
}
.filters__group--end {
    border-bottom: 1px solid var(--grey);
}
.filters__group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.filters__group-title:hover {
    color: var(--brown, #8b4513);
}

.accordion-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.accordion-icon .icon-plus,
.accordion-icon .icon-minus {
    position: absolute;
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.accordion-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    transform: rotate(0deg);
}

/* Default state: แสดง minus (เปิดอยู่) */
.accordion-icon .icon-plus {
    opacity: 0;
    transform: scale(0.8);
}

.accordion-icon .icon-minus {
    opacity: 1;
    transform: scale(1);
}

/* Collapsed state: แสดง plus */
.filters__group-title.collapsed .accordion-icon .icon-plus {
    opacity: 1;
    transform: scale(1);
}

.filters__group-title.collapsed .accordion-icon .icon-minus {
    opacity: 0;
    transform: scale(0.8);
}
.filters__group[data-label="คอลเล็กชัน"] input[type="checkbox"],
.filters__group[data-label="collection"] input[type="checkbox"] {
    display: none;
}
.filters__group-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}
.filters__group-list .fixed14 {
    font-weight: 400;
    line-height: 1.1;
}
.filters__group-list li {
    padding: 0 0 20px 0;
}
.filters__group-list li:last-child {
    padding-bottom: 30px;
}
.filters__group-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s ease;
    width: fit-content;
    color: var(--black);
}
.filters__group-list a:hover,
.filters__group-list label:hover {
    color: var(--green);
}
.filters__group-list label:hover input[type="checkbox"] {
    border-color: var(--green);
}
.filters__group-list a {
    text-decoration: unset;
    color: var(--black);
    transition: color 0.2s ease;
}

.filters__group-list input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    background-color: transparent;
}
.filters__group-list input[type="checkbox"]:checked + span {
    color: var(--green);
}

/* ซ่อน checkbox เดิม */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--black);
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

/* สถานะ hover */
input[type="checkbox"]:hover {
    border-color: #00843d;
}

/* สถานะ checked */
input[type="checkbox"]:checked {
    background-color: #00843d;
    border-color: #00843d;
}

/* เพิ่ม check icon เมื่อ checked */
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.page-template-tpl-our-rolex-selection #intro .row-wrap .col-two p a {
    display: inline-block;
    font-size: clamp(1.125rem, 1.0625rem + 0.1563vw, 1.25rem);
}
.page-template-tpl-our-rolex-selection #intro .row-wrap .col-two p a:hover {
    color: var(--green);
}
@media only screen and (min-width: 768px) {
    .our-watches__filters-container {
        display: grid;
        grid-column-gap: 8px;
        grid-template-columns: repeat(12, 1fr);
    }
    /* --------------------------------- */
    /* ------ Our Rolex Selection ------ */
    /* --------------------------------- */
    .wrp-our-watches {
        display: grid;
        grid-column-gap: 8px;
        grid-template-columns: repeat(12, 1fr);
    }
    .our-watches__filters {
        grid-column: 3 / 11;
    }
    .our-watches__body {
        grid-column: 3 / 11;
    }
    .our-watches__grid {
        display: grid;
    }
    .our-watches__grid {
        grid-template-columns: repeat(8, 1fr);
        grid-column-gap: 8px;
        grid-row-gap: 8px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .our-watches__grid li {
        grid-column: span 4;
        background-color: var(--beige);
    }
    .our-watches__grid li a {
        text-decoration: unset;
        cursor: pointer;
        padding-top: 5%;
    }
    .our-watches__grid li a .watch-image {
        width: 70%;
        margin: 0 auto;
        position: relative;
    }
    .our-watches__grid li a .watch-image::after {
        content: "";
        width: 100%;
        height: 100%;
        display: block;
        padding-top: 127.5%;
    }
    .our-watches__actions {
        grid-column: 3 / 11;
        display: grid;
        grid-column-gap: 8px;
        grid-template-columns: repeat(8, 1fr);
        margin-bottom: 26px;
    }
    .watches__actions--mobile {
        grid-column: 1 / -1;
        padding: 40px 0;
    }
    .watches__actions--left {
        grid-column: 1 / 5;
    }
    .watches__actions--right {
        grid-column: 5 / -1;
    }
    .action__buttons--reset {
        padding: 11px 30px;
    }
    .filters__group {
        grid-column: 3 / 11;
    }
    .filters__form {
        grid-column: 3 / 11;
    }
}

@media only screen and (min-width: 1280px) {
    .our-watches__filters-container {
        display: block;
        width: 100%;
    }

    /* --------------------------------- */
    /* ------ Our Rolex Selection ------ */
    /* --------------------------------- */
    .wrp-our-watches {
        display: grid;
        grid-column-gap: 8px;
        grid-template-columns: repeat(12, 1fr);
    }
    .our-watches__filters {
        grid-column: 1 / 3;
        background-color: transparent;
    }
    .our-watches__body {
        grid-column: 4 / -1;
    }
    .our-watches__grid {
        display: grid;
    }
    .our-watches__grid {
        grid-template-columns: repeat(9, 1fr);
        grid-column-gap: 8px;
        grid-row-gap: 8px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .our-watches__grid li {
        grid-column: span 3;
        background-color: var(--beige);
    }
    .our-watches__grid li a {
        text-decoration: unset;
        cursor: pointer;
    }
    .our-watches__grid li a .watch-image {
        width: 70%;
        margin: 0 auto;
        position: relative;
    }
    .our-watches__grid li a .watch-image::after {
        content: "";
        width: 100%;
        height: 100%;
        display: block;
        padding-top: 147.5%;
    }
    .our-watches__grid li a .watch-image img,
    .our-watches__grid li a .watch-image picture {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100% !important;
        -o-object-fit: cover;
        object-fit: cover;
        object-position: center;
        display: block;
    }
    .our-watches__actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(12, 1fr);
    }
    .watches__actions--left {
        grid-column: 1 / 4;
        display: flex;
        justify-content: start;
        gap: 20px;
    }
    .watches__actions--right {
        grid-column: 4 / -1;
    }
    .action__buttons--reset,
    .sort__detail--result {
        display: block;
    }
    .icon-more-brown-icon {
        display: none;
    }
    .action__buttons--reset {
        padding: 14px 30px;
        display: flex;
        gap: 8px;
    }
    .action__buttons--filters {
        cursor: default;
    }

    .our-watches__filters .our-watches__actions {
        margin-bottom: 20px;
    }
    .our-watches__filters {
        position: static;
        width: auto;
        height: auto;
        opacity: 1;
        visibility: visible;
        padding: 0;
        overflow-y: visible;
        z-index: 88;
        padding-bottom: 0px;
    }
    .filters-overlay {
        display: none;
    }

    /* ซ่อนปุ่ม Filters ที่อยู่ใน aside บน desktop */
    .our-watches__filters .our-watches__actions {
        display: none;
    }

    .our-watches__grid li.watches-not-found {
        text-align: start;
    }

    .sort__list {
        width: auto;
    }
}
@media only screen and (min-width: 1466px) {
    .watches__actions--left {
        grid-column: 1 / 3;
        justify-content: space-between;
    }
}
