.page-content-section {
    max-width: var(--container-width);
    margin: 0 auto 0 auto;
    display: flex;
}

.content-page {
    max-width: 1200px;  /* largura máxima do container */
    margin: 0 auto;     /* centraliza */
    padding: 30px 20px; /* espaçamento interno */
    box-sizing: border-box;
    width: 100%;
}

.page-title {
    font-size: 32px;
    line-height: 1;
    margin: 40px 0;
    color: #0b0b0b;
    font-weight: 800;
}

.woocommerce-notices-wrapper {
    display: none !important;
}

/* Grid */
ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Li produto: contexto e espaço extra para o coração */
ul.products li.product {
    position: relative;
    margin: 0;
    padding: 0 0 20px 0; /* aumenta o espaço inferior para evitar sobreposição com o coração */
    background: transparent;
    border-radius: 16px;
    overflow: visible;
    border: 1px solid rgb(240, 242, 247);
    box-shadow: 0 6px 18px rgba(16,24,32,0.06);
}

/* Card (link) - layout flex para centralizar conteúdo facilmente */
ul.products li.product > a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    align-items: center;      /* centraliza título/imagem */
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease;
    width: 100%;
}

/* Image area */
ul.products li.product img,
ul.products li.product .attachment-woocommerce_thumbnail {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f5f6f7;
    display: block;
    padding: 18px;
    box-sizing: border-box;
}

/* Title + Price */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 16px 6px;
    color: #111827;
    text-align: center;
    line-height: 1.2;
}
ul.products li.product .price {
    font-size: 13px;
    font-weight: 600;
    margin: 0 16px 10px;
    text-align: center;
    color: #1f2937;
}

/* Garante que a área interna fique com padding */
ul.products li.product > a.woocommerce-LoopProduct-link > .price,
ul.products li.product > a.woocommerce-LoopProduct-link > .woocommerce-loop-product__title {
    width: 100%;
    box-sizing: border-box;
}

/* === BOTÃO: centralização suportando ambos os casos === */

/* Caso 1: botão fica FORA do link (após o </a>) */
ul.products li.product > .button,
ul.products li.product .add_to_cart_button {
    display: block;
    width: calc(100% - 40px);   /* respeita 20px de margem lateral */
    margin: 12px 20px 18px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #ff914d;
    color: #fff;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    z-index: 2;
}

/* Caso 2: botão está DENTRO do link (ex.: <a>...<button class="button">) */
ul.products li.product > a.woocommerce-LoopProduct-link .button,
ul.products li.product > a.woocommerce-LoopProduct-link .add_to_cart_button{
    align-self: center;                /* centraliza no flex */
    width: calc(100% - 40px);
    margin: 12px 20px 18px;
    padding: 10px 14px;
    box-sizing: border-box;
    z-index: 2;
}

/* Se preferir o botão menor (fit-content) com centralização:
   substitua width: calc(100% - 40px) por:
   width: fit-content; margin: 12px auto 18px; */

/* Hover card */
ul.products li.product:hover > a.woocommerce-LoopProduct-link {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(16,24,32,0.08);
}

/* === CORAÇÃO (favorito) - posicionado fora do card, sem colidir com botão === */
ul.products li.product::after {
    display: none;
    content: "♡";
    position: absolute;
    bottom: -20px;   /* posiciona parcialmente fora do card */
    left: 18px;      /* ou use right:18px se preferir no canto direito */
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ff914d;
    color: #ff914d;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(16,24,32,0.06);
    align-items: center;
    justify-content: center;
    z-index: 8; /* maior que o botão pra aparecer por cima */
    transition: transform .12s ease, background .12s ease, color .12s ease;
}

/* Hover coração */
ul.products li.product:hover::after {
    content: "♥";
    transform: scale(1.05);
}

/* ---------- Responsividade (mantendo posição do coração) ---------- */


/* Pequenos ajustes */
ul.products li.product .onsale,
ul.products li.product .star-rating { display: none; }


/* ---------- Storefront sorting - estilo igual à imagem ---------- */
.storefront-sorting {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

/* contagem (texto "Mostrando ...") */
.storefront-sorting .woocommerce-result-count {
    font-size: 13px;
    color: #6b7280;     /* cinza semelhante ao da imagem */
    font-weight: 500;
    line-height: 1;
    text-align: left;
    margin: auto 0;
}

/* embalagem do select para alinhamento se o tema incluir extras */
.storefront-sorting .woocommerce-ordering {
    display: block;
    margin: auto 0;
}

/* Select estilizado (caixa arredondada com borda suave e seta custom) */
.storefront-sorting .woocommerce-ordering select.orderby {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 8px 36px 8px 12px; /* espaço à direita para a seta */
    border-radius: 8px;
    border: 1px solid #e6e9ee;
    background: #ffffff;
    font-size: 13px;
    color: #111827;
    min-width: 160px;
    box-shadow: 0 1px 2px rgba(16,24,32,0.04);
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path fill='%236b7280' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 10px 6px;
}

/* foco no select */
.storefront-sorting .woocommerce-ordering select.orderby:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255,145,77,0.08);
    border-color: #ff914d;
}

/* Ajuste do botão/caixa de ordenação (se o tema gerar um <button> ao invés do select) */
.storefront-sorting .woocommerce-ordering button,
.storefront-sorting .woocommerce-ordering .select2-container--default .select2-selection--single {
    border-radius: 8px;
    border: 1px solid #e6e9ee;
    background: #fff;
    padding: 8px 12px;
}

.woocommerce-ordering select.orderby {
    position: relative !important;
    z-index: 9999 !important;
}

/* garante que o pai não corte o menu */
.woocommerce-ordering {
    overflow: visible !important;
}

/* se o container tiver transform, desabilita só nele */
.storefront-sorting {
    transform: none !important;
}

.added_to_cart {
    display: block;              /* transforma em bloco */
    width: fit-content;          /* ocupa só o necessário (pode trocar por 100% se quiser largura total) */
    margin: 10px auto 0;         /* centraliza horizontalmente */
    padding: 8px 14px;
    background-color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 8px;
    color: #ffffff;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
}

.added_to_cart:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .content-area {
        width: 100% !important;
    }
}

@media (max-width: 1024px) {
    ul.products { grid-template-columns: repeat(2, 1fr); }
    ul.products li.product { padding-bottom: 48px; }
    ul.products li.product img { height: 200px; padding: 14px; }
    ul.products li.product::after { left: 14px; bottom: -16px; width: 34px; height: 34px; line-height:34px; }
}

@media (max-width: 640px) {

    .page-content-section { display: block; margin: 30px; }

    ul.products { grid-template-columns: repeat(1, 1fr); gap: 16px; }
    ul.products li.product { padding-bottom: 56px; }
    ul.products li.product img { height: 220px; padding: 22px; }
    ul.products li.product::after { left: 16px; bottom: -18px; }

    .storefront-sorting {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .storefront-sorting .woocommerce-ordering {
        width: 100%;
    }
    .storefront-sorting .woocommerce-ordering select.orderby {
        width: 100%;
        min-width: 0;
    }
}