/* ==========================================================================
   Ouse Jóias — listagem de produtos (categorias, busca, /produtos).
   Depende dos tokens definidos em ouse-theme.css.
   ========================================================================== */
.ps-page--shop {
    padding-top: 8px;
}

.ps-layout--shop {
    display: block;
    padding-bottom: 90px;
}

.ps-layout--shop .ps-layout__right {
    width: 100%;
    max-width: 100%;
}

/* Cabeçalho da categoria */
.ps-layout--shop .ps-block--shop-features {
    margin-bottom: 8px;
    padding: 28px 0 8px;
    border: 0;
    text-align: center;
}

.ps-layout--shop .ps-block--shop-features .ps-block__header {
    display: block;
    padding: 0;
    border: 0;
}

.ps-layout--shop .ps-block--shop-features .ps-block__header h1 {
    margin: 0;
    font-family: var(--ouse-serif);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 500;
    color: var(--ouse-ink);
}

.ps-layout--shop .ps-block--shop-features .ps-block__content {
    max-width: 640px;
    margin: 12px auto 0;
    color: var(--ouse-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* Marcas em destaque (/produtos) */
.ouse-brands {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 48px;
    margin: 8px 0 40px;
    padding: 24px 0;
    border-top: 1px solid var(--ouse-line);
    border-bottom: 1px solid var(--ouse-line);
}

.ouse-brands__item img {
    display: block;
    max-width: 120px;
    max-height: 48px;
    filter: grayscale(1);
    opacity: .7;
    transition: filter .3s var(--ouse-ease), opacity .3s var(--ouse-ease);
}

.ouse-brands__item:hover img {
    filter: none;
    opacity: 1;
}

/* Trilho de recomendados (/produtos) */
.ouse-rail {
    margin: 8px 0 48px;
}

.ouse-rail__header {
    margin-bottom: 20px;
    text-align: center;
}

.ouse-rail__header h2 {
    margin: 0;
    font-family: var(--ouse-serif);
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 500;
    color: var(--ouse-ink);
}

.ouse-rail__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 24px) / 4);
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--ouse-line) transparent;
}

.ouse-rail__track > .ouse-card {
    scroll-snap-align: start;
}

@media (max-width: 1199.98px) {
    .ouse-rail__track {
        grid-auto-columns: calc((100% - 2 * 24px) / 3);
    }
}

@media (max-width: 767.98px) {
    .ouse-rail__track {
        grid-auto-columns: 62%;
        gap: 12px;
    }
}

/* --------------------------------------------------------------------------
   Barra de ferramentas
   -------------------------------------------------------------------------- */
.ouse-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 28px;
    padding: 18px 0;
}

.ouse-toolbar svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ouse-toolbar__left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 32px;
}

.ouse-toolbar__btn,
.ouse-toolbar__sort {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ouse-ink);
    font-family: var(--ouse-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.ps-layout--shop .ps-layout__right #products-filter-sidebar.ouse-toolbar__btn {
    width: auto;
    justify-content: flex-start;
    padding: 4px 0;
}

.ouse-toolbar__btn:hover,
.ouse-toolbar__sort:hover {
    color: var(--ouse-gold);
}

.ouse-toolbar__sort select {
    appearance: none;
    -webkit-appearance: none;
    width: auto !important;
    field-sizing: content;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 4px 22px 4px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    outline: none;
}

.ouse-toolbar__sort svg {
    position: absolute;
    right: 0;
    pointer-events: none;
}

.ouse-toolbar__count {
    padding: 0;
    color: var(--ouse-muted);
    font-size: 12px;
    letter-spacing: .04em;
}

.ouse-toolbar__count strong {
    color: var(--ouse-ink);
    font-weight: 600;
}

.ouse-toolbar__cols {
    display: flex;
    gap: 8px;
}

