.product-card { position: relative; }
.product-action-card {
    padding: 12px !important;
    margin-bottom: 24px !important;
    border: 1px solid #eceff3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
    overflow: hidden;
}
.product-action-card .catalog-product-image {
    display: block;
    height: 164px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 10px 10px 0 0;
}
.product-action-media { position: relative; margin: 0 0 7px; overflow: hidden; border-radius: 10px 10px 0 0; background: #f7f8fa; }
.product-action-stock {
    position: absolute;
    top: 7px;
    right: 7px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 14px);
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #00c96b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-action-stock .fa { font-size: 6px; }
.product-action-stock.is-out { background: #737b87; }
.product-action-card h4 { display: -webkit-box; min-height: 34px; margin: 7px 0 5px; overflow: hidden; color: #172033; font-size: 12px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; text-transform: uppercase; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-action-price-row { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 6px; }
.product-action-price-row > p { margin: 0; color: #ee1717; font-size: 14px; font-weight: 700; white-space: nowrap; }
.product-action-cart { display: grid; width: 31px; min-width: 31px; height: 31px; place-items: center; border: 0; border-radius: 50%; background: #ed000b; color: #fff; cursor: pointer; }
.product-action-cart:hover { background: #c90009; }
.product-action-cart:disabled { background: #a8adb5; cursor: not-allowed; }
.product-wishlist-corner {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 6;
    width: 42px;
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.96) !important;
    color: #f04b2f;
    font-size: 19px !important;
    box-shadow: 0 2px 8px rgba(15,23,42,.12) !important;
}
.product-card-badge {
    position: absolute;
    top: 14px;
    left: 12px;
    z-index: 3;
    max-width: calc(100% - 74px);
    padding: 6px 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f04420;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-icon-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 12px;
}
.product-card-icon-action {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}
.product-card-icon-action .fa {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #172033;
    font-size: 19px;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.product-card-icon-actions .product-share-trigger {
    display: flex;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 12px;
}
.product-card-icon-actions .product-share-trigger:hover,
.product-card-icon-actions .product-share-trigger:focus-visible { border: 0; background: transparent; color: #ff523b; }
.product-card-icon-actions .card-wishlist-btn {
    position: static;
    min-width: 0;
    height: auto;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 12px;
    box-shadow: none;
}
.product-card-icon-actions .card-wishlist-btn .fa {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: inherit;
    font-size: 19px;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.product-card-icon-actions .card-wishlist-btn.in-wishlist { color: #f04420; background: transparent; border-color: transparent; box-shadow: none; }
.product-card-icon-actions .card-wishlist-btn.in-wishlist .fa { color: #f04420; border-color: #ffd5cc; background: #fff7f5; }
.product-card-icon-action:hover .fa,
.product-card-icon-action:focus-visible .fa { border-color: #ff523b; color: #ff523b; }
.product-card-icon-action.in-wishlist,
.product-card-icon-action.in-wishlist .fa { color: #f04b2f; }
.product-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.product-card-action-btn {
    display: inline-flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid #ff523b;
    border-radius: 10px;
    background: #fff;
    color: #e7472c;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.product-card-add-btn { background: #fff; }
.product-card-order-btn { background: #f04420; color: #fff; }
.product-card-action-btn:hover { filter: brightness(.96); }
.product-card .product-info { padding: 18px 14px 14px; }
.product-action-hover-bar {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-around;
    gap: 0;
    margin: 7px -12px -12px;
    border-top: 1px solid #eceff3;
}
.product-action-hover-bar > button {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 4px;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}
.product-action-hover-bar > button + button { border-left: 1px solid #e5e7eb; }
.product-action-hover-bar > button:hover,
.product-action-hover-bar > button.in-wishlist { color: #f04420; }

/* Keep the card actions legible against dark storefront cards. */
[data-theme="dark"] .product-action-hover-bar > button,
body.theme-dark .product-action-hover-bar > button,
body.dark-mode .product-action-hover-bar > button,
[data-theme="dark"] .exclusive-offer-hover-actions > button,
body.theme-dark .exclusive-offer-hover-actions > button,
body.dark-mode .exclusive-offer-hover-actions > button { color: #e7edf7; }
[data-theme="dark"] .product-action-hover-bar > button:hover,
[data-theme="dark"] .product-action-hover-bar > button.in-wishlist,
body.theme-dark .product-action-hover-bar > button:hover,
body.theme-dark .product-action-hover-bar > button.in-wishlist,
body.dark-mode .product-action-hover-bar > button:hover,
body.dark-mode .product-action-hover-bar > button.in-wishlist,
[data-theme="dark"] .exclusive-offer-hover-actions > button:hover,
[data-theme="dark"] .exclusive-offer-hover-actions > button.in-wishlist,
body.theme-dark .exclusive-offer-hover-actions > button:hover,
body.theme-dark .exclusive-offer-hover-actions > button.in-wishlist,
body.dark-mode .exclusive-offer-hover-actions > button:hover,
body.dark-mode .exclusive-offer-hover-actions > button.in-wishlist { color: #ff755f; }

/* Keep the wishlist heart as a plain footer action, without the legacy pill. */
.product-action-hover-bar > .card-wishlist-btn,
.exclusive-offer-hover-actions > .card-wishlist-btn {
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 7px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.product-action-hover-bar > .card-wishlist-btn .fa,
.exclusive-offer-hover-actions > .card-wishlist-btn .fa {
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Keep catalog cards at four across on desktop. */
.row > .product-action-card {
    box-sizing: border-box;
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
    min-width: 0;
}
.product-grid > .product-action-card {
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-width: 0;
}

/* Keep product cards clean until hover, while preserving the action area. */
@media (hover: hover) and (pointer: fine) {
    .product-action-card .product-wishlist-corner,
    .product-action-card .product-card-icon-actions,
    .product-action-card .product-card-actions {
        opacity: 0;
        visibility: hidden;
        transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    }
    .product-action-card .product-wishlist-corner { transform: translateY(-4px); }
    .product-action-card:hover .product-wishlist-corner,
    .product-action-card:focus-within .product-wishlist-corner,
    .product-action-card:hover .product-card-icon-actions,
    .product-action-card:focus-within .product-card-icon-actions,
    .product-action-card:hover .product-card-actions,
    .product-action-card:focus-within .product-card-actions {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.product-quick-view-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(25, 27, 31, .42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.product-quick-view {
    width: min(100%, 640px);
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
    color: #172033;
    box-shadow: 0 22px 65px rgba(0,0,0,.2);
    animation: productQuickViewIn .18s ease-out;
}
@keyframes productQuickViewIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.product-quick-view-header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #f0f2f5;
}
.product-quick-view-header strong { font-size: 14px; }
.product-quick-view-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8b95a4;
    font-size: 24px;
    cursor: pointer;
}
.product-quick-view-body { display: grid; grid-template-columns: 1fr 1.12fr; gap: 26px; padding: 20px; }
.product-quick-view-image-wrap {
    display: grid;
    min-height: 260px;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
}
.product-quick-view-image { width: 100%; height: 270px; object-fit: contain; }
.product-quick-view-details { display: flex; flex-direction: column; align-items: flex-start; }
.product-quick-view-details h2 { margin: 2px 0 10px; color: #172033; font-size: 17px; line-height: 1.35; text-transform: uppercase; }
.product-quick-view-rating { display: flex; align-items: center; gap: 4px; margin: 0 0 14px; color: #f7b500; }
.product-quick-view-rating span { margin-left: 3px; color: #9aa3af; font-size: 12px; }
.product-quick-view-price { margin-bottom: 12px; color: #e50012; font-size: 25px; }
.product-quick-view-sku { margin: 0 0 12px; color: #8a929e; font-size: 12px; }
.product-quick-view-quantity-label { margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.product-quick-view-quantity { display: flex; height: 38px; align-items: center; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 10px; }
.product-quick-view-quantity button { width: 34px; height: 100%; border: 0; background: #fff; color: #8992a0; font-size: 16px; cursor: pointer; }
.product-quick-view-quantity button:disabled { opacity: .45; cursor: not-allowed; }
.product-quick-view-quantity input { width: 32px; border: 0; text-align: center; color: #172033; font: inherit; }
.product-quick-view-actions { display: flex; width: 100%; gap: 10px; margin-top: auto; padding-top: 22px; }
.product-quick-view-add { display: flex; min-height: 46px; flex: 1; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; background: #e50012; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.product-quick-view-add:disabled { opacity: .55; cursor: not-allowed; }
.product-quick-view-share { display: grid; width: 42px; min-width: 42px; place-items: center; border: 1px solid #e5e7eb; border-radius: 9px; background: #fff; color: #929ba8; font-size: 17px; cursor: pointer; }
.product-quick-view-share:hover { border-color: #ff523b; color: #f04420; }
.product-quick-view-wishlist { width: 42px; min-width: 42px; border: 1px solid #e5e7eb; border-radius: 9px; background: #fff; color: #929ba8; font-size: 18px; cursor: pointer; }
.product-quick-view-wishlist.in-wishlist { border-color: #ff523b; color: #f04420; background: #fff7f5; }
.product-quick-view-stock { margin: 10px 0 0; color: #c0392b; font-size: 12px; }
@media (max-width: 600px) {
    .row > .product-action-card {
        width: auto;
        max-width: none;
        min-width: 0 !important;
        margin-bottom: 8px !important;
        padding: 5px !important;
    }
    .product-grid > .product-action-card { min-width: 0 !important; margin-bottom: 8px !important; padding: 5px !important; }
    .product-action-card .catalog-product-image { height: 112px; }
    .product-action-card h4 { min-height: 29px; font-size: 10px; }
    .product-action-price-row > p { font-size: 12px; }
    .product-action-cart { width: 29px; min-width: 29px; height: 29px; }
    .product-action-hover-bar { min-height: 30px; margin: 7px -7px -7px; }
    .product-action-hover-bar > button { gap: 4px; padding: 7px 3px; font-size: 9.5px; }
    .product-card-action-btn { min-height: 44px; padding: 7px 5px; font-size: 11.5px; }
    .product-card-icon-action { font-size: 11px; }
    .product-card-icon-action .fa { width: 38px; height: 38px; }
    .product-quick-view-backdrop { padding: 12px; }
    .product-quick-view-body { grid-template-columns: 1fr; gap: 16px; padding: 14px; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; }
    .product-quick-view-image-wrap { min-height: 210px; }
    .product-quick-view-image { height: 210px; }
    .product-quick-view-details h2 { font-size: 16px; }
    .product-quick-view-actions { padding-top: 16px; }
}
