/* Canonical storefront ProductCard — accepted Category V2 visual/commerce language. */
.ap-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ap-space-4); align-items: start; }
.ap-product-grid > .ap-product-card { min-width: 0; }
.ap-product-card { min-width: 0; display: flex; flex-direction: column; margin: 0; overflow: visible; border: 0; border-radius: 0; background: var(--ap-color-surface); box-shadow: none; transition: none; width: 100%; height: 100%; --ap-color-text: #0e3446; --ap-color-text-muted: #506977; color: var(--ap-color-text); }
.ap-product-card:hover { box-shadow: none; transform: none; }
.ap-product-card .ap-product-media { position: relative; overflow: hidden; aspect-ratio: 1; background: #fff; border-radius: 18px; margin: 0; flex: 0 0 auto; }
.ap-product-card .ap-product-image-link { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; border-radius: inherit; }
.ap-product-card .ap-product-image-link img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; pointer-events: none; transform: scale(1); transition: opacity 160ms ease, transform 240ms ease; }
.ap-product-card .ap-product-gallery-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; pointer-events: none; transform: scale(1); transition: opacity 160ms ease, transform 240ms ease; }
.ap-product-card .ap-product-gallery-image.is-active { opacity: 1; }
.ap-product-card:hover .ap-product-gallery-image.is-active { transform: scale(1.02); }
.ap-product-card .ap-product-gallery-progress { position: absolute; z-index: 4; right: 10px; bottom: 8px; left: 10px; display: flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.ap-product-card:hover .ap-product-gallery-progress { opacity: .88; }
.ap-product-card .ap-product-gallery-progress span { flex: 1 1 0; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: 0 1px 4px rgba(16, 36, 43, .16); transition: background-color 140ms ease, transform 140ms ease; }
.ap-product-card .ap-product-gallery-progress span.is-active { background: var(--ap-color-brand); transform: scaleY(1.35); }
.ap-product-card .ap-card-wishlist { position: absolute; z-index: 2; top: 8px; right: 8px; display: flex; flex-direction: column; gap: var(--ap-space-2); }
.ap-product-card .ap-product-action { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; color: var(--ap-color-text); background: #fff; box-shadow: none; cursor: pointer; transition: color var(--ap-transition-fast), border-color var(--ap-transition-fast), background-color var(--ap-transition-fast), transform var(--ap-transition-fast); }
.ap-product-card .ap-product-action:hover { color: var(--ap-color-brand-hover); border-color: rgba(36, 159, 208, .3); background: #fff; outline: 0; transform: translateY(-1px); }
.ap-product-card .ap-product-action:focus { color: var(--ap-color-brand-hover); border-color: rgba(36, 159, 208, .3); background: #fff; outline: 0; transform: translateY(-1px); }
.ap-product-card .ap-product-action:focus-visible { outline: 3px solid rgba(36, 159, 208, .34); outline-offset: 2px; }
.ap-product-card .ap-product-image-link:focus-visible { outline: 3px solid rgba(36, 159, 208, .34); outline-offset: 2px; }
.ap-product-card .ap-product-quick-qty button:focus-visible { outline: 3px solid rgba(36, 159, 208, .34); outline-offset: 2px; }
.ap-product-card .ap-quantity-stepper button:focus-visible { outline: 3px solid rgba(36, 159, 208, .34); outline-offset: 2px; }
.ap-product-card .ap-product-cart-button:focus-visible { outline: 3px solid rgba(36, 159, 208, .34); outline-offset: 2px; background: var(--ap-color-brand-hover); color: var(--ap-color-text-inverse); }
.ap-product-card .ap-product-body { flex: 0 0 auto; display: flex; flex-direction: column; padding: var(--ap-space-3) 0 0; padding-top: 16px; }
.ap-product-card .ap-product-title { min-height: 2.8em; margin: 0; font-size: 16px; line-height: 1.4; font-weight: 500; }
.ap-product-card .ap-product-title-text { display: -webkit-box; overflow: hidden; color: var(--ap-color-text); text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ap-product-card .ap-product-title-text:hover { color: var(--ap-color-brand-hover); text-decoration: none; }
.ap-product-card .ap-product-title-text:focus { color: var(--ap-color-brand-hover); text-decoration: none; }
.ap-product-card .ap-product-rating { min-height: 18px; display: flex; align-items: center; gap: 2px; margin-top: var(--ap-space-2); color: #e9aa28; font-size: 12px; }
.ap-product-card .ap-product-price-row { min-height: 36px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 0; padding-top: 12px; flex-wrap: wrap; }
.ap-product-card .ap-product-price { margin: 0; color: var(--ap-color-text); font-size: clamp(23px, 1.75vw, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; overflow-wrap: anywhere; }
.ap-product-card .ap-product-price-new { color: var(--ap-color-text); }
.ap-product-card .ap-product-price-old { display: inline-block; margin-left: 6px; color: var(--ap-color-text-muted); font-size: var(--ap-font-size-body-small); font-weight: 500; text-decoration: line-through; }
.ap-product-card .ap-product-qty-chip { flex: 0 0 auto; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 4px; color: #0e3446; background: #f3fbfb; font-size: 13px; line-height: 1.3; font-weight: 550; white-space: nowrap; border: 1px solid #bddcde; }
.ap-product-card .ap-product-unit-price { display: block; margin-top: 3px; color: var(--ap-color-text-muted); font-size: var(--ap-font-size-body-small); line-height: 1.3; }
.ap-product-card .ap-product-availability { margin: var(--ap-space-2) 0 0; color: var(--ap-color-text-muted); font-size: 12px; line-height: 1.35; }
.ap-product-card .ap-product-availability.is-unavailable { color: #795143; font-size: 12px; }
.ap-product-card .ap-product-buy { padding: var(--ap-space-2) 0 0; margin: 0; border: 0; margin-top: auto; padding-top: 14px; }
.ap-product-card .ap-product-quick-qty { display: flex; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; justify-content: flex-start; }
.ap-product-card .ap-product-quick-qty button { min-width: 0; height: 40px; padding: 0; border: 0; border-radius: 0; color: #506977; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; transition: color var(--ap-transition-fast), border-color var(--ap-transition-fast), background-color var(--ap-transition-fast); position: relative; flex: 0 1 44px; }
.ap-product-card .ap-product-quick-qty button:hover { color: var(--ap-color-brand-hover); border-color: rgba(36, 159, 208, .32); outline: 0; }
.ap-product-card .ap-product-quick-qty button:focus { color: var(--ap-color-brand-hover); border-color: rgba(36, 159, 208, .32); outline: 0; }
.ap-product-card .ap-product-quick-qty button.is-active { color: #006570; border-color: rgba(36, 159, 208, .38); background: transparent; font-weight: 650; }
.ap-product-card .ap-product-quick-qty button:disabled { cursor: not-allowed; opacity: 1; }
.ap-product-card .ap-quantity-stepper button:disabled { cursor: not-allowed; opacity: 1; }
.ap-product-card .ap-quantity-stepper input:disabled { cursor: not-allowed; opacity: 1; }
.ap-product-card .ap-product-cart-button:disabled { cursor: not-allowed; opacity: 1; color: #50616a; background: #e9eef0; }
.ap-product-card .ap-product-buy-row { display: grid; grid-template-columns: minmax(102px, .4fr) minmax(0, .6fr); gap: 8px; align-items: center; }
.ap-product-card .ap-quantity-stepper { min-width: 0; height: 46px; display: grid; grid-template-columns: minmax(28px, 1fr) minmax(28px, 1.3fr) minmax(28px, 1fr); overflow: hidden; border: 1px solid #d6e4e6; border-radius: 6px; background: var(--ap-color-surface); }
.ap-product-card .ap-quantity-stepper button { width: 100%; height: 44px; padding: 0; border: 0; color: #345c6a; background: transparent; cursor: pointer; }
.ap-product-card .ap-quantity-stepper button:hover { color: var(--ap-color-brand-hover); background: var(--ap-color-surface-accent); outline: 0; }
.ap-product-card .ap-quantity-stepper button:focus { color: var(--ap-color-brand-hover); background: var(--ap-color-surface-accent); outline: 0; }
.ap-product-card .ap-quantity-stepper input { width: 100%; min-width: 0; height: 44px; padding: 0; border: 0; color: var(--ap-color-text); background: #fff; font-size: 15px; font-weight: 550; text-align: center; outline: 0; appearance: textfield; -moz-appearance: textfield; }
.ap-product-card .ap-quantity-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.ap-product-card .ap-quantity-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.ap-product-card .ap-product-cart-button { width: 100%; min-width: 0; padding-right: var(--ap-space-3); padding-left: var(--ap-space-3); min-height: 44px; height: 46px; border-radius: 6px; background: #007b88; border: 0; box-shadow: none; font-size: 14px; font-weight: 600; gap: var(--ap-space-1); white-space: nowrap; padding: 0 10px; }
.ap-product-card .ap-product-cart-button-full { width: 100%; }
.ap-product-card .tooltip { white-space: nowrap; }
.ap-product-card .ap-product-hit-badge { right: var(--ap-space-2); left: auto; border-radius: var(--ap-radius-sm); background: var(--ap-color-brand); font-weight: var(--ap-font-weight-bold); }
.ap-product-card .ap-product-cart-button:hover { background: #006570; color: var(--ap-color-text-inverse); }
.ap-product-card .ap-quantity-stepper:focus-within { outline: 2px solid var(--ap-color-brand); outline-offset: 2px; }
.ap-product-card .ap-product-cart-button-full span { display: inline; }
.ap-product-card .ap-product-quick-qty button::after { content: ""; position: absolute; bottom: 1px; left: calc(50% - 10px); width: 20px; height: 2px; background: #007b88; transform: scaleX(0); transition: transform 180ms ease; }
.ap-product-card .ap-product-quick-qty button.is-active::after { transform: scaleX(1); }
.ap-product-card .ap-product-buy-qty .ap-product-cart-button span { display: inline; }
.ap-product-card .ap-product-cart-button i { display: none; }
.ap-product-card [disabled] { opacity: 1; cursor: not-allowed; }
.ap-product-card .ap-product-action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 1199px) {
.ap-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ap-product-card .ap-product-buy-row { grid-template-columns: minmax(88px, .4fr) minmax(0, .6fr); gap: 6px; }
.ap-product-card .ap-product-cart-button { padding: 0 6px; font-size: 12px; }
}
@media (max-width: 767px) {
.ap-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ap-space-3); }
.ap-product-card .ap-product-image-link { touch-action: pan-y; }
.ap-product-card .ap-product-gallery-progress { right: 9px; bottom: 9px; left: auto; gap: 5px; opacity: .9; }
.ap-product-card .ap-product-gallery-progress span { width: 6px; height: 6px; flex: 0 0 6px; background: rgba(82, 101, 111, .42); box-shadow: 0 0 0 1px rgba(255, 255, 255, .78); }
.ap-product-card .ap-product-gallery-progress span.is-active { background: var(--ap-color-brand); transform: scale(1.18); }
.ap-product-card .ap-product-media { border-radius: 8px; }
.ap-product-card .ap-product-body { padding-top: 12px; }
.ap-product-card .ap-product-title { font-size: 14px; min-height: 2.8em; }
.ap-product-card .ap-product-price { font-size: 22px; }
.ap-product-card .ap-product-price-row { gap: 7px; min-height: 42px; align-items: center; }
.ap-product-card .ap-product-qty-chip { font-size: 12px; padding: 4px 6px; min-height: 27px; }
.ap-product-card .ap-product-buy-row { grid-template-columns: 86px minmax(0, 1fr); gap: 6px; }
.ap-product-card .ap-quantity-stepper { grid-template-columns: 28px minmax(28px, 1fr) 28px; }
.ap-product-card .ap-product-cart-button { font-size: 12px; padding: 0 4px; }
.ap-product-card .ap-product-quick-qty button { height: 40px; font-size: 13px; }
.ap-product-card .ap-card-wishlist { top: 3px; right: 3px; }
.ap-product-card .ap-product-action { background: rgba(255,255,255,.96); }
}
@media (min-width: 768px) and (max-width: 991px) {
.ap-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
.ap-product-card { transition: none; }
.ap-product-card .ap-product-image-link img { transition: none; }
.ap-product-card .ap-product-gallery-image { transition: none; }
.ap-product-card .ap-product-gallery-progress { transition: none; }
.ap-product-card .ap-product-action { transition: none; }
.ap-product-card .ap-product-quick-qty button { transition: none; }
.ap-product-card .ap-product-quick-qty button::after { transition: none; }
}
/* Canonical read-only presentation: same DTO, intentionally no commerce controls. */
.ap-product-viewed-compact { display:flex; flex-direction:column; align-items:flex-start; gap:10px; min-width:0; max-width:264px; color:#0e3446; text-decoration:none; }
.ap-product-viewed-compact > img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; border-radius:5px; background:#f6f8f9; }
.ap-product-viewed-name { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.ap-product-viewed-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 8px; font-size:17px; font-weight:600; }
.ap-product-viewed-price small,.ap-product-viewed-price del { font-size:11px; line-height:1.5; font-weight:400; color:#506977; }
.ap-product-viewed-compact:hover { color:#007b88; text-decoration:none; }
.ap-product-viewed-compact:hover .ap-product-viewed-name { text-decoration:underline; text-underline-offset:3px; }
.ap-product-viewed-compact:focus-visible,.ap-product-card :where(a,button,input):focus-visible { outline: 2px solid #007b88; outline-offset: 3px; }
/* Layout-only adapters for OpenCart modules and its existing list/grid toggle. */
.ap-product-grid.ap-product-grid--module { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-bottom: 24px; }
.ap-product-listing > .product-layout { margin-bottom: 28px; }
@media (min-width: 768px) {
  .ap-product-listing > .product-list > .ap-product-card { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); column-gap: 24px; max-width: 900px; }
  .ap-product-listing > .product-list .ap-product-media { grid-row: 1 / 3; }
  .ap-product-listing > .product-list .ap-product-body { padding-top: 0; }
  .ap-product-listing > .product-list .ap-product-buy { max-width: 360px; width: 100%; align-self: end; }
}