.ouse-toolbar__col {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background-color: #F2F0EC;
    color: var(--ouse-ink-soft);
    cursor: pointer;
    transition: background-color .25s var(--ouse-ease), color .25s var(--ouse-ease);
}

.ouse-toolbar__col i {
    display: block;
    width: 1.5px;
    height: 11px;
    background-color: currentColor;
}

.ouse-toolbar__col--1 i {
    width: 12px;
    height: 1.5px;
    box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.ouse-toolbar__col:hover {
    color: var(--ouse-gold);
}

.ouse-toolbar__col.is-active {
    background-color: var(--ouse-ink);
    color: var(--ouse-white);
}

.ouse-toolbar__col--1 {
    display: none;
}

@media (max-width: 767.98px) {
    .ouse-toolbar {
        margin-bottom: 18px;
        padding: 12px 0;
    }

    .ouse-toolbar__left {
        gap: 6px 22px;
    }

    .ouse-toolbar__count {
        display: none;
    }

    .ouse-toolbar__col--1 {
        display: inline-flex;
    }

    .ouse-toolbar__col--3,
    .ouse-toolbar__col--4,
    .ouse-toolbar__col--5 {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Grade
   -------------------------------------------------------------------------- */
.ouse-grid {
    --ouse-cols: 4;
    display: grid;
    grid-template-columns: repeat(var(--ouse-cols), minmax(0, 1fr));
    gap: 44px 24px;
}

.ps-shopping[data-cols="1"] .ouse-grid { --ouse-cols: 1; }
.ps-shopping[data-cols="2"] .ouse-grid { --ouse-cols: 2; }
.ps-shopping[data-cols="3"] .ouse-grid { --ouse-cols: 3; }
.ps-shopping[data-cols="4"] .ouse-grid { --ouse-cols: 4; }
.ps-shopping[data-cols="5"] .ouse-grid { --ouse-cols: 5; gap: 36px 18px; }

@media (max-width: 1199.98px) {
    .ps-shopping[data-cols="4"] .ouse-grid,
    .ps-shopping[data-cols="5"] .ouse-grid {
        --ouse-cols: 3;
    }
}

@media (max-width: 767.98px) {
    .ouse-grid,
    .ps-shopping[data-cols] .ouse-grid {
        --ouse-cols: 2;
        gap: 30px 12px;
    }

    .ps-shopping[data-cols="1"] .ouse-grid {
        --ouse-cols: 1;
        gap: 36px;
    }
}

.ouse-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--ouse-muted);
    border: 1px dashed var(--ouse-line);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.ouse-card.ps-product {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ouse-card.ps-product:hover {
    border: 0;
}

.ouse-card__media {
    position: relative;
    overflow: hidden;
    background-color: var(--ouse-sand);
}

.ouse-card__track {
    display: flex;
    aspect-ratio: 1 / 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ouse-card__track::-webkit-scrollbar {
    display: none;
}

.ouse-card__img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    transition: transform 1.2s var(--ouse-ease);
}

.ouse-card:hover .ouse-card__img {
    transform: scale(1.03);
}

.ouse-card__badges {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.ouse-card__badge {
    display: inline-block;
    padding: 4px 9px;
    background-color: rgba(23, 20, 15, .82);
    color: var(--ouse-white);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ouse-card__badge--label {
    background-color: var(--ouse-gold);
}

.ouse-card__badge--muted {
    background-color: var(--ouse-muted);
}

/* Ícones rápidos (favoritar, ver) */
.ouse-card__quick {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ouse-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .92);
    color: var(--ouse-ink);
    box-shadow: 0 6px 16px -8px rgba(23, 20, 15, .4);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .3s var(--ouse-ease), transform .3s var(--ouse-ease), background-color .25s, color .25s;
}

.ouse-card__icon:nth-child(2) {
    transition-delay: .05s;
}

.ouse-card__icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ouse-card__icon:hover {
    background-color: var(--ouse-ink);
    color: var(--ouse-white);
}

.ouse-card__icon.active,
.ouse-card__icon.js-remove-from-wishlist-button {
    opacity: 1;
    transform: none;
}

.ouse-card__icon.active svg,
.ouse-card__icon.js-remove-from-wishlist-button svg {
    fill: var(--ouse-gold);
    stroke: var(--ouse-gold);
}

/* Botão "Adicionar à sacola" sobre a foto */
.ouse-card .ouse-card__actions.ps-product__actions {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    z-index: 2;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s var(--ouse-ease), transform .35s var(--ouse-ease);
}

.ouse-card__cta {
    display: block;
    width: 100%;
    padding: 13px 10px;
    background-color: rgba(23, 20, 15, .9);
    color: var(--ouse-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-align: center;
    text-transform: uppercase;
}

.ouse-card__cta:hover,
.ouse-card__cta:focus {
    background-color: var(--ouse-gold);
    color: var(--ouse-white);
}

.ouse-card__cta.button-loading {
    opacity: .7;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .ouse-card:hover .ouse-card__icon,
    .ouse-card:focus-within .ouse-card__icon,
    .ouse-card:hover .ouse-card__actions.ps-product__actions,
    .ouse-card:focus-within .ouse-card__actions.ps-product__actions {
        opacity: 1;
        transform: none;
    }
}

/* Em telas de toque o favorito fica sempre visível; a compra acontece na página do produto */
@media (hover: none), (pointer: coarse) {
    .ouse-card__icon.js-add-to-wishlist-button,
    .ouse-card__icon.js-remove-from-wishlist-button {
        width: 32px;
        height: 32px;
        opacity: 1;
        transform: none;
    }

    .ouse-card__icon.js-quick-view-button,
    .ouse-card .ouse-card__actions.ps-product__actions {
        display: none;
    }
}

/* Pontinhos da galeria */
.ouse-card__dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding-top: 12px;
}

.ouse-card__dot {
    width: 5px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #D9D2C5;
    cursor: pointer;
    transition: background-color .25s, transform .25s;
}

.ouse-card__dot.is-active {
    background-color: var(--ouse-gold);
    transform: scale(1.2);
}

/* Texto do card */
.ouse-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
}

.ouse-card__dots + .ouse-card__body {
    padding-top: 8px;
}

.ouse-card__rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ouse-card__stars {
    position: relative;
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 2px;
    color: #E2DCD0;
}

.ouse-card__stars:before {
    content: '\2605\2605\2605\2605\2605';
}

.ouse-card__stars:after {
    content: '\2605\2605\2605\2605\2605';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--rating, 0%);
    overflow: hidden;
    color: var(--ouse-gold-light);
    white-space: nowrap;
}

.ouse-card__reviews {
    color: var(--ouse-muted);
    font-size: 11px;
}

.ouse-card__title {
    display: block;
    overflow: hidden;
    color: var(--ouse-ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ouse-card__title:hover {
    color: var(--ouse-gold);
}

.ouse-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 0;
    color: var(--ouse-ink);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .01em;
}

.ouse-card__price span,
.ouse-card__price small {
    font-size: inherit;
}

.ouse-card__price del {
    color: #9A9080;
    font-size: 13px;
    font-weight: 400;
}

.ouse-card__installments {
    margin: 0;
    color: #9A9080;
    font-size: 12px;
}

.ouse-card__installments strong {
    color: var(--ouse-muted);
    font-weight: 600;
}

.ps-shopping[data-cols="1"] .ouse-card__title {
    white-space: normal;
}

@media (max-width: 767.98px) {
    .ouse-card__title {
        font-size: 13px;
    }

    .ouse-card__price {
        font-size: 14px;
    }

    .ouse-card__badges {
        top: 8px;
        left: 8px;
    }

    .ouse-card__badge {
        padding: 3px 6px;
        font-size: 9px;
    }

    .ouse-card__quick {
        top: 8px;
        right: 8px;
    }
}

/* Carregando (AJAX dos filtros) */
.ps-layout--shop .ps-tabs .loading {
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .7);
}

.ps-layout--shop .ps-pagination {
    margin-top: 64px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Drawer de filtros (todas as larguras)
   -------------------------------------------------------------------------- */
html.ouse-no-scroll,
html.ouse-no-scroll body {
    overflow: hidden;
}

.ps-layout--shop .ps-layout__left {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100000;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    padding: 0;
    visibility: hidden;
    transition: visibility 0s linear .5s;
}

.ps-layout--shop .ps-layout__left.active {
    visibility: visible;
    transition-delay: 0s;
}

.ps-layout--shop .ps-layout__left .screen-darken,
.ps-layout--shop .ps-layout__left.active .screen-darken {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 20, 15, .45);
    opacity: 0;
    visibility: inherit;
    transition: opacity .4s var(--ouse-ease);
}

.ps-layout--shop .ps-layout__left.active .screen-darken {
    opacity: 1;
}

.ps-layout--shop .ps-layout__left .ps-layout__left-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 420px;
    max-width: 88vw;
    height: 100%;
    overflow: hidden;
    background-color: var(--ouse-white);
    box-shadow: 30px 0 60px -30px rgba(23, 20, 15, .45);
    transform: translateX(-100%);
    transition: transform .5s cubic-bezier(.7, 0, .3, 1);
}

.ps-layout--shop .ps-layout__left.active .ps-layout__left-container {
    transform: translateX(0);
}

body.show-admin-bar .ps-layout--shop .ps-layout__left {
    top: 40px;
    height: calc(100% - 40px);
}

.ps-layout--shop .ps-filter__header {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 24px 28px;
    border-bottom: 1px solid var(--ouse-line);
    background: var(--ouse-white);
}

.ps-layout--shop .ps-filter__header h3 {
    flex: 1 1 auto;
    margin: 0;
    font-family: var(--ouse-serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--ouse-ink);
    text-transform: none;
}

.ps-layout--shop .ps-filter__header .ps-btn--close {
    flex: 0 0 32px;
    margin: 0 -6px 0 auto;
    position: relative;
    top: auto;
    right: auto;
    width: 32px;
    height: 32px;
    transform: none;
    background-color: transparent;
}

.ps-layout--shop .ps-filter__header .ps-btn--close:before,
.ps-layout--shop .ps-filter__header .ps-btn--close:after {
    background-color: var(--ouse-ink);
}

.ps-layout--shop .ps-layout__left-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 28px 40px;
    -webkit-overflow-scrolling: touch;
}

.ps-layout--shop .bb-shop-sidebar .bb-product-filter {
    margin: 0;
    padding: 22px 0;
    border: 0;
    border-bottom: 1px solid var(--ouse-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ps-layout--shop .bb-shop-sidebar .bb-product-filter:last-child {
    border-bottom: 0;
}

.ps-layout--shop .bb-product-filter-title {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: var(--ouse-ink);
    font-family: var(--ouse-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.ps-layout--shop .bb-product-filter-title:before,
.ps-layout--shop .bb-product-filter-title:after {
    display: none;
}

.ps-layout--shop .bb-product-filter-content,
.ps-layout--shop .bb-product-filter-content a,
.ps-layout--shop .bb-product-filter-content label {
    color: var(--ouse-ink-soft);
    font-size: 13.5px;
}

.ps-layout--shop .bb-product-filter-content a:hover,
.ps-layout--shop .bb-product-filter-content .active > a,
.ps-layout--shop .bb-product-filter-content a.active {
    color: var(--ouse-gold);
}

.ps-layout--shop .bb-product-filter-content input[type="checkbox"],
.ps-layout--shop .bb-product-filter-content input[type="radio"] {
    accent-color: var(--ouse-ink);
}
