ul.products li.product { position: relative; }
.agfkart-product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}
li.product:hover .agfkart-product-actions,
li.product:focus-within .agfkart-product-actions {
    opacity: 1;
    pointer-events: auto;
}
.agfkart-product-actions button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 9px;
    border: 1.5px solid #606060;
    border-radius: 50%;
    background: #fff;
    color: #606060;
    cursor: pointer;
}
.agfkart-product-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.agfkart-product-actions [aria-pressed="true"] { background: #b94e08; color: #fff; border-color: #b94e08; }
.agfkart-product-actions [aria-pressed="true"] svg { color: #fff; fill: currentColor; }
.agfkart-product-actions button:hover { background: #b94e08; color: #fff; border-color: #b94e08; }
.agfkart-product-actions button:hover svg { color: #fff; }
.agfkart-product-actions button:focus-visible,
#agfkart-product-dialog :focus-visible { outline: 2px solid var(--color-brand-600); outline-offset: 3px; }
#agfkart-product-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(900px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: var(--color-brand-charcoal);
}
#agfkart-product-dialog::backdrop { background: rgb(0 0 0 / 50%); }
#agfkart-product-dialog h2 { margin: 0 40px 24px 0; font-size: 28px; font-weight: 600; }
.agfkart-dialog-close { position: absolute; top: 12px; right: 16px; font-size: 30px; width: 44px; height: 44px; cursor: pointer; }
.agfkart-preview-product { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid #ddd; }
.agfkart-preview-product img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.agfkart-preview-product h3 { font-size: 22px; font-weight: 600; margin-bottom: 16px; }
.agfkart-preview-product .price { color: var(--color-brand-600); font-size: 22px; margin-bottom: 16px; }
.agfkart-preview-link,
.agfkart-preview-product button { display: inline-block; padding: 12px 16px; margin: 16px 8px 0 0; border: 1px solid var(--color-brand-600); border-radius: 6px; cursor: pointer; }
.agfkart-preview-link { background: var(--color-brand-600); color: white; }
.agfkart-actions-status { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 12px 20px; border-radius: 8px; background: #111; color: #fff; }
.agfkart-actions-status:empty { display: none; }
@media (hover: none), (pointer: coarse) {
    .agfkart-product-actions { opacity: 1; pointer-events: auto; }
}
@media (max-width: 639px) {
    .agfkart-product-actions { top: 8px; right: 8px; gap: 6px; }
    .agfkart-product-actions button { width: 40px; height: 40px; padding: 8px; }
    .agfkart-preview-product { grid-template-columns: 1fr; }
    #agfkart-product-dialog { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .agfkart-product-actions { transition: none; }
}

/* Shared product cards, excluding category tiles and the catalog list layout. */
body ul.products:not(.is-list-view) li.product:not(.product-category) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(15 23 42 / 4%);
    transition: box-shadow 200ms ease, border-color 200ms ease;
}
body ul.products:not(.is-list-view) li.product:not(.product-category):hover {
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgb(15 23 42 / 10%);
}
body ul.products:not(.is-list-view) li.product:not(.product-category) a img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 0 0 18px;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
body ul.products:not(.is-list-view) li.product:not(.product-category) .woocommerce-loop-product__title {
    color: var(--color-brand-charcoal);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    padding: 0;
    margin: 0 0 12px;
}
body ul.products:not(.is-list-view) li.product:not(.product-category) .price {
    color: var(--color-brand-charcoal);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
}
body ul.products:not(.is-list-view) li.product:not(.product-category) .button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--color-brand-charcoal);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
body ul.products:not(.is-list-view) li.product:not(.product-category) .button:hover { background: var(--color-brand-600); }
body ul.products li.product .button:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
    body ul.products:not(.is-list-view) li.product:not(.product-category) { transition: none; }
}
