/* ---- Top bar heart ---- */
.fav-wrapper {
    position: relative;
}

.fav-nav-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-brown-900);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s ease;
}

.fav-nav-btn:hover {
    background: rgba(18, 17, 15, 0.06);
}

.fav-nav-icon {
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fav-count {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #b94a48;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.fav-count.hidden {
    display: none;
}

.fav-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    background: #2b2825;
    color: #fff;
    padding: 12px 22px;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: min(90vw, 420px);
    text-align: center;
}

.fav-toast.hidden {
    display: none;
}

/* ---- Heart icon on each product card ---- */
.product-card {
    position: relative;
}

.fav-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #b94a48;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, background 0.2s ease;
}

.detail-card .fav-btn {
    top: 24px;
    right: 24px;
    left: auto;
}

.fav-btn:hover {
    transform: scale(1.12);
    background: #fff;
}

.fav-btn .fav-heart {
    pointer-events: none;
}

.fav-btn[aria-pressed="true"] {
    background: #b94a48;
    color: #fff;
}

.fav-btn.just-faved {
    animation: fav-pop 0.35s ease;
}

@keyframes fav-pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.fav-btn.fav-error {
    animation: fav-shake 0.5s ease;
    background: #b94a48;
    color: #fff;
}

@keyframes fav-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ---- Favorites account page: full-width rectangular rows ---- */
.fav-page-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fav-row {
    display: flex;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(111, 78, 55, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fav-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(111, 78, 55, 0.1);
}

.fav-row-image {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 16px;
}

.fav-row-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
    min-width: 0;
}

.fav-row-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3d2b1f;
    margin: 0 0 4px;
}

.fav-row-price {
    color: #d4a373;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.fav-row-desc {
    color: #5a3e2b;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 0;
    flex-grow: 1;
}

.fav-row-desc.empty {
    color: #a08a78;
    font-style: italic;
}

.fav-row-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}

.fav-row-add,
.fav-row-buy {
    border-radius: 100px;
    padding: 9px 22px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.fav-row-add {
    background: #fff;
    color: #6f4e37;
    border: 1px solid #6f4e37;
    transition: all 0.2s ease;
}

.fav-row-add:hover {
    background: #12110F;
    color: #fff;
}

.fav-row-add.added {
    background: #1e7a3a;
    border-color: #1e7a3a;
    color: #fff;
}

.fav-row-buy {
    background: #12110F;
    color: #fff;
    border: 1px solid #6f4e37;
    transition: background 0.2s ease;
}

.fav-row-buy:hover {
    background: #2b2825;
}

.fav-row-remove {
    background: transparent;
    border: none;
    color: #b94a48;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 4px;
}

.fav-row-remove:hover {
    text-decoration: underline;
}

.fav-page-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8a6a3b;
}

.fav-page-empty a {
    display: inline-block;
    margin-top: 16px;
    color: #6f4e37;
    font-weight: 700;
}

@media (max-width: 640px) {
    .fav-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fav-row-image {
        width: 100%;
        height: 180px;
    }
    .fav-row-actions {
        flex-direction: row;
    }
    .fav-row-actions .fav-row-add,
    .fav-row-actions .fav-row-buy {
        flex: 1;
    }
}
