/* =========================================
   Mocca Products Grid Widget
   ========================================= */

/* ---- Grid container ---- */
.mocca-products-grid__items {
    display: grid !important;
    /* grid-template-columns definido via inline style pelo PHP (sem !important aqui) */
    gap: 30px;
    width: 100%;
    align-items: start;
}

/* ---- Cada item ocupa 100% da célula do grid ---- */
.mocca-products-grid__item {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.mocca-products-grid__item > * {
    width: 100% !important;
}

/* ---- Remove overflow hidden do carousel ---- */
.mocca-products-grid-wrapper .row {
    overflow: visible !important;
}

/* =========================================
   CARD LAYOUT
   ========================================= */

.mocca-products-grid__item .productCard {
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10) !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
    width: 100% !important;
}

.mocca-products-grid__item .productCard:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16) !important;
    transform: translateY(-3px) !important;
}

.mocca-products-grid__item .productCard__linkContainer {
    background: transparent !important;
}

/* ---- Título e preço ---- */
.mocca-products-grid__item .productCard__info {
    background: #ffffff !important;
    padding: 10px 16px 8px !important;
    margin: 0 !important;
    margin-top: -20px !important;
    margin-bottom: 10px !important;
}

/* ---- Botões: linha flex centralizada, sem animação ---- */
.mocca-products-grid__item .productCard__icons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 16px 14px !important;
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
    bottom: auto !important;
    background: #ffffff !important;
}

.mocca-products-grid__item .productCard__cart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none !important;
    bottom: auto !important;
    background: #ffffff !important;
    padding: 0 !important;
}

.mocca-products-grid__item .col.pix-icons-center {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 16px 14px !important;
    background: #ffffff !important;
}

/* ---- Sombra nos botões individuais ---- */
.mocca-products-grid__item .productCard__expand,
.mocca-products-grid__item .productCard__cart a,
.mocca-products-grid__item .productCard__cart .add_to_cart_button {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    border-radius: 4px !important;
    background: #ffffff !important;
}

/* ---- Remove hover que move os botões ---- */
.mocca-products-grid__item .productCard:hover .productCard__icons,
.mocca-products-grid__item .productCard:hover .productCard__cart {
    transform: none !important;
    opacity: 1 !important;
    bottom: auto !important;
}

/* ---- Oculta Wishlist/Compare, mantém Expand ---- */
.mocca-products-grid__item .productCard__icons > a:not(.productCard__expand) {
    display: none !important;
}

.mocca-products-grid__item .productCard__expand {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* ---- Quick View modal acima do header ---- */
.popup__wrapper,
.popup__wrapper.show {
    z-index: 999999 !important;
}

/* =========================================
   PAGINAÇÃO
   ========================================= */

.mocca-products-grid__pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mocca-products-grid__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: none !important;
    border-radius: 4px;
    text-decoration: none;
    color: #333 !important;
    font-size: 14px;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.mocca-products-grid__pagination .page-numbers.current,
.mocca-products-grid__pagination .page-numbers:hover {
    background: #1a4731 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(26, 71, 49, 0.35) !important;
}

/* ---- Mensagem vazia ---- */
.mocca-products-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #888;
}
