/* Scoped to homepage product sections; catalog cards and site header are unchanged. */
.ysf-home-products { padding: 32px 0; background: #eef0f4; color: #292929; }
.ysf-home-products .container { max-width: 1320px; }
.ysf-product-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #d9dde3; position: relative; }
.ysf-product-heading::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 48px; height: 3px; background: #ffc21b; }
.ysf-product-heading h2 { margin: 0; font: 700 clamp(26px, 2.5vw, 38px)/1.15 Georgia, serif; color: #292929; }
.ysf-product-heading > a { color: #826018; font-size: 14px; white-space: nowrap; text-decoration: none; }
.ysf-product-heading > a:hover { text-decoration: underline; color: #343333; }
.ysf-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.ysf-product-grid > li { min-width: 0; display: flex; }
.ysf-home-product { width: 100%; min-width: 0; display: flex; flex-direction: column; padding: 12px; background: #fff; border: 1px solid #dfe3e9; border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease; }
.ysf-product-image { position: relative; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 10px; background: #f2f4f7; }
.ysf-product-photo { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.ysf-product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.ysf-product-quick { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 7px; opacity: 0; visibility: hidden; transition: opacity .18s ease; }
.ysf-product-quick a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 3px 10px #0002; font-size: 15px; text-decoration: none; }
.ysf-quick-cart { background: #ffc21b; color: #242424; }
.ysf-quick-view { background: #343333; color: #fff; }
.ysf-home-product:hover .ysf-product-quick, .ysf-home-product:focus-within .ysf-product-quick { opacity: 1; visibility: visible; }
.ysf-product-copy { padding: 16px 5px 14px; }
.ysf-product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 8px; font-size: 23px; font-weight: 700; line-height: 1.2; color: #242424; }
.ysf-product-price del { font-size: 14px; font-weight: 400; color: #878787; }
.ysf-product-copy h3 { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.4; min-height: 2.8em; }
.ysf-product-copy h3 a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: #292929; text-decoration: none; }
.ysf-product-copy h3 a:hover { color: #826018; }
.ysf-product-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); gap: 7px; margin-top: auto; }
.ysf-product-actions > * { display: flex; justify-content: center; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 8px 5px; border-radius: 7px; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; text-decoration: none; }
.ysf-action-view { background: #343333; color: #fff; }
.ysf-action-cart { background: #ffc21b; color: #242424; }
.ysf-action-added { background: #12684e; color: #fff; }
.ysf-action-view:hover, .ysf-quick-view:hover { background: #202020; color: #fff; }
.ysf-action-cart:hover, .ysf-quick-cart:hover { background: #efb30b; color: #242424; }
.ysf-home-products a:focus-visible { outline: 3px solid #9f7414; outline-offset: 3px; }
@media (hover: hover) {
    .ysf-home-product:hover { transform: translateY(-3px); box-shadow: 0 9px 22px #34333314; }
}
@media (max-width: 991px) {
    .ysf-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (hover: none), (pointer: coarse) {
    .ysf-product-quick { opacity: 1; visibility: visible; }
}
@media (max-width: 575px) {
    .ysf-home-products { padding: 24px 0; }
    .ysf-home-products .container { padding-left: 14px; padding-right: 14px; }
    .ysf-product-heading { gap: 10px; margin-bottom: 16px; padding-bottom: 13px; align-items: flex-end; }
    .ysf-product-heading h2 { font-size: 26px; }
    .ysf-product-heading > a { font-size: 11px; }
    .ysf-product-grid { gap: 10px; }
    .ysf-home-product { padding: 8px; border-radius: 12px; }
    .ysf-product-image { border-radius: 8px; }
    .ysf-product-copy { padding: 12px 2px; }
    .ysf-product-price { font-size: 20px; }
    .ysf-product-copy h3 { font-size: 13px; }
    .ysf-product-quick { top: 6px; right: 6px; gap: 5px; }
    .ysf-product-quick a { width: 32px; height: 32px; font-size: 13px; }
    .ysf-product-actions { gap: 5px; }
    .ysf-product-actions > * { font-size: 11px; gap: 4px; padding: 8px 3px; }
}
@media (max-width: 359px) {
    .ysf-product-actions i { display: none; }
    .ysf-product-actions > * { font-size: 10px; }
    .ysf-product-heading > a { white-space: normal; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
    .ysf-home-product, .ysf-product-quick { transition: none; }
    .ysf-home-product:hover { transform: none; }
}

/* Always-visible wishlist action, independent of the hover controls. */
.ysf-product-wishlist { position: absolute; top: 10px; left: 10px; z-index: 2; margin: 0; }
.ysf-wishlist-button { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid #e0e2e5; border-radius: 50%; background: #fff; color: #343333; font-size: 17px; line-height: 1; box-shadow: 0 3px 10px #0002; cursor: pointer; text-decoration: none; }
.ysf-wishlist-button:hover { background: #fff8e2; color: #99700d; }
.ysf-wishlist-button.is-saved { background: #fff5d9; border-color: #f0dfb3; color: #c88c00; }
.ysf-wishlist-button:focus-visible { outline: 3px solid #9f7414; outline-offset: 2px; }
@media (max-width: 575px) {
    .ysf-product-wishlist { top: 6px; left: 6px; }
    .ysf-wishlist-button { width: 32px; height: 32px; font-size: 15px; }
}
